Evals

Test how an agent version replies before publishing it, or compare several versions with the same simulated conversations.

  1. Create a scenario with what the customer will say and the result you expect.
  2. Group scenarios into a suite.
  3. Estimate the cost and start the run.
  4. Review the results.

Quick example

// 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);

What you need to know

  • They never block publishing: publishing does not wait for any eval, not even the suites on publish (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

MethodEndpointWhat it does
GET/v1/evals/profilesList profiles (general by default)
GET / POST/v1/evals/scenariosList or create scenarios (format)
POST/v1/evals/scenarios/{scenarioId}/versionsSave a new version or archive
GET / POST / PUT/v1/evals/suitesList, create or replace suites
POST/v1/agents/{agentId}/evals/runs/estimateEstimate cost and detect warnings
POST / GET/v1/agents/{agentId}/evals/runsStart or list runs
GET / POST/v1/agents/{agentId}/evals/runs/{launchId}Get a launch, get a trial or cancel
GET/v1/agents/{agentId}/evals/compareCompare versions already run with the same suite
GET / PUT/v1/agents/{agentId}/evals/on-publishGet or choose the suites on publish

To interpret runs see Results, for HTTP errors see Errors, and for AI tools see the Evals MCP tools.

Scenarios, suites and runs

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.