@langwatch/scenario
    Preparing search index...

    Interface AgentInput

    Input provided to an agent's call method.

    interface AgentInput {
        judgmentRequest?: JudgmentRequest;
        messages: ModelMessage[];
        newMessages: ModelMessage[];
        propagationHeaders?: Record<string, string>;
        requestedRole: AgentRole;
        scenarioConfig: ScenarioConfig;
        scenarioState: ScenarioExecutionStateLike;
        threadId: string;
    }
    Index
    judgmentRequest?: JudgmentRequest

    When set, requests the judge to produce a verdict, optionally with inline criteria.

    messages: ModelMessage[]

    The full history of messages in the conversation.

    newMessages: ModelMessage[]

    New messages added since the last time this agent was called.

    propagationHeaders?: Record<string, string>

    W3C trace context headers for the current turn, built by injecting the active OpenTelemetry context at AgentInput construction time. Contains traceparent (and tracestate when set); the traceparent's trace id equals the trace id stamped on this turn's messages. Empty object when no span is active.

    Always set by the scenario runtime at call time; optional so hand-built inputs keep compiling.

    HTTP adapters spread these onto their outgoing request headers so the remote agent's spans join the turn's trace:

    await fetch(url, {
    headers: { "Content-Type": "application/json", ...input.propagationHeaders },
    ...
    });
    requestedRole: AgentRole

    The role the agent is being asked to play in this turn.

    scenarioConfig: ScenarioConfig

    The configuration for the current scenario.

    The current state of the scenario execution.

    threadId: string

    A unique identifier for the conversation thread.