Pistis
API referenceFollowing

Follow a session live

GET
/sessions/{id}/events

A server-sent event stream. Each transcript entry is an entry event with id: <seq>; approvals, questions, waiting messages, status and usage arrive as approval, ask, pending, status and usage events, each data a SessionEvent. While the model writes, reply events carry its text as it streams (an id, an offset and the text from there; offset 0 is the whole text so far, which a stream opened mid-reply gets first): live only, never replayed, ended by the assistant entry itself. Reconnect with Last-Event-ID (or ?after=) to get every later entry exactly once. A stream that has to end says why in an error event.

Authorization

bearer
headerAuthorizationBearer <token>

An API token

Path Parameters

id*string

A session id

Query Parameters

after?integer

Start after this seq

Range0 <= value

Header Parameters

Last-Event-ID?string

Resume after this seq

Response Body

text/event-stream; each event's data is a SessionEvent

response?stringtext/event-stream
Example Request
curl -X GET 'http://127.0.0.1:7777/sessions/ses_6c1f2a0b9d3e4f5a6b7c/events'
Example Response
"string"