@langwatch/scenario
    Preparing search index...

    Interface RealtimeAgentAdapterConfig

    Configuration for RealtimeAgentAdapter

    interface RealtimeAgentAdapterConfig {
        agentName: string;
        mint?: false | Partial<RealtimeMintEndpoint>;
        model?: string;
        responseTimeout?: number;
        role: AgentRole;
        session: RealtimeSession;
    }
    Index
    agentName: string

    Name of the agent (for logging/identification)

    mint?: false | Partial<RealtimeMintEndpoint>

    Where to mint the session credential, overriding OPENAI_BASE_URL and OPENAI_API_KEY. false skips the mint and dials the vendor directly.

    Same option, same meaning and same default as OpenAIRealtimeAgentAdapterInit.mint.

    model?: string

    Realtime model id the session credential is minted for.

    Read from the session's own options when omitted, and from OPENAI_REALTIME_MODEL when the session names none. The gateway prices and budgets the session against this value, so it has to match the model the session actually opens with.

    responseTimeout?: number

    Timeout for waiting for agent response (ms)

    30000
    
    role: AgentRole

    The role of the agent

    session: RealtimeSession

    A RealtimeSession instance

    The session should be created using your agent's session creator function. Connect it through the adapter, which mints the session credential.

    const session = createVegetarianRecipeSession();
    const adapter = new RealtimeAgentAdapter({
    session,
    role: AgentRole.AGENT,
    agentName: "Vegetarian Recipe Assistant"
    });
    await adapter.connect();