chat — @personaai/sdk
Generated field tables for chat — do not edit
Generated from
sdk/typescript/dist/typedoc.json— do not edit. Regenerate withnode platform/scripts/typedoc-resources.mjs.
chat
Auth: Requires
Authorization: Bearer <keyId>.<secret>(server-side). For per-user calls addx-persona-external-user-id. See .
Chat is AG-UI SSE streaming: chat.stream yields TEXT_MESSAGE_CHUNK/TOOL_CALL_*/CUSTOM events; sendMessage drains to { text, interrupt, error }.
Example
TypeScript
cURL
Response
AguiEvent
The full discriminated union of every AG-UI protocol event this backend can emit.
Source: types/chat.ts:5
Kind 2097152
ChatMessageInput
Source: types/chat.ts:9
Interface
ChatResume
Approves/denies a pending human-in-the-loop interrupt from a previous run, or answers a pending clarification. Shape depends on the interrupt kind — see ChatInterrupt.
Source: types/chat.ts:20
Kind 2097152
SendMessageOptions
Source: types/chat.ts:23
Interface
ChatInterrupt
A pending interrupt surfaced via a CUSTOM event — this backend's own human-in-the-loop protocol (tool-approval or clarification-question), not the newer standard AG-UI RunFinishedInterruptOutcome field (this backend's translator doesn't emit that; confirmed by reading aguiTranslator.js directly rather than assuming the spec's newer shape applies).
Source: types/chat.ts:63
Interface
ChatResult
Source: types/chat.ts:69
Interface
AGUI_SCHEMA_VERSION
The schema document version this SDK release was written against.
Source: types/aguiEvents.ts:10
Variable
ClarificationQuestion
Source: types/aguiEvents.ts:12
Interface
HitlRequestPayload
CUSTOM event hitl_request — pauses the run pending approval of one or more pending tool calls (an Agent's interruptOn config). actionRequests/ reviewConfigs are opaque langchain humanInTheLoopMiddleware structures, passed through as-is by the backend.
Source: types/aguiEvents.ts:32
Interface
McpAppPayload
CUSTOM event mcp_app — an MCP-registered tool call declared an interactive widget via _meta.ui.resourceUri.
Source: types/aguiEvents.ts:41
Interface
PersonaRunErrorEvent
A narrower, app-typed view of the native @ag-ui/core RUN_ERROR event (already covered by AguiEvent's union — this just gives code a literal type instead of string | undefined, and documents the extra fields this backend always sends alongside the base protocol's message).
Source: types/aguiEvents.ts:101
Interface