zeroruntime sim runs simulations from your terminal, against your agent deployed on Zero Runtime Cloud or a copy running on your machine.
Scenarios, personas, and runs are the same ones you see under Simulation in the dashboard. For what each one is, see the Simulation overview.
Quick start
Run these from your project folder, the one withzeroruntime.yaml:
sim init fills in agent from agent.id in zeroruntime.yaml. If the project isn’t deployed yet, set agent or local in the simulation file first.
The sims/ folder
Simulations live in your repo as YAML, so you can review and version them like code. The CLI reads sims/ from the folder you run it in.
id, which is also its file name. Use letters, numbers, -, and _. Every simulation file stands alone: nothing is shared or merged between files.
Scenario
sims/scenarios/close-account.yaml
Persona
sims/personas/angry-customer.yaml
Simulation
sims/simulations/regression.yaml
Quote values that start with
* in YAML, such as ["*"] and ["close-*"].
A run can have up to 50 scenarios, 50 personas, and 500 conversations. The number of conversations is scenarios × personas × environments × repeat.
Create files
sims/personas/ by hand, or create it in the dashboard and pull it.
Generate scenarios
Generate scenarios from your agent’s system prompt. They’re saved to the dashboard and written tosims/scenarios/.
--prompt-file. The prompt is only fetched automatically for Agent Builder agents.
Run a simulation
sim run:
- Shows the conversations and estimated cost, and asks you to confirm (
--yesskips it). - Creates or updates the selected scenarios and personas on the dashboard. Default scenarios and personas are never changed.
- Starts the run and prints each conversation’s verdict as it finishes.
- Prints a summary and exits with a status code.
--local you can only stop or keep watching. Use --detach to start a run and return its id right away.
Test a local agent
--local starts your agent on this machine and calls it, so you can test changes before you deploy them:
.zeroruntime/sim-agent.log. It runs under the agent id in ZERORUNTIME_AGENT_ID from your .env, or zeroruntime_agent.
--local only works with audio mode, and not with --detach. Use an agent id that isn’t deployed: if it is, the call would reach the deployed agent, so the CLI stops the run.Text mode
Text mode chats with your agent instead of calling it. It’s faster and cheaper, and it tests what the agent says: its prompt, LLM, and tools. For an agent you deploy with the CLI, describe the agent in the simulation file’sagent_config. Text mode runs this copy, not your deployed code, so only HTTP tools are called. Agent Builder agents use their saved configuration instead, so leave agent_config out.
sims/simulations/text-smoke.yaml
environments, max_duration, and local don’t apply in text mode, and max_turns and agent_config don’t apply in audio mode. sim validate reports these.
Check tool calls
expect_tools in a scenario checks the agent’s tool calls in every judged conversation:
A conversation the judge passed counts as failed in the CLI summary, reports, and exit code if a tool check fails. The dashboard still shows the judge’s verdict.
Run in CI
--yesskips the confirmation prompt.--max-costrefuses a run estimated above the limit, and stops one that goes over.--report junit:<path>writes one test case per conversation, with failures and skipped conversations marked. Use--report json:<path>for JSON. Repeat--reportfor both.
Exit codes
Review results
sim watch opens a live, full-screen view. Open a run to see its conversations, then a conversation to see its verdict, where it failed, the judge’s suggested fixes, cost, and transcript as it happens. Use the arrow keys to move, Enter to open, Esc to go back, r to refresh, and q to quit.
sim show prints a run’s summary and conversations, or one conversation’s verdict, where it failed, and the judge’s suggestions. Add --transcript for the full conversation and --json for the raw response.
You can open every run in the dashboard too. See Review results.
Stop, re-run, and delete
zeroruntime up, and re-run. rerun and delete ask first; --yes skips the prompt.
Sync with the dashboard
sim run uploads the scenarios and personas it uses. To sync without running:
name. Renaming a file’s name creates a new item on the next push. Default scenarios and personas are read-only: push skips them and delete refuses them. pull never overwrites a file.
See the CLI Reference for every command and flag.