---
docId: doc_42bba6c9242a4e548eb36fd252ec5f56
title: 'Evals'
description: Run simulated conversations against one or more versions of an agent to check it answers the way you expect before you publish.
---

<script>
  import { Ways, Note, Collapsible } from '$lib/components';
</script>

# Evals

Test how an [agent](/api-reference/agents) version replies before publishing it, or compare several versions with the same simulated conversations.

1. [Create a scenario](/api-reference/evals/scenarios/create) with what the customer will say and the result you expect.
2. [Group scenarios into a suite](/api-reference/evals/suites/create).
3. [Estimate the cost](/api-reference/evals/runs/estimate) and [start the run](/api-reference/evals/runs/start).
4. [Review the results](/api-reference/evals/results).

<Note type="important">

- **They use real tools:** if the agent has a tool that books, charges or writes data, it also runs during the eval.
- **They cost messages:** every agent turn uses one internal message. [Estimate the run](/api-reference/evals/runs/estimate) before you start it.

</Note>

## Quick example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
# 1. Estimate cost and warnings before running
curl -X POST https://api.platic.ai/v1/agents/$AGENT_ID/evals/runs/estimate \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"suiteId": "'"$SUITE_ID"'", "versions": ["draft", "published"]}'

# 2. Start the run, then read the launch until it finishes
curl -X POST https://api.platic.ai/v1/agents/$AGENT_ID/evals/runs \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"suiteId": "'"$SUITE_ID"'", "versions": ["draft", "published"]}'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
// 1. Create a scenario and a suite
await platic.evals.scenarios.create({
  scenario: {
    scenarioId: "asks-price",
    title: "Asks the price",
    type: "script",
    user: { steps: ["How much is the Pro plan?"] },
    expect: { checks: [{ kind: "message_contains", text: "$49", role: "agent" }] },
  },
});
const suite = await platic.evals.suites.create({
  name: "Pricing",
  members: [{ scenarioId: "asks-price" }],
  agentId,
});

// 2. Estimate the cost, run against draft and published, and wait for results
const estimate = await platic.agents.evals.runs.estimate(agentId, {
  suiteId: suite.suiteId,
  versions: ["draft", "published"],
});
const launch = await platic.agents.evals.runs.start(agentId, {
  suiteId: suite.suiteId,
  versions: ["draft", "published"],
});
const done = await platic.agents.evals.runs.wait(agentId, launch.launchId);
```

</Ways.Way>
</Ways>

## What you need to know

- **They never block publishing:** [publishing](/api-reference/agents/publications/publish) does not wait for any eval, not even the [suites on publish](/api-reference/evals/on-publish/set) (those run afterwards).
- **Human assistance in evals:** a request that pauses the agent records an `assistance_request` and ends the trial. It creates no real cases and sends no team notifications; service hours are ignored. An escalation that allows the agent to keep replying does not end the trial.
- **Key limits:** up to 50 scenarios per suite, 1 to 4 versions per launch, 1 to 32 trials per scenario (default `4` in the API, `3` in the app), 1 to 40 turns per trial (default `12`) and 64 trials per launch by default.
- **Permissions:** requires the **Agents** permission (read to read and estimate; edit to create scenarios and suites and to run evals).

## Endpoints

| Method | Endpoint | What it does |
|--------|----------|--------------|
| `GET` | [`/v1/evals/profiles`](/api-reference/evals/scenarios/profiles) | List profiles (`general` by default) |
| `GET` / `POST` | [`/v1/evals/scenarios`](/api-reference/evals/scenarios/list) | List or [create scenarios](/api-reference/evals/scenarios/create) ([format](/api-reference/evals/scenarios/format)) |
| `POST` | [`/v1/evals/scenarios/{scenarioId}/versions`](/api-reference/evals/scenarios/new-version) | Save a new version or [archive](/api-reference/evals/scenarios/archive) |
| `GET` / `POST` / `PUT` | [`/v1/evals/suites`](/api-reference/evals/suites/list) | List, [create](/api-reference/evals/suites/create) or [replace](/api-reference/evals/suites/replace) suites |
| `POST` | [`/v1/agents/{agentId}/evals/runs/estimate`](/api-reference/evals/runs/estimate) | Estimate cost and detect warnings |
| `POST` / `GET` | [`/v1/agents/{agentId}/evals/runs`](/api-reference/evals/runs/start) | Start or [list runs](/api-reference/evals/runs/list) |
| `GET` / `POST` | [`/v1/agents/{agentId}/evals/runs/{launchId}`](/api-reference/evals/runs/get) | Get a launch, [get a trial](/api-reference/evals/runs/get-attempt) or [cancel](/api-reference/evals/runs/cancel) |
| `GET` | [`/v1/agents/{agentId}/evals/compare`](/api-reference/evals/compare) | Compare versions already run with the same suite |
| `GET` / `PUT` | [`/v1/agents/{agentId}/evals/on-publish`](/api-reference/evals/on-publish/get) | Get or [choose the suites on publish](/api-reference/evals/on-publish/set) |

To interpret runs see [Results](/api-reference/evals/results), for HTTP errors see [Errors](/api-reference/errors#evals), and for AI tools see the [Evals MCP tools](/mcp/tools#evals).

## Scenarios, suites and runs

<Collapsible summary="How a test is organized">

A **scenario** defines what the customer says and what must happen. A **suite** groups scenarios. A **launch** fixes the suite’s content and runs it against 1 to 4 versions. It produces one **run** per version, with several **trials** of each scenario.

</Collapsible>
