Scenario format

Define what the customer will say and what the agent should achieve in a test conversation. Choose type: "script" to write the customer’s messages, or type: "persona" to let an AI converse as the customer you describe. Send the content in scenario when you create or update the test.

A scenario's content

Use these fields to create a scenario or save a new version. List scenarios returns the same content with defaults applied.

{
  "scenarioId": "books_tuesday_appointment",
  "title": "Books an appointment",
  "profileId": "general",
  "type": "script",
  "user": {
    "steps": ["Hi, I want to book an appointment", "Tuesday afternoon", "Under the name Ana López"]
  },
  "expect": {
    "outcome": "The agent asks only for the missing details and confirms the day and time.",
    "checks": [
      { "kind": "tool_called", "tool": "book_appointment", "argsInclude": { "name": "Ana López" } },
      { "kind": "message_contains", "text": "Tuesday", "severity": "should" },
      { "kind": "assistance_requested", "expected": false }
    ]
  },
  "run": { "nTrials": 3 }
}
FieldDescription
scenarioIdYou choose it when you create: unique in the workspace (up to 200 characters). When you add a version it comes from the route.
titleDisplay name.
profileIdOptional when you create: if you do not send it, general. Required in a new version. See profiles.
typescript (you write the customer's messages) or persona (an AI converses as the customer you describe).
user.stepsScript: the customer's messages, in order. At least one and no more than run.maxTurns.
user.personaPersona: who the customer is and how they write.
user.goalPersona: what they want to achieve. Required in a persona.
user.behaviorsPersona: how they behave, one sentence per element.
user.factsPersona: details the persona knows and can give, for example { "name": "Luis" }.
expect.outcomeExpected result, in words. An AI checks it against the complete conversation.
expect.processHow it must reach the result, in words. An AI checks it against the conversation in order.
expect.checksExact checks.
run.nTrialsHow many times it repeats (1–32). If you do not send it, 4; the platform creates scenarios with 3.
run.maxTurnsMaximum agent turns (1–40). If you do not send it, 12.

A scenario needs at least one check, an outcome or a process. A trial passes when all the must checks, the outcome and the process are met (see Results).

Checks

All accept severity: must (the default; if it fails, the trial does not pass) or should (it is reported, but does not make it fail).

kindFieldsIt is met when…
message_containstext, role (agent by default, or user), caseSensitive (false)Some message of that role includes the text.
tool_calledtool, argsInclude (optional)The agent calls the tool at least once. With argsInclude, each key must be equal in the arguments of some call.
tool_not_calledtoolThe agent never calls the tool.
tool_called_beforefirst, thenfirst is called before then.
tool_call_sequencecalls: [{ "tool", "argsInclude"? }]The calls happen in that order. There can be others before, after or between them.
assistance_requestedexpected (true or false)true: the agent asked a person for help at some point. false: it never asked. To not check it, leave it out.

Tools are named as the agent sees them. They are the agent's real tools: there are no simulated tools.

If assistance_requested has expected: true, assistance is disabled for the evaluated version and no request is recorded, the check fails with La versión probada no tiene activada la asistencia. See human assistance in evals.

Profiles

profileId says what type of agent the scenario targets. Today there are two: general (any agent) and sales (sales). The full catalog comes from List profiles. When you create, if you do not send it, it takes general; in a new version you have to send it.

Versions

Every change saves the next version (version) with New version of a scenario. Versions never change:

  • Suites that pinned a version (members[].version) keep using it; the others take the new one in their next run.
  • A run freezes each scenario's version when it starts, and the trial reports it in scenarioVersion.
  • contentHash is the content's fingerprint: two versions with the same content have the same one.
  • Archiving a scenario archives all its versions; past runs keep their conversations.

Whoever writes the scenario is recorded in proposedBy: agent if the platform's AI agent builder wrote it, user otherwise. Both are active immediately.

What is no longer accepted

Scenario scope and metadata

There are scenarios of two scopes (scope):

  • workspace: the ones in your workspace.
  • platform: the ones Platica shares with everyone. They cannot be archived. Adding a version to one creates a copy in your workspace.

The content has no workspace, agent or author IDs. If you send workspaceId, agentId, revisionId, createdBy or updatedBy at the first level of scenario, they are discarded. Inside the content nothing is touched: for example, an agentId in expect.checks[].argsInclude is respected.