Interface AgentDefinition<ProcessUserData>

interface AgentDefinition<ProcessUserData> {
    entry: ((ctx) => Promise<void>);
    onSimulationEnd?: ((ctx) => unknown);
    prewarm?: ((proc) => unknown);
}

Type Parameters

  • ProcessUserData = Record<string, unknown>

Properties

entry: ((ctx) => Promise<void>)

Type declaration

onSimulationEnd?: ((ctx) => unknown)

Called when a simulation run driving this agent ends. Read the simulator's verdict via ctx.simulatorVerdict and veto a pass from your own checks with ctx.fail(reason). Never called for normal sessions.

Type declaration

prewarm?: ((proc) => unknown)

Type declaration