Skip to Content

Testing agents

Call your agent with a simulated caller, grade what happened, and gate your deploys on the result.

An eval run: a pass rate, a verdict, and the check that failed.

An eval calls your agent with a simulated caller — angry, confused, refusing to verify their identity — and grades the conversation.

Test before you deploy

A prompt change that fixes one thing quietly breaks another, and you find out from a customer. Run the same suite before every deploy and you know the new version still reads the disclosure, still escalates when it should, and still refuses to read back a card number.

Use the same suite across versions so you can compare measured results, not just the few calls you happened to listen to.

Three pieces

  1. A suite holds scenarios — who's calling and what they're trying to do.
  2. Checks grade the conversations. Reusable, attached to a suite with a weight and an optional blocking flag.
  3. A run executes a suite against one pinned agent version and produces a score and a pass/fail.

Editing a check changes how the next run grades. Verdicts already recorded never change under you.

Create a suite

A suite is a slug and a name — nothing else is required:

{
  "slug": "support_regression",
  "name": "Support regression",
  "description": "Core escalation and refund scenarios."
}

Over the API: POST /v1/eval-suites.

The slug is permanent. Scenarios and checks are separate resources, so a new suite needs nothing else to exist.

Add scenarios

A scenario is one caller situation: who they are (persona_text) and what they're trying to do (scenario_text).

{
  "slug": "angry_refund",
  "label": "Angry refund request, no order number",
  "persona_text": "You bought a policy 40 days ago and want a refund. You are irritated, you talk over interruptions, and you do not have your policy number to hand. You will give your date of birth but not your full card number.",
  "scenario_text": "Demand a full refund. Push back once if told about the 30-day window."
}

Over the API: POST /v1/eval-suites/{id}/scenarios.

Write personas like a mystery-shopper brief. Disposition, constraints, what they know, what they won't reveal. A persona that cooperates perfectly tests nothing — the version that breaks is the one that meets a caller who won't follow the script.

Or generate them

Point the generator at an agent and say what to focus on:

{
  "agent_id": "AGENT_ID",
  "count": 20,
  "context_text": "Focus on refund edge cases and identity verification."
}

Over the API: POST /v1/eval-suites/{id}/generate.

We read the agent's configuration and draft scenarios into the suite. Poll the returned job until it's done. Generated scenarios are ordinary rows — edit them, archive them, keep the good ones.

This is the fastest way to get from an empty suite to something worth running. Then rewrite the three that matter by hand.

Permissions

Evals need the evals add-on for your workspace and the scope for the action you want to take. Live-tool runs also need explicit permission to execute real tools. Each endpoint’s requirements strip lists its scopes; see running evals before granting live-tool access.

Next

Attach checks — start from the built-in templates — then run the suite against the version you're about to deploy.

New suites don't need the definition field. It carries older suite fields — rubric, assertions and personas — which we mirror into scenarios.

See also

Checks · Running a suite · Agents

On this page