Stream Events
Subscribe to a Server-Sent Events (SSE) stream of agent lifecycle events.
The stream replays retained historical events after the cursor, then
delivers live events as they occur. Events are delivered at-least-once;
clients should deduplicate by event id.
Use the after query parameter or Last-Event-ID header to resume
from a previous position. If the cursor is older than the earliest
retained event, the server returns 410 Gone.
Authorizations
The token from the agent's discovery file (%ProgramData%\Miru\device-api\device-api.json on Windows). Required over loopback TCP (127.0.0.1:6478 by default on Windows) and accepted by every route; not used over the Unix socket.
Headers
Standard SSE reconnection header. Used as the replay cursor if after query parameter is not provided.
Query Parameters
Event ID cursor. Only events with id greater than this value are returned. Takes precedence over the Last-Event-ID header.
Event types to receive. If omitted, all event types are sent.
Response
SSE event stream. Each event is delivered as an SSE frame with id, event, and data fields. A ": heartbeat" comment is sent immediately when the connection opens, and again every 30 seconds while the stream is idle. Comments carry no data and should be ignored by clients.
The object type, which is always event.
event "event"
Monotonically increasing event ID. Used as the SSE id field and for replay cursors.
42
Event type string in the format {resource}.{action}.
"deployment.deployed"
Timestamp of when the event occurred.
"2026-03-10T12:00:00Z"
Event-specific payload. Shape varies by event type.

