Event Streams (SSE)
Server-Sent Events endpoints for real-time monitoring. All SSE endpoints use
text/event-stream content type with keep-alive pings every 15 seconds.
GET /api/v1/events
Unified event stream for all agents.
Event types
| Event | Data | Description |
|---|---|---|
token | {"agent":"NAME","text":"..."} | Inference token streamed |
tool_call_start | {"agent":"NAME","tool":"...","args":{}} | Agent started a tool call |
tool_call_end | {"agent":"NAME","tool":"...","result":"..."} | Tool call completed |
agent_complete | {"agent":"NAME","duration_ms":N} | Agent tick finished |
error | {"agent":"NAME","error":"..."} | Agent error |
keepalive | {} | Connection keep-alive ping |
Example stream
event: token
data: {"agent":"researcher","text":"The"}
event: token
data: {"agent":"researcher","text":" results"}
event: tool_call_start
data: {"agent":"researcher","tool":"http_fetch","args":{"url":"https://example.com"}}
event: tool_call_end
data: {"agent":"researcher","tool":"http_fetch","result":"200 OK"}
event: agent_complete
data: {"agent":"researcher","duration_ms":1234}
GET /api/v1/agents/stream
Per-agent event stream.
Query parameters
| Param | Required | Description |
|---|---|---|
agent | yes | Agent name to subscribe to |
Returns the same event types as /events, filtered to the specified agent.
GET /api/v1/agui/events
AG-UI protocol event stream for frontend integration. Follows the AG-UI lifecycle specification.
Event types
| Event | Description |
|---|---|
STATE_SNAPSHOT | Full state of all agents (sent on connect) |
STATE_DELTA | Incremental state change |
RUN_STARTED | Agent execution cycle started |
RUN_FINISHED | Agent execution cycle completed |
TEXT_MESSAGE_START | Beginning of a text message |
TEXT_MESSAGE_CONTENT | Streamed text content chunk |
TEXT_MESSAGE_END | End of a text message |
TOOL_CALL_START | Tool invocation started |
TOOL_CALL_END | Tool invocation completed |
Example
event: STATE_SNAPSHOT
data: {"agents":[{"name":"log-monitor","status":"running"}]}
event: RUN_STARTED
data: {"agent":"log-monitor","run_id":"abc123"}
event: TEXT_MESSAGE_CONTENT
data: {"agent":"log-monitor","run_id":"abc123","text":"Scanning..."}
event: RUN_FINISHED
data: {"agent":"log-monitor","run_id":"abc123","duration_ms":500}