Skip to content

SSE stream for a project chat conversation — streamprogramagentevents

GET
/program-agent/{sessionId}/events
curl --request GET \
--url 'https://example.com/api/program-agent/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events?afterSequence=0&realtime=1' \
--cookie sb-access-token=<sb-access-token>

Session-authenticated observation stream for the project’s single shared chat conversation; the session is the project conversation, not one program’s. Emits hello/turn/change_set/delivery_recovery/status/error/ping events and resumes stored turns after the supplied sequence on reconnect (zero by default). A scope conversation also emits scope ({ rev }) whenever the project’s scope map revision moves, so the portal refetches the map; roadmap conversations never emit it. Proposal notifications carry the exact ID, revision and status; status uses running/idle/terminated derived from durable processing state and reports uncertain delivery and processor errors. Does not execute provider or tool calls; durable processing continues without viewers. Current project access is rechecked on every transcript read.

sessionId
required
string format: uuid
afterSequence
integer
0 <= 9007199254740991

Last transcript sequence already received for this session. Only later turns are streamed.

realtime
string
Allowed values: 1

Send 1 when the client’s realtime push is connected. A hint only: the poll then skips the turn-row read except once every 10 seconds, and every other signal is unchanged. Omit it to get every poll as before.

Text/event-stream

Media type text/event-stream
string

Invalid request

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Forbidden

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not found

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number