Skip to content

Interface: UseAgentChatResult

content: string

Accumulated assistant text from response.output_text.delta events.


error: string | null

Last error message (cleared on next successful send()).


events: AgentChatEvent[]

Every parsed event, in order. Provided for components that need to render historical tool calls or replay state after a remount — lighter than re-deriving from message history. For one-off side effects prefer UseAgentChatOptions.onEvent.


isStreaming: boolean

True while an SSE stream is open.


reset: () => void

Discard accumulated content, events, and threadId. Aborts any in-flight stream. Use when switching agents or starting a fresh conversation.

void


send: (message) => Promise<void>

Send a user turn and stream the response. Aborts any in-flight stream. Resolves when the stream completes (success or error).

string

Promise<void>


threadId: string | null

Thread id captured from the first appkit.metadata event of the stream. Subsequent send() calls automatically forward this so the server reuses the same thread.