@langwatch/scenario
    Preparing search index...

    Interface ElevenLabsAgentAdapterOptions

    interface ElevenLabsAgentAdapterOptions {
        agentId: string;
        apiKey: string;
        firstMessageOverride?: string;
        silenceTailBytes?: number;
        systemPromptOverride?: string;
        turnCommitMode?: TurnCommitMode;
        webSocketFactory?: (
            url: string,
            headers: Record<string, string>,
        ) => WebSocketLike;
    }
    Index

    Properties

    agentId: string

    ID of the ElevenLabs Conversational AI agent (provisioned in the EL dashboard).

    apiKey: string

    ElevenLabs API key (xi-api-key).

    firstMessageOverride?: string

    Per-session first message override.

    silenceTailBytes?: number

    Zero-byte silence-tail length appended after user audio. Only consulted on the "silence" commit path (and the "text" fallback when no transcript is available). Defaults to SILENCE_TAIL_BYTES (~333 ms @ 24 kHz).

    systemPromptOverride?: string

    Per-session system prompt override applied via conversation_initiation_client_data. Lets demos use a different prompt shape without mutating the shared test agent.

    turnCommitMode?: TurnCommitMode

    How sendAudio commits a user turn. Defaults to "text" (explicit user_message commit) so scripted turn 2+ reliably re-engages an agent response (issue #567). Set to "silence" for the legacy pure-audio server-VAD path. See TurnCommitMode.

    webSocketFactory?: (
        url: string,
        headers: Record<string, string>,
    ) => WebSocketLike

    WebSocket factory — injected for tests. Defaults to the ws package's WebSocket constructor. Production callers should leave this unset.