Skip to content
providerkit
GitHub

AgUiReaderOptions

Defined in: react/src/ag-ui/types.ts:181

binding: AgUiBinding;

Defined in: react/src/ag-ui/types.ts:173

AgUiOptions.binding


optional error?: (failure) => DisplayError;

Defined in: react/src/ag-ui/types.ts:189

Parameter Type
failure { code?: string; message: string; }
failure.code? string
failure.message string

DisplayError


optional label?: (toolName) => string;

Defined in: react/src/ag-ui/types.ts:182

Parameter Type
toolName string

string


optional limits?: AgUiLimits;

Defined in: react/src/ag-ui/types.ts:174

AgUiOptions.limits


optional project?: (event) =>
| readonly ChatEvent[]
| undefined;

Defined in: react/src/ag-ui/types.ts:195

Explicit safe projection for activity, reasoning, RAW and non-providerkit CUSTOM events.

Parameter Type
event AgUiEvent

| readonly ChatEvent[] | undefined


optional projectPart?: (part) =>
| DisplayPart
| undefined;

Defined in: react/src/ag-ui/types.ts:178

Explicitly project opaque fields (data, input, forms and edits). Return a rebuilt part, not a spread of raw data. Without this callback these fields stay hidden. Functions, capabilities and reserved credential fields are refused even here.

Parameter Type
part DisplayPart

| DisplayPart | undefined

AgUiOptions.projectPart


optional request?: (interrupt) =>
| RequestPart
| undefined;

Defined in: react/src/ag-ui/types.ts:188

Parameter Type
interrupt AgUiInterrupt

| RequestPart | undefined


optional state?: (snapshot) => readonly DisplayPart[];

Defined in: react/src/ag-ui/types.ts:193

No shared state is retained without this callback. Patch failures leave it unchanged.

Parameter Type
snapshot unknown

readonly DisplayPart[]


optional text?: (source) => boolean;

Defined in: react/src/ag-ui/types.ts:191

Native child text is private unless this host callback selects it.

Parameter Type
source { messageId: string; role: string; subagentRunId?: string; }
source.messageId string
source.role string
source.subagentRunId? string

boolean


optional tool?: (result) =>
| Pick<ToolPart, "data" | "summary" | "detail">
| undefined;

Defined in: react/src/ag-ui/types.ts:183

Parameter Type
result { content: string; name: string; toolCallId: string; }
result.content string
result.name string
result.toolCallId string

| Pick<ToolPart, "data" | "summary" | "detail"> | undefined