> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run a Simulation

> Choose the agent, scenarios, personas, and mode, set the limits, and check the cost before you start.

Select **Run simulation** in the **Simulation** page header to open the **New simulation** panel. You configure the run first, then review it and its cost before anything runs.

> [!WARNING]
>
> **Deploy first.** A simulation tests the version that's deployed on the branch
> you pick, not your draft. Commit and [deploy](/agent-builder/deploy) your
> changes before you run a simulation on them.

## Configure

![New simulation panel with the agent, branch, scenarios, and personas pickers, the Text only and Audio mode cards with their per-turn and per-minute prices, Audio selected, and the environments picker](https://cdn.zeroruntime.ai/zrt/docs-resource/agent-builder/new-simulation.png)

**1. Agent**

Choose the agent to test. Select **Add Agent** to create one in a new tab.

**2. Branch**

Choose which branch to test. Branches that serve live traffic show their share, for example *Main · 100% traffic*. Results are saved against this branch, so you can compare runs.

For a multi-language agent, the simulation uses the branch's default language.

**3. Scenarios**

Choose one or more [scenarios](/agent-builder/simulation/scenarios). Each one is judged by its own success and failure criteria. Select **Add Scenario** to write a new one without leaving the panel. It's selected as soon as you save it.

**4. Personas**

Choose one or more [personas](/agent-builder/simulation/personas) to play the caller. Each scenario is paired with every selected persona. Select **Add Persona** to create one in place.

**5. Mode**

Choose **Text only** or **Audio**. Each option shows its current price. See [Choose a mode](#choose-a-mode).

**6. Environments (audio only)**

Choose where the personas call from. Each persona calls once from every selected environment. See [Environments](#environments).

**7. Number of turns or call duration**

Set the limit for each conversation: **Number of turns** in text mode, or **Call duration** in audio mode. The panel shows the most each conversation can cost at this limit.

The bottom of the panel shows how many conversations the run will have and its estimated total. Select **Review** when you're ready.

## Choose a mode

| | **Text only** | **Audio** |
| - | - | - |
| **What it tests** | What the agent says: its instructions, LLM, tools, and knowledge base. | The full voice call: speech recognition, the agent's voice, turn-taking, interruptions, and background noise. |
| **How the caller talks** | Types messages. | Speaks on a live call. |
| **Limit per conversation** | **Number of turns**: 5 to 30, default 12. | **Call duration**: 2 to 10 minutes, default 5. |
| **Environments** | Not used. | One or more. |
| **Recording** | No. | Yes, played back in the conversation view. |
| **Best for** | Fast, cheap checks of logic and wording after every prompt change. | Checking how the agent sounds and copes with real speech before release. |

A mode the agent's pipeline doesn't support is disabled with *"Not supported by this agent's pipeline."* Text only isn't available for agents that use a [realtime model](/agent-builder/pipeline/models).

> [!TIP]
>
> Run text simulations often while you iterate on the prompt, then run audio
> simulations on the version you plan to ship.

### When a conversation ends

A **text** conversation ends when the agent ends the call, the caller says goodbye, or it reaches the turn limit.

An **audio** call ends when the caller hangs up, the agent leaves the call, or the call reaches its duration limit. If your agent doesn't join the call within 60 seconds, the conversation is stopped and not judged.

## Environments

In audio mode, the caller can call from different backgrounds to test how your agent handles noise and bad lines.

| Environment | What the agent hears |
| - | - |
| **Quiet** | A clean line. Selected by default. |
| **Noisy** | Loud background noise. |
| **Office** | Office chatter and sounds. |
| **Poor connection** | A degraded, low-quality line. |

Each environment you add multiplies the number of conversations. Two scenarios, two personas, and three environments make 12 calls.

## Review and run

The **Review and run** step shows:

![Review and run step with the simulation name field, a What will run summary of conversations, agent, branch, scenarios, and personas, and the estimated cost table](https://cdn.zeroruntime.ai/zrt/docs-resource/agent-builder/review-and-run.png)

* **Simulation name** (required): give it a name you'll recognize later, for example *Weekly regression*.
* **What will run**: the number of conversations, how they add up (for example *2 scenarios × 3 personas × 2 environments*), the mode and limit, the agent and branch, and the selected scenarios, personas, and environments. Select **Edit** to go back.
* **Estimated cost**: the cost per conversation and the total. See [Cost](#cost).

Select **Run N conversations** to start. You go straight to the run, where results appear as each conversation finishes.

## Cost

Text simulations are priced per turn and audio simulations per minute. Each conversation's cost has two parts:

| Cost | What it covers |
| - | - |
| **Agent cost** | Your agent's own models during the conversation. |
| **Judge cost** | The simulation agent: the simulated caller, and the judge that scores your agent. |

The estimate uses the turn or duration limit, so it's the most a run should cost. Conversations that end early cost less. The cost is deducted from your credits as the run progresses.

If your credits don't cover the estimate, the panel shows **Your credits are low** and disables the run. Select **Add credits** to top up.

## Limits

| Setting | Limit |
| - | - |
| Conversations per run | 500 |
| Scenarios per simulation | 50 |
| Personas per simulation | 50 |
| Number of turns (text) | 5 to 30 |
| Call duration (audio) | 2 to 10 minutes |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.