# Test procedures

Chat with your working copy in Preview and run saved AI-played simulations before publishing changes to live customers.

Open the testing panel with the test-tube button in any [procedure's](/ai/procedures/) header. Both tabs (**Preview** and **Simulations**) test your working copy without sending a message to a real customer or touching your live backend.

## Preview: chat as a customer

**Preview** runs the real dimmi agent with the same prompt, tools, help center, and live procedures a customer gets. Two safeguards keep testing safe: no conversation is saved, and no [action](/ai/actions/) hits your production systems. Each action answers with the response from its last live test under **Settings → Actions**.

Send a message and watch each step happen in real time:

- **Live activity log:** shows the matched procedure, each finished step, every action called or refused, safety checks, and handovers as they run.
- **Clean reply view:** once the reply lands, the log folds behind one line that you can click open anytime.
- **Inline write checks:** actions that need confirmation show **Confirm as the customer** or **Approve as a teammate** right in the thread.

Click the **+** button in the reply box to choose who you are testing as:

- **Customer:** search by name or email to test with that real customer's ID, email, and attributes.
- **Made-up customer:** dimmi picks a name and email, and you set their plan, signed-in state, and custom attributes.
- **Conversation:** search by words, customer, or number, then press send to replay that real thread against your draft.

## Simulations: chats that must keep working

A simulation is a saved customer conversation your procedure must keep handling right as you edit it. Chat in **Preview** and click **Save as simulation** above the thread, or create one directly on the **Simulations** tab.

![The Simulations side panel showing Duplicate $49 charge in March with four numbered callouts: 1 Pass status and Run button, 2 simulated conversation and actions called, 3 passed exact and plain-English checks, and 4 input to add a new plain-English check](https://trydimmi.com/docs/shots/procedure-simulations-light.webp)

1. **Verdict and replay:** shows when the simulation last passed or failed, with **Run** to replay it against your current working copy.
2. **Replayed conversation:** displays the customer's messages, dimmi's replies, and badges for every action called.
3. **Checks:** lists exact checks (procedure matched, actions called, branch taken, handover) alongside plain-English checks that dimmi grades against the reply.
4. **Add a check:** write any new expectation in plain words, such as `explains the 5 to 10 day card timeline`.

### How AI-played simulations run

When you run a simulation, the customer from the saved chat is played again:

- **Saved messages go out as written:** each one is sent word for word, in order, and only once.
- **An AI answers the agent's questions:** when the agent asks for something, an AI replies as the customer, using only the saved chat and the simulation's scenario. It never leads the agent or invents details.
- **A scenario says who the customer is:** a few sentences on who they are and what they came for, like `A prospect shipping 300 parcels a month wants a plan recommendation. They have not asked to buy anything.` dimmi writes it when you save the chat, and you can edit it. The simulated customer only agrees to what the scenario or the saved chat shows they want.
- **Flags missing details:** if your edited procedure asks for something the saved customer never knew, the customer says they do not know and dimmi marks that turn.
- **Pinned to the saved date:** every simulation runs on the exact day its chat happened, so date-based rules (like a 30-day refund window) give the same answer every time.
- **Safe mock actions:** actions never run for real; each returns its saved test response from **Settings → Actions**.

### Example: checking a refund scenario

Here is a saved simulation for a duplicate-charge procedure:

- **Customer:** Made-up customer (`plan: pro`, signed in)
- **Saved message:** `We were charged twice for March. Can you refund one?`
- **Checks:**
  - `dimmi followed this procedure` (exact check)
  - `Look up charges was called` (exact check)
  - `Refund a charge was called` (exact check)
  - `Step 2 took Then` (exact check)
  - `dimmi's reply explains the 5 to 10 day card timeline` (plain-English check)

Saved chats start with automatic exact checks for the matched procedure, actions called, branch sides taken, and handover outcome. Open any simulation to remove a check with **✕** or add a plain-English check.

### Running simulations before publishing

Each run streams live, turn by turn. A different model from the one that wrote the replies then judges your plain-English checks, so the agent never grades its own work. It reads the whole conversation and gives each check a verdict with a one-sentence reason, shown under the check. If you disagree with a reason, the check is usually too loose: reword it to say what you mean.

If the judge can't answer, it is asked once more. If it still can't, the run fails with an error asking you to run it again. It never counts as a pass.

On an install with no built-in models, a decision model judges instead. It gives no reason, and it can also end a check as unsure, shown with a question mark, which does not fail the simulation.

Click **Run all** to run every simulation against your working copy. The editor shows how many passed right beside **Publish**. Preview and simulation runs are tallied on their own. They never count toward the agent's monthly spend cap, so testing can't stop it answering customers.

<Callout type="note" title="Availability for self-hosted workspaces">
  Workspaces using dimmi's built-in AI models get AI-played simulations out of the box. Self-hosted workspaces without built-in models enabled can still test drafts manually in **Preview**.
</Callout>

Once your tests pass and your procedure is live, see [Versions and analytics](/ai/procedure-versions/) to compare edits, roll back changes, and audit live performance.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
