Open History to see the last commit
function uiMessagesToWire(messages, options?): WireMessage[];
Defined in: packages/ai/src/utilities/ag-ui-wire.ts:85
Serialize TanStack UIMessages and ModelMessages into the AG-UI
RunAgentInput.messages wire shape. Anchors are spec-only (id, role,
name, content, toolCalls, metadata). Tool results and thinking parts
on assistant messages are additionally emitted as fan-out
{role:'tool',...} and {role:'reasoning',...} entries for strict AG-UI
server consumers. Set includeSnapshotStructuredOutput to retain complete
structured-output metadata for UI snapshots.
Parameters#
messages#
(
| UIMessage<unknown>
| ModelMessage<
| string
| ContentPart<unknown, unknown, unknown, unknown, unknown>[]
| null>)[]
options?#
includeSnapshotStructuredOutput#
boolean