Documentation / Guides

Test your agent with scripted scenarios

The Testing tab runs scripted UAT conversations on the live agent, with per-turn checks.

Last updated:

Open an agent and go to the Testing tab (below Advanced). A scenario is a scripted conversation: the messages a caller or visitor would send, and what the agent must do on each turn. Runs execute against the agent's real instructions and real tools - a booking made in a test is a real booking on your calendar, so point scenarios at a test member and end them with a cancellation turn.

Do not want to write scenarios by hand? The AI Assistant button on the Scenarios tab reads the agent's configuration - its instructions and tools - and drafts UAT scenarios for you. Add an optional guidance line (for example "focus on cancellations by phone number"), review the drafts, edit any of them, and save the ones you keep.

Writing a scenario#

Each turn has the user's message and a list of checks:

  • tool - the agent must call this tool (for example check_availability before offering a time).
  • args_contain - the tool call must include these argument values.
  • tool_result_contains - the tool's result must contain this text (for example Booked).
  • reply_contains / reply_not_contains - the agent's reply must (or must not) contain this text.
  • no_tool - the turn must use no tool at all.

Write {{last_uid}} in a later message to reference the booking created earlier in the same run - useful for "cancel that appointment" turns.

Set caller_phone on the scenario to simulate the number the caller is calling from: the agent can then find their existing bookings by phone (the find_bookings tool), the way a real call recognizes the caller id.

Channels#

  • chat behaves like the web widget: call-only tools are hidden.
  • voice behaves like a phone call: the agent is asked to keep replies short and never spell out email addresses. Audio itself is not simulated - this tests what the agent decides to do.

Running#

Press Run and the full transcript comes back: every tool call with its arguments and result, the reply, and each check marked passed or failed. The tab is split into Scenarios, Run history and Reports: pick the scenarios you care about in Reports to get a pass-rate summary with the latest transcript details, and export it as an Excel file or a PDF. The same scenarios can be created and run from your own code through the API - see the API reference under Agent testing.

The console

These pages are read only. The test call, the API keys and the live API reference are in the console, where your account is signed in.

Open the console