Skip to main content
GET
Join Thread Stream

Headers

Last-Event-ID
string

The ID of the last event received. Used to resume streaming from a specific point. Pass '-' to resume from the beginning. A gap event is sent, first on a resume or mid-stream, when events the client should receive may be missing. Its reason is expired when they may have aged out of the stream's history; unknown_id when the ID is later than any event the thread streamed, and the stream starts over from the beginning; or too_large when an event was over the size limit, with that event's stream mode in mode. expired errs on the safe side: once the stream's history has expired, a resume gets it unless its ID is the thread's last streamed event, which is kept for an hour after that.

Path Parameters

thread_id
string<uuid>
required

The ID of the thread.

Query Parameters

stream_modes
default:["run_modes"]

Stream modes to control which events are returned. 'lifecycle' returns only run start/end events and interrupts events (the interrupts a run answers), 'run_modes' returns all run events (default behavior), 'state_update' returns only state update events.

Available options:
lifecycle,
run_modes,
state_update
stream_mode

Alias of stream_modes, the name the SDKs send. Ignored when stream_modes is set.

Available options:
lifecycle,
run_modes,
state_update

Response

Success

The server will send a stream of events in SSE format.

Example event:

id: 1

event: message

data: {}