curl --request GET \ --url https://control-plane.kubiya.ai/api/v1/executions/{execution_id}/stream
Copy
Ask AI
"<any>"
Executions
Stream Execution
Stream execution updates using Server-Sent Events (SSE).
This endpoint combines two sources for real-time updates:
1. Redis streaming events (from worker activities) - sub-second latency
2. Temporal workflow queries (for state consistency) - 200ms polling
The Redis events provide instant tool execution updates, while Temporal
ensures we never miss state changes even if Redis is unavailable.
Gap Recovery:
- Supports Last-Event-ID pattern for reconnection
- Client sends last_event_id query param or Last-Event-ID header
- Server resumes from that point or detects gaps
SSE format:
- id: {execution_id}_{counter}_{timestamp_micros}
- data: {json object with execution status, messages, tool calls}
- event: status|message|message_chunk|tool_started|tool_completed|error|done|history_complete
Event Types:
- history_complete: Sent after all historical messages from DB are streamed
Contains: message_count, is_truncated, total_available, has_more
GET
/
api
/
v1
/
executions
/
{execution_id}
/
stream
Stream Execution
Copy
Ask AI
curl --request GET \ --url https://control-plane.kubiya.ai/api/v1/executions/{execution_id}/stream