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.
AuthorizationBearer <rsk_live_*>Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.
sessionId*stringThe 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.
1 <= length <= 256cursor?stringtext/event-stream of SessionEventEnvelope frames.
curl -X GET 'https://app.rensei.ai/api/cli/sessions/string/watch'Read the last N lines of a session's terminal output.
Renders the tail of an interactive session's PTY output server-side, without attaching or streaming, and without requiring the session host to be online. Output is served from the relay's retained snapshot plus the frames after it while the session's room is live, and from the session recording once it is not. The rendered lines are a derived projection of the terminal, not authoritative screen state; pass raw=1 for the exact encoded frames instead. Lines are PHYSICAL terminal rows, so one wrapped logical line counts as several. truncated=true means older output was dropped before rendering, and snapshotDegraded=true means the screen the lines continue could not be decoded, so they were rendered onto a blank grid. Reading a session recording requires a human user identity; API keys and OAuth-agent tokens can read a live tail only. The id may be the canonical session id or its 16-hex public session hash.
Stream best-effort live execution events for a workflow instance.
Stream best-effort live execution events for a workflow instance. - Rensei REST API operation reference.