Mission Control exposes a Server-Sent Events (SSE) endpoint that streams agent activity in real time. This is the same mechanism the dashboard uses internally, and it’s available for any client that can consume SSE.
GET /api/events
Authorization: Bearer <your-token>
Accept: text/event-stream
The connection stays open indefinitely. The server pushes events as they occur, with no polling required.
Each event follows the standard SSE format:
id: 42
event: activity
data: {"taskId":"abc123","agentId":"agent-1","type":"progress","message":"Reading src/auth/middleware.ts","timestamp":"2025-01-15T10:30:00Z"}
The id field increments with each event and can be used for reconnection (see below).
Mission Control emits several event types over SSE:
| Event Type | When It Fires |
|---|---|
activity | Agent emits a progress update |
status_change | A task’s status changes |
dispatch | A task is dispatched to an agent |
complete | An agent reports task completion |
error | An agent reports a failure |
If your SSE connection drops, reconnect and include the Last-Event-ID header set to the last event ID you received:
GET /api/events
Last-Event-ID: 42
Mission Control buffers recent events and will replay any events you missed since that ID, ensuring no events are lost during brief disconnections.
By default, the SSE endpoint streams events for all tasks and agents. You can filter to a specific task or agent:
GET /api/events?taskId=abc123
GET /api/events?agentId=agent-1
Any HTTP client that supports streaming can consume SSE. In Node.js:
const EventSource = require('eventsource');
const es = new EventSource('http://localhost:4000/api/events', {
headers: { Authorization: 'Bearer <token>' }
});
es.addEventListener('activity', (e) => console.log(JSON.parse(e.data)));