- agent-scoped streaming through
GET /agents/{agent_id}/events - mob-merged streaming through
GET /mob/events - structural mob events through
GET /mobkit/mob_events/stream - console timeline replay and live continuation through
GET /console/timeline/stream - identity-filtered console timeline streaming through
GET /console/identity/{identity}/stream - event subscription and replay through
mobkit/events/subscribe
Authentication
Every SSE route honorsRuntimeDecisionState.console.require_app_auth.
When require_app_auth is on, the request must carry one of:
Authorization: Bearer <token>header, or?auth_token=<token>query parameter
=, &, +, %) is handled correctly.
Agent event stream
Content-Type: text/event-stream).
Frame format
Console timeline stream
identity, conversation_id, after, before, mode, and limit parameters as GET /console/timeline.
If replay cannot satisfy the requested cursor, the server returns HTTP 409 with:
latest_cursor rather than retrying the stale cursor.
Identity timeline stream
identity from the path and otherwise behaves like GET /console/timeline/stream.
Event subscription
Use themobkit/events/subscribe JSON-RPC method to request a point-in-time event snapshot plus replay frames.
Example request:
Supported scopes:
Structural mob events stream
MobEvents (typed envelopes
preserving mob_id, run_id, step_id, agent_identity, and the
full MobEventKind payload).
Each connection opens its own MobEventsView::subscribe_after so
catch-up and live tail share the same ordered stream — there is no
race window between snapshot and live subscription.
Query parameters
Frame format
Stale cursor
Ifafter_seq > latest_cursor, the route returns HTTP 410 Gone
with {"error":"event_query_stale","after_cursor":N,"latest_cursor":M}.
SDK clients should rewind to latest_cursor and reconnect.
Continuation from mobkit/mob_events/subscribe
The JSON-RPC handshake returns a snapshot frame plus a
subscribe_url field that already encodes the resume cursor and
filters:
after_seq falls back to latest_cursor captured at handshake
when the snapshot is empty, so the SSE handler picks up gaplessly
even when no events match yet.
Cursor durability
MobStructuralEvent.cursor is the meerkat ledger cursor — durable
across mobkit gateway restarts when the runtime is built with
.persistent_state(path). SDK consumers can checkpoint a cursor
and resume by reconnecting with after_seq=<checkpointed cursor>.
Keep-alive
The server sends keep-alive frames at a configurable interval (default: 15 seconds) to prevent connection timeouts:latest_cursor or a fresh Last-Event-ID.
Sending messages
To send a message to an agent, use themobkit/send_message RPC method and capture the returned session_id for correlation:
GET /console/timeline/stream, GET /console/identity/{identity}/stream, or broader replayable event history via mobkit/events/subscribe.
Error handling
If the target agent/member does not exist or a subscription request is malformed, SSE routes return an HTTP error response before opening the stream:See also
- REST API — HTTP endpoints overview
- Console guide — how the console uses SSE
- Events — unified event model
