Authentication
Bearer token using your project API key.
Authorization: Bearer sk_live_...Stream events
GET /events
Query parameters
Comma-separated list of event patterns to subscribe to. Supports wildcards with
*. If omitted, all events are streamed.Examples: task:*, mission:created,mission:completed, agent:*,task:transitionHeaders
The ID of the last event received. When provided, the server replays all events after this ID before switching to live streaming. Use this for reconnection without missing events.
Event types
| Event | Fired when |
|---|---|
task:created | A new task is created |
task:transition | A task changes status (e.g. pending to active) |
task:completed | A task finishes successfully |
mission:executed | A mission begins execution |
mission:completed | A mission finishes (success or failure) |
agent:spawned | An agent is activated for a task |
agent:completed | An agent finishes its work on a task |
schedule:triggered | A scheduled mission fires |
assessment:completed | A task assessment finishes |
approval:requested | A human approval gate is triggered |
SSE wire format
Each event follows the standard SSE format:| Field | Description |
|---|---|
event | The event type (e.g. task:transition) |
data | JSON payload with event-specific fields |
id | Monotonically increasing event ID for replay |
Each event is terminated by a blank line (
\n\n). This is part of the SSE specification and is how the client knows an event is complete.Examples
curl
Stream all events:JavaScript (EventSource)
Reconnection
How Last-Event-ID works
How Last-Event-ID works
The server stores a sliding window of recent events. When you reconnect with
Last-Event-ID: evt_00042, the server replays all events with an ID greater than evt_00042 before switching to live mode. This guarantees at-least-once delivery as long as the event is still within the replay window.Automatic reconnection
Automatic reconnection
The
EventSource API in browsers automatically reconnects on connection loss and sends the last received event ID. If you are using curl or a custom client, you must track the last id field yourself and include it as the Last-Event-ID header on reconnection.Filter patterns
Filters use a simple pattern syntax:| Pattern | Matches |
|---|---|
task:* | All task events (task:created, task:transition, task:completed) |
mission:completed | Only mission:completed events |
* | All events (same as omitting the filter) |
task:*,agent:* | All task and agent events |
approval:requested | Only approval request events |