Optional
turns: numberNumber of turns to proceed automatically. If undefined, proceeds until the judge agent decides to end the scenario or max_turns is reached.
Optional
onTurn: (state: ScenarioExecutionStateLike) => void | Promise<void>Optional callback function called at the end of each turn.
Optional
onStep: (state: ScenarioExecutionStateLike) => void | Promise<void>Optional callback function called after each agent interaction.
A ScriptStep function that can be used in scenario scripts.
Let the scenario proceed automatically for a specified number of turns.
This function allows the scenario to run automatically with the normal agent interaction flow (user -> agent -> judge evaluation). You can optionally provide callbacks to execute custom logic at each turn or step.