WebSocket Events¶
This section lists all known WebSocket events and their payloads.
All events follow the same structure:
Assistant events¶
chat-loading¶
Indicates that assistant processing has started.
chat-chunk¶
A partial piece of the assistant response.
{
"event": "chat-chunk",
"data": {
"message_id": "string",
"conversation_id": "string",
"chunk": "string"
}
}
chat-visualization-expect¶
Indicates that a visualization is being prepared.
{
"event": "chat-visualization-expect",
"data": {
"message_id": "string",
"conversation_id": "string",
"visualization": "plain:/loading_chart.png"
}
}
chat-visualization¶
Indicates that the final visualization is ready.
{
"event": "chat-visualization",
"data": {
"message_id": "string",
"conversation_id": "string",
"visualization": "string"
}
}
chat-error¶
Indicates an error during assistant processing.
{
"event": "chat-error",
"data": {
"message_id": "string",
"conversation_id": "string",
"error": "string"
}
}
chat-complete¶
Marks the end of the assistant response stream.
Suggestions events¶
suggestions-updated¶
Triggered when suggested questions are updated.
Context file events¶
context-file-status¶
Indicates processing status of a context file.
Datasource events¶
datasource-updated¶
Triggered when a datasource is updated.
Agent events¶
agent-task¶
Triggered when an agent task changes state.
Event usage patterns¶
Assistant streaming¶
- Receive
chat-loading - Receive multiple
chat-chunk - Optionally receive visualization events
- Receive
chat-complete
File processing¶
- Upload file
- Wait for
context-file-status
Agent execution¶
- Run or schedule agent
- Listen for
agent-task
Best practices¶
- Always handle events asynchronously
- Use
message_idto track responses - Buffer
chat-chunkevents before rendering - Handle
chat-errorgracefully - Do not assume event order is guaranteed ```