Stream account agent events (SSE)

View as Markdown
Server-Sent Events stream of agent build changes for an account. Requires membership of the account. Opens with a `ready` event, then sends an `agent.build` event whenever a build changes state, and a `heartbeat` every 25 seconds. An `agent.build` event names the agent that changed in `agent`, with `build_id` and `status` when they apply. Treat it as a signal to refetch the agent's build status: the API stays the authority, and an event the client misses costs a late refresh rather than a wrong screen. Each `agent.build` event carries an `id`. Reconnect with that value in the `Last-Event-ID` header, or in the `last_event_id` query parameter when the client cannot set headers, to receive the events it missed. Replay is capped; when it is, `ready` carries `"resync": true`, meaning the client is not guaranteed current and should refetch. Events for an agent an account deploys from arrive on that account's stream as well as the publisher's.

Authentication

AuthorizationBearer
OAuth 2.0 device flow or platform session token

Path parameters

accountstringRequired

Account name (slug)

Query parameters

last_event_idstringOptional

Cursor to replay from, for a client that cannot set the Last-Event-ID header

Response

Server-Sent Events stream of account agent events

Errors

401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error