AAI SDK
    Preparing search index...

    Type Alias SessionStartOptions

    Per-session options passed to AgentRuntime.startSession.

    type SessionStartOptions = {
        audioLeadMs?: number;
        logContext?: Record<string, string>;
        onClose?: () => void;
        onOpen?: () => void;
        onSessionEnd?: (sessionId: string, sink?: ClientSink) => void;
        onSinkCreated?: (sessionId: string, sink: ClientSink) => void;
        resumeFrom?: string;
        skipGreeting?: boolean;
    }
    Index
    audioLeadMs?: number

    Audio pacing lead for this session, in ms. The default suits a client that plays audio in real time (a browser); pass UNPACED_AUDIO_LEAD_MS for a programmatic client that buffers and meters playback itself.

    logContext?: Record<string, string>
    onClose?: () => void
    onOpen?: () => void
    onSessionEnd?: (sessionId: string, sink?: ClientSink) => void

    Called with session ID after session cleanup, for guest state cleanup. sink is the ending connection's own client sink; compare it against the sink the latest onSinkCreated delivered before releasing per-session state — a resume can register a NEW session under the same id while the old one drains, and a bare keyed cleanup here would tear down the live resumed session's state.

    onSinkCreated?: (sessionId: string, sink: ClientSink) => void

    Called with session ID and client sink after session setup. Used by sandbox to route custom events.

    resumeFrom?: string
    skipGreeting?: boolean