RealtimeSessionOptions
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:142
Options for constructing a RealtimeSession.
Properties
Section titled “Properties”adapter
Section titled “adapter”
readonlyadapter:RealtimeProviderAdapter
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:151
conversationInstructions?
Section titled “conversationInstructions?”
readonlyoptionalconversationInstructions?: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.
debug?
Section titled “debug?”
readonlyoptionaldebug?:boolean
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:170
Enable verbose debug tracing (default false).
generatedOpening?
Section titled “generatedOpening?”
readonlyoptionalgeneratedOpening?: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.
instructions
Section titled “instructions”
readonlyinstructions:string
greeting?
Section titled “greeting?”
readonlyoptionalgreeting?: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.
coordinator
Section titled “coordinator”
readonlycoordinator:GreetingCoordinator
readonlytext:string
groundingDebounceMs?
Section titled “groundingDebounceMs?”
readonlyoptionalgroundingDebounceMs?:number
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:160
Debounce window for latest-wins grounding pushes. Defaults to 1000ms.
instance
Section titled “instance”
readonlyinstance:RealtimeInstance
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:152
memory?
Section titled “memory?”
readonlyoptionalmemory?: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.
onEvent?
Section titled “onEvent?”
readonlyoptionalonEvent?: (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.
Parameters
Section titled “Parameters”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"; }>
Returns
Section titled “Returns”void
sessionId
Section titled “sessionId”
readonlysessionId: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).
summarize?
Section titled “summarize?”
readonlyoptionalsummarize?:SummarizeFn
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:161
transcript?
Section titled “transcript?”
readonlyoptionaltranscript?:ContinuousTranscriptOptions
Defined in: packages/realtime/src/lib/realtime-session/realtime-session.types.ts:150
Bounds and display grouping policy for the continuous transcript channel.