Docs navigation
Threads

Stream Thread Events

Stream Thread Events

GET/v2/threads/{thread_id}/events/stream

Server-sent events feed of a thread's events. The connection stays open until the client disconnects. backfill sends the oldest backfill events in arrival order, then the stream continues with newer events. On a long task, a reconnect without a cursor starts again from the beginning of the transcript. Send the Last-Event-ID header (EventSource does this on its automatic reconnect) to resume strictly after the last event received instead: backfill is skipped, and nothing is duplicated or missed. Events arrive in arrival order, not ts order; sort by ts for display.

Path Parameters

thread_idstring · uuidrequired

Query Parameters

backfillintegeroptional
Request
curl --request GET \
  --url https://api.brainbaselabs.com/v2/threads/{thread_id}/events/stream \
  --header 'Authorization: Bearer YOUR_API_KEY'