Run your first RLM
This quickstart runs RLM locally over a read-only SQLite database. Python and database access stay on your machine; model calls use your ModelRelay account.
Prerequisites
- A ModelRelay account
- A project API key beginning with
mr_sk_ - A SQLite database, or a text/CSV/JSON file to analyze
1. Install the CLI
brew install tensor-systems/tap/mrl
You can also download a binary from releases.modelrelay.ai/mrl.
2. Configure ModelRelay
Create a project and API key in the dashboard, then save the key and a default root model:
mrl config set \
--api-key "$MODELRELAY_API_KEY" \
--model claude-sonnet-5
Run mrl config show to confirm the active profile. Do not commit API keys to source control.
3. Ask a question about SQLite
mrl rlm \
"Which products produced the most revenue last month? Explain the calculation." \
--db ./app.db
The database is exposed to generated Python as db. Queries are read-only. The RLM can inspect the schema, issue multiple SQL queries, calculate intermediate results, and make model subcalls before returning an answer.
Use another sandbox name when it makes generated code clearer:
mrl rlm "Find unusual refunds and explain why they stand out" \
--db ./commerce.db \
--db-name commerce
Or analyze a file
mrl rlm "Summarize the trends and flag anomalies" -a ./events.csv
You can attach multiple files or pipe text through stdin:
mrl rlm "Compare these reports" -a ./reports/*.md
cat server.log | mrl rlm "Find the likely cause of the outage"
Where this runs
mrl rlm executes Python and reads your data on this machine. Only the root and subcall model requests leave it, and they go through ModelRelay to the model provider. Nothing you point --db or -a at is uploaded.
The same holds when you move the engine into a VPC or your own application. See Security and data boundaries.
Control subcall cost
The root model plans and writes code. Its llm_query and llm_batch calls can use a cheaper model with bounded output:
mrl rlm "Analyze the support backlog" -a ./tickets.json \
--subcall-model gemini-3.6-flash \
--subcall-max-output-tokens 1024 \
--subcall-reasoning-effort none
Use model IDs returned by mrl model list; availability depends on your project.