Runs
Stream Events
Stream real-time events from a run using Server-Sent Events (SSE)
GET
Path Parameters
Run ID (e.g.,
run_xyz789abc)Event Format
Events are sent as SSEdata messages with JSON payloads:
Event Types
When the runner machine is reachable, you receive detailed events from the crew execution:| Type | Description |
|---|---|
run.started | Run execution began |
run.completed | Run finished successfully |
run.failed | Run encountered an error |
task.started | A task began execution |
task.completed | A task finished |
agent.action | An agent performed an action |
tool_use | A tool was invoked |
log | Log message from the crew |
artifact | An artifact was produced |
| Type | Description |
|---|---|
heartbeat | Periodic status update while the run is in progress |
complete | Run reached a terminal state (succeeded, failed, canceled) |
error | An error occurred (e.g., run not found) |
timeout | The SSE connection timed out |
Notes
- If the run is already in a terminal state (
succeeded,failed,canceled), a singlecompleteevent is returned immediately - If the runner machine is reachable, events are proxied directly from the machine in real time
- If the machine is not reachable, the API falls back to polling the database every 2 seconds and sending
heartbeatevents - The connection times out after 30 minutes