Skip to content

RealtimeSessionOptions

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:142

Options for constructing a RealtimeSession.

readonly adapter: RealtimeProviderAdapter

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:151


readonly optional conversationInstructions?: string

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:148

Conversation-only instructions for adapters with a separate managed tool backend.


readonly optional debug?: boolean

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:170

Enable verbose debug tracing (default false).


readonly optional generatedOpening?: object

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:146

Optional natural introduction. One attempt per memory lifetime; use an explicit language in these trusted instructions. Cannot accompany a fixed greeting.

readonly instructions: string


readonly optional greeting?: object

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:182

Optional one-shot spoken greeting. The coordinator is owned by the maelstrom-realtime layer (one per Orchestrator) so session recreation reuses retained proofs. Never constructed inside RealtimeSession.

The greeting shares the once-per-memory introduction with generatedOpening: it claims the memory right before speech is sent, and an introduction another opening already claimed in the same memory, for example before a provider switch, settles it without speaking. Retries after its own not_started attempts still follow the coordinator.

readonly coordinator: GreetingCoordinator

readonly text: string


readonly optional groundingDebounceMs?: number

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:160

Debounce window for latest-wins grounding pushes. Defaults to 1000ms.


readonly instance: RealtimeInstance

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:152


readonly optional memory?: RealtimeSessionMemory

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:144

Shared evidence owner for this sessionId. Retain across provider/session recreation; React supplies it automatically.


readonly optional onEvent?: (event) => void

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:168

Observes the stable, additive-only SidechannelEvent stream: tool calls and results, legacy and greeting transcripts, and update_ui timings. It is served by a subscriber on the session’s event stream, so a throwing observer is isolated and logged. Turn-mode changes are excluded.

Readonly<{ at: number; final: boolean; role: "user" | "assistant"; sessionId: SessionId; text: string; type: "transcript"; }> | Readonly<{ argumentsJson: string; at: number; callId: ToolCallId; name: string; sessionId: SessionId; type: "tool_call"; }> | Readonly<{ at: number; callId: ToolCallId; latencyMs: number; ok: boolean; sessionId: SessionId; type: "tool_result"; }> | Readonly<{ at: number; label: string; ms: number; sessionId: SessionId; type: "timing"; }>

void


readonly sessionId: SessionId

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:158

Maelstrom session this realtime session belongs to. Stamped onto every emitted SidechannelEvent. Must match the session the instance runs under (e.g. the Orchestrator’s own session).


readonly optional summarize?: SummarizeFn

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:161


readonly optional transcript?: ContinuousTranscriptOptions

Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:150

Bounds and display grouping policy for the continuous transcript channel.