WebSocket Events

Subscribe to a run with WS /api/runs/{run_id}/stream. The server publishes RunEvents; a final { "__done__": true } marker closes the socket.

RunEvent

{
  "kind": "node_end",
  "node_id": "search",
  "data": { "output": { "sources": [] } }
}

Eight event kinds

KindMeaning
node_startA node began executing
node_endA node finished
llm_tokenA streamed LLM token
tool_callAn MCP tool was called
hitl_pausedThe run paused at a gate
hitl_resumedThe run resumed after a decision
artifact_createdAn artifact was produced
errorAn error occurred

node_id is optional and present when the event is scoped to a node. data is a free-form object.