onAgentThought? |
(thought, conversationId) => void |
Callback for agent thought events (supervisor mode only). Fires for each piece of agent reasoning: routing plan, streamed thought chunk, tool call decision, or tool result summary. Use this to render a “thought process” stream alongside the final response. Suppressed server-side when the chatbot has @fluxbase:show-reasoning false — only reasoning chunks are gated, tool_call/tool_result/plan events always fire so users see actions. |
onAgentTransition? |
(transition, conversationId) => void |
Callback for agent transition events (supervisor mode only). Fires when the supervisor routes to a specialist agent, when one agent hands off to another, and when the synthesizer/verifier engage. Use this to render the multi-agent flow as observable UI. |
onContent? |
(delta, conversationId) => void |
Callback for content chunks (streaming) |
onDone? |
(usage, conversationId, extras?) => void |
Callback when message is complete |
onError? |
(error, code, conversationId) => void |
Callback for errors |
onEvent? |
(event) => void |
Callback for all events |
onProgress? |
(step, message, conversationId) => void |
Callback for progress updates |
onQueryResult? |
(query, summary, rowCount, data, conversationId) => void |
Callback for query results |
reconnectAttempts? |
number |
Reconnect attempts (0 = no reconnect) |
reconnectDelay? |
number |
Reconnect delay in ms |
token? |
string |
JWT token for authentication |
wsUrl? |
string |
WebSocket URL (defaults to ws://host/ai/ws) |