> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Interface: OpenUiRendererRuntimeProps

Props for rendering raw OpenUI response text with parsing, runtime state,
actions, and query execution.

## Properties

### initialQueryResults?

> `optional` **initialQueryResults?**: `Readonly`\<`Record`\<`string`, `unknown`>>

Prefetched Query results keyed by Query assignment name (statement ID).
Results render synchronously, then an optional toolProvider revalidates.

***

### initialState?

> `optional` **initialState?**: `Record`\<`string`, `unknown`>

Initial persisted state. $-prefixed keys hydrate reactive bindings.

***

### isStreaming?

> `optional` **isStreaming?**: `boolean`

Whether model generation is active. Partial output renders while Query
execution, mutation registration, and built-in interactions wait.
Set false only after successful completion, even if response is unchanged.
On failure or cancellation, clear response instead of completing partial text.

#### Default Value

```ts
false
```

***

### library

> **library**: [`Library`](/next/api/genui/openui/core/type-aliases/Library.md)

Component library from createOpenUiLibrary().

***

### onAction?

> `optional` **onAction?**: (`event`: [`ActionEvent`](/next/api/genui/openui/core/interfaces/ActionEvent.md)) => `void`

Callback when a component triggers a host action.

#### Parameters

| Parameter | Type                                                                   |
| --------- | ---------------------------------------------------------------------- |
| `event`   | [`ActionEvent`](/next/api/genui/openui/core/interfaces/ActionEvent.md) |

#### Returns

`void`

***

### onError?

> `optional` **onError?**: (`errors`: [`OpenUIError`](/next/api/genui/openui/core/interfaces/OpenUIError.md)\[]) => `void`

Structured parser/runtime/query errors for correction loops.

#### Parameters

| Parameter | Type                                                                      |
| --------- | ------------------------------------------------------------------------- |
| `errors`  | [`OpenUIError`](/next/api/genui/openui/core/interfaces/OpenUIError.md)\[] |

#### Returns

`void`

***

### onParseResult?

> `optional` **onParseResult?**: (`result`: [`ParseResult`](/next/api/genui/openui/core/interfaces/ParseResult.md) | `null`) => `void`

Called whenever the raw parse result changes.

#### Parameters

| Parameter | Type                                                                             |
| --------- | -------------------------------------------------------------------------------- |
| `result`  | [`ParseResult`](/next/api/genui/openui/core/interfaces/ParseResult.md) \| `null` |

#### Returns

`void`

***

### onStateUpdate?

> `optional` **onStateUpdate?**: (`state`: `Record`\<`string`, `unknown`>) => `void`

Called whenever $variables or form state changes.

#### Parameters

| Parameter | Type                           |
| --------- | ------------------------------ |
| `state`   | `Record`\<`string`, `unknown`> |

#### Returns

`void`

***

### queryLoader?

> `optional` **queryLoader?**: `ReactNode`

Custom loading node shown while Query() calls are in flight.

***

### response

> **response**: `string` | `null`

Full accumulated OpenUI Lang text, or null to clear the rendered output.
Append model deltas before passing this prop; completed statements are
cached by the renderer's incremental parser. Replacing text resets parsing.
Clearing text does not reset form state; use a new key for a fresh session.

#### Example

```tsx
<OpenUiRenderer response={accumulatedText} isStreaming={isGenerating} library={library} />
```

***

### toolProvider?

> `optional` **toolProvider?**: [`ToolProviderInput`](/next/api/genui/openui/core/type-aliases/ToolProviderInput.md)

Tool provider for Query()/Mutation(): function map or MCP client.
