Rensei docs

Stream ledger lifecycle events for one admitted session.

Server-sent events. Each UNNAMED (default `message`) frame is one SessionEventEnvelope carrying its channel discriminator and native cursor. Two named control events are interleaved: `heartbeat` ({timestamp}) every 15s so an idle stream is provably alive, and `reconnect` ({reason, timestamp}) immediately before the stream self-closes at its lifetime bound - resume from the last envelope cursor. A close without a `reconnect` event means the session reached a terminal phase and its events are drained. Closing the connection is a delivery boundary only: it never changes session identity or terminal state.

GET
/api/cli/sessions/{sessionId}/watch

Authorization

headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Path Parameters

sessionId*string

The session id, in EITHER namespace: the canonical session id returned at dispatch, or its 16-hex public session hash. Both resolve to the same ledger node inside the caller's organization.

Length1 <= length <= 256

Query Parameters

cursor?string

Response Body

text/event-stream of SessionEventEnvelope frames.

Example Request
curl -X GET 'https://app.rensei.ai/api/cli/sessions/string/watch'
Example Response
Empty