Interface: UseAgentChatResult
Properties
Section titled “Properties”content
Section titled “content”content:
string
Accumulated assistant text from response.output_text.delta events.
error:
string|null
Last error message (cleared on next successful send()).
events
Section titled “events”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
Section titled “isStreaming”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.
Returns
Section titled “Returns”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).
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Promise<void>
threadId
Section titled “threadId”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.