ReadonlymessagesThe history of messages in the conversation.
ReadonlythreadThe ID of the conversation thread.
Adds an agent message to the conversation. If no content is provided, the agent under test will generate a message.
Optionalcontent: string | ModelMessageThe content of the agent message.
OptionalagentVoice-only: fire an agent turn WITHOUT awaiting it — the non-blocking
primitive behind agent({ wait: false }) (PRD §4.4). The executor tracks
the in-flight turn so a subsequent user call lands as a mid-stream
barge-in (interruption) rather than a separate turn. Optional: text-only
executors may omit it, in which case the { wait: false } step falls back
to a fire-and-forget agent() with no barge-in coordination.
Optionalcontent: string | ModelMessageEnds the scenario with a failure.
Optionalreasoning: stringOptional reasoning for the failure.
The final result of the scenario.
Invokes the judge agent to evaluate the current state.
Optionaloptions: { criteria?: string[] }Optional options with inline criteria to evaluate as a checkpoint.
The result of the scenario if the judge makes a final decision.
Adds a message to the conversation.
The message to add.
Proceeds with the scenario automatically for a number of turns.
Optionalturns: numberThe number of turns to proceed. Defaults to running until the scenario ends.
OptionalonTurn: (state: ScenarioExecutionStateLike) => void | Promise<void>Optional callback executed at the end of each turn.
OptionalonStep: (state: ScenarioExecutionStateLike) => void | Promise<void>Optional callback executed after each agent interaction.
The result of the scenario if it ends.
Ends the scenario with a success.
Optionalreasoning: stringOptional reasoning for the success.
The final result of the scenario.
Adds a user message to the conversation. If no content is provided, the user simulator will generate a message.
Optionalcontent: string | ModelMessageThe content of the user message.
The execution context for a scenario script. This provides the functions to control the flow of the scenario.