Member Junction
    Preparing search index...

    Interface RealtimeSessionParams

    Parameters used to open a IRealtimeSession via BaseRealtimeModel.StartSession.

    interface RealtimeSessionParams {
        Config?: JSONObject;
        InitialContext?: string;
        MaxSessionSeconds?: number;
        Model: string;
        SystemPrompt: string;
        Tools?: RealtimeToolDefinition[];
    }
    Index

    Properties

    Config?: JSONObject

    Optional open, provider-specific configuration bag (e.g. voice, language, turn-taking settings, or per-conversation override fields). Typed as a JSON object rather than any so it stays serializable and inspectable.

    InitialContext?: string

    Optional initial context to seed the conversation (e.g. the prior conversation history and retrieved memory) so the model starts with the same context a loop agent assembles.

    MaxSessionSeconds?: number

    Optional server-authoritative hard ceiling on the session's wall-clock duration, in seconds. Set for abuse-sensitive deployments (e.g. a public web-widget guest's VoiceMaxSessionMinutes). Drivers that support a provider-side session-duration / token-expiry bound SHOULD apply min(providerDefault, MaxSessionSeconds) so the provider drops the connection at the cap; drivers that don't simply ignore it. Independently, the server stamps the absolute deadline on the session and the session janitor hard-closes (finalizing runs) at the cap regardless of driver support, so this is enforced server-side even when the provider can't be told.

    When unset (undefined/null) there is NO MJ-imposed duration cap: drivers apply no min(...) bound and the janitor stamps no extra deadline, so the session runs under the provider's own default session/token limits and MJ's normal session lifecycle (manual end, disconnect, idle cleanup). This is the default for authenticated/internal sessions, which don't need an abuse cap.

    Model: string

    The API name of the realtime model to use (the MJ: AI Model Vendors API name for the driver's provider).

    SystemPrompt: string

    The system prompt that establishes the model's persona and behavior for the session.

    Optional set of tools to register at session start. Equivalent to calling IRealtimeSession.RegisterTools immediately after the session opens; drivers may register these eagerly when the provider accepts tool schemas at session start.