Skip to main content
POST
Create a simulation test

Authorizations

X-Api-Key
string
header
required

Headers

X-Api-Key
string
required

Api key to pass as a X-Api-Key request header.

Body

Simulation test to create

agentId
string
required

Agent owning the test

Minimum string length: 1
name
string
required
Minimum string length: 1
scenario
string
required

Persona and intent of the simulated user

Minimum string length: 1
criteria
string[]
required

Success criteria in plain text, each judged independently (at least one)

maxTurns
integer<int32>

Maximum number of user/agent exchanges (1-30)

conversationContext
object[] | null

Messages the conversation starts from, in chronological order. Empty starts from scratch. When the last message is from the assistant the simulated user answers it; when it is from the user the agent answers it first.

variables
object | null

Values of the agent variables (name → value) used to render the prompt

toolMocking
object

Which tools of the agent are mocked (not really executed) during a simulation. Every mock is opt-in: nothing is mocked unless asked for here, and mockAllTools does not imply mockCallTransfer. The knowledge base retrieval always runs for real.

folderId
string | null

Folder of the agent; null for the root

Response

Success

A test of an agent. Depending on kind, either the simulation fields (scenario, criteria, maxTurns, variables) or the classification fields (conversationContext, tagExpected) are set.

id
string | null
kind
enum<string>
Available options:
Simulation,
Classification
agentId
string | null
folderId
string | null

Folder containing the test, null at the root

name
string | null
lastRunId
string | null

Most recent run of the test

lastRunStatus
enum<string>
Available options:
Queued,
Running,
Passed,
Failed,
Error,
Cancelled
lastRunAt
string<date-time> | null
createdAt
string<date-time>
updatedAt
string<date-time>
scenario
string | null

Simulation only: persona and intent of the simulated user

criteria
string[] | null

Simulation only: success criteria, each judged independently

maxTurns
integer<int32> | null

Simulation only: maximum number of user/agent exchanges (1-30)

conversationMessages
object[] | null

Simulation only: messages the conversation starts from, in chronological order; empty when the run starts from scratch

variables
object | null

Simulation only: values of the agent variables (name → value)

toolMocking
object

Which tools of the agent are mocked (not really executed) during a simulation. Every mock is opt-in: nothing is mocked unless asked for here, and mockAllTools does not imply mockCallTransfer. The knowledge base retrieval always runs for real.

conversationContext
object

Conversation used as input of a classification test

tagExpected
string | null

Classification only: expected tag