Readonly
messagesThe history of messages in the conversation.
Readonly
threadThe 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.
Optional
content: string | CoreMessageThe content of the agent message.
Ends the scenario with a failure.
Optional
reasoning: stringOptional reasoning for the failure.
The final result of the scenario.
Invokes the judge agent to evaluate the current state.
Optional
content: string | CoreMessageOptional message to the judge.
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.
Optional
turns: numberThe number of turns to proceed. Defaults to running until the scenario ends.
Optional
onTurn: (state: ScenarioExecutionStateLike) => void | Promise<void>Optional callback executed at the end of each turn.
Optional
onStep: (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.
Optional
reasoning: 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.
Optional
content: string | CoreMessageThe content of the user message.
The execution context for a scenario script. This provides the functions to control the flow of the scenario.