# MaelstromRealtimeBaseOptions
Source: https://docs.maelstrom-ai.co/dev/reference/react-realtime/interfaces/maelstromrealtimebaseoptions/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:108](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L108)

Options shared by every opening configuration of [maelstromRealtime](https://docs.maelstrom-ai.co/dev/reference/react-realtime/functions/maelstromrealtime/).

## Type Parameters

### Provider

`Provider` = `undefined`

## Properties

### conversationInstructions?

> `readonly` `optional` **conversationInstructions?**: `string`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:126](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L126)

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

* * *

### createAdapter

> `readonly` **createAdapter**: (`context`) => `RealtimeProviderAdapter`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:135](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L135)

Builds one provider adapter for each shared session. The factory receives the orchestrator session identifier and the provider, and is not called per render or hook. If building the session fails after it returns, the adapter is disconnected.

#### Parameters

##### context

[`CreateAdapterContext`](https://docs.maelstrom-ai.co/dev/reference/react-realtime/type-aliases/createadaptercontext/)<`Provider`\>

#### Returns

`RealtimeProviderAdapter`

* * *

### debug?

> `readonly` `optional` **debug?**: `boolean`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:164](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L164)

Enables verbose tracing in the underlying session.

* * *

### groundingDebounceMs?

> `readonly` `optional` **groundingDebounceMs?**: `number`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:156](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L156)

Debounce window for latest-wins grounding pushes.

* * *

### initialProvider?

> `readonly` `optional` **initialProvider?**: `Provider` | (() => `Provider`)

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:124](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L124)

Provider of each Orchestrator’s first session; defaults to the first entry of `providers`. A function is read lazily, when that first session is built. Afterwards the extension remembers the last chosen provider per Orchestrator, so a remount keeps it. When `providers` is set, the selection must belong to that list; an unknown value throws `RangeError` before the first adapter is built.

* * *

### onEvent?

> `readonly` `optional` **onEvent?**: (`event`) => `void`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:162](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L162)

Observes the stable, additive-only sidechannel stream of every session: tool calls and results, transcripts and `submit_intent` timings. Turn-mode diagnostics are excluded.

#### Parameters

##### event

`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

`void`

* * *

### onSession?

> `readonly` `optional` **onSession?**: (`session`, `context`) => `void` | (() => `void`)

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:148](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L148)

Attaches app wiring, such as diagnostics subscriptions on RealtimeSession.events, to each session the extension builds. It runs once per session, synchronously while the session is built, which can happen during render, so it must not update React state directly. An optional returned cleanup runs after the session has disconnected, when a provider switch replaces it or its last consumer unmounts. Subscriptions the cleanup leaves in place keep observing the retired session, which still reports requests that settle late. Throwing aborts the build.

#### Parameters

##### session

`RealtimeSession`

##### context

[`RealtimeSessionContext`](https://docs.maelstrom-ai.co/dev/reference/react-realtime/interfaces/realtimesessioncontext/)<`Provider`\>

#### Returns

`void` | (() => `void`)

* * *

### providers?

> `readonly` `optional` **providers?**: readonly `Provider`\[\]

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:115](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L115)

Voice providers this extension can switch between, for example `['live', 'realtime']`. The list types [UseVoiceResult.switchProvider](https://docs.maelstrom-ai.co/dev/reference/react-realtime/interfaces/usevoiceresult/#switchprovider), which rejects any other value. An empty list throws `RangeError`. Omit it for a single-provider extension.

* * *

### sendAgentMessage?

> `readonly` `optional` **sendAgentMessage?**: (`orchestrator`, `text`) => `AgentMessageSubmission`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:181](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L181)

Sends each voice `submit_intent` intent to the agent instead of the intent scheduler, normally by returning `orchestrator.sendMessage(text, { source: 'voice' })` from the app’s own submit path. The tool call is answered from the submission’s `result` once the input settled. A finished run with the `ui_only` disposition is answered with the screen summary and its reply. Other finished runs answer with the reply alone, because their UI changes can still be applying. An ignored input is answered as not acted on, a failure with its message, a lost input as unconfirmed and never resent, and a message that never left the client as not submitted. A throw is reported as unconfirmed. It is opt-in because `HttpConnector` and hosts that answer agent inputs with plain `handleEnvelope` cannot serve agent inputs.

The agent loop is experimental in 0.3 and may change in any minor release.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

#### Parameters

##### orchestrator

`Orchestrator`

##### text

`string`

#### Returns

`AgentMessageSubmission`

* * *

### summarize?

> `readonly` `optional` **summarize?**: `SummarizeFn`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:154](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L154)

Overrides the deterministic structural-summary fallback.

* * *

### transcript?

> `readonly` `optional` **transcript?**: `ContinuousTranscriptOptions`

Defined in: [packages/react-realtime/src/lib/maelstrom-realtime.ts:128](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/react-realtime/src/lib/maelstrom-realtime.ts#L128)

Bounds and grouping policy for the opt-in continuous transcript channel.
