Skip to navigation

Stream Events

View as Markdown

Stream the same Events as they are committed, with the same filters. Resume after an Event ID with Last-Event-ID or after: the stream is in commit order, so a resumed stream has no gaps.

Authentication

AuthorizationBearer

Use Bearer <api-key>.

Headers

BCTRL-VersionenumOptional
Dated API version. Defaults to the release pinned when the API key was created.
Allowed values:
BCTRL-SpacestringOptional
Select one authorized Space by its opaque ID or unique name. Omission uses the operation default.
BCTRL-Subaccount-IdstringOptional
Optional effective subaccount context for organization API keys. Subaccount API keys are already scoped and cannot use this header to act as another subaccount.
Last-Event-IDstringOptional
Optional last delivered event identifier used to resume an SSE stream.

Query parameters

browserstringOptional
Events of this browser, across its Runs.
sandboxstringOptional
Events of this sandbox.
runstringOptional
Events of this Run.
taskstringOptional
Events of this Task.
conversationstringOptional

A Conversation history: its Events.

agentstringOptional
Events of Tasks run by this agent.
categoryanyOptional
typestring or list of stringsOptional
actorstringOptional1-200 characters
Actor ID.
actorTypeenumOptional
Allowed values:
channelanyOptional
outcomeanyOptional
fromdatetimeOptional
RFC 3339 timestamp with a UTC offset.
todatetimeOptional
RFC 3339 timestamp with a UTC offset.
afterstringOptional

Resume after this Event ID (as Last-Event-ID does).

Response headers

BCTRL-Request-IdstringOptional
Current request identifier, also echoed in errors.
BCTRL-VersionstringOptional
Negotiated dated API version.
RateLimit-Limitinteger

Evaluated policy limit; zero when no finite policy was evaluated.

RateLimit-Remaininginteger

Remaining policy budget; zero when no finite policy was evaluated.

RateLimit-Resetinteger

Seconds until reset; zero when no finite policy was evaluated.

Response

Server-Sent Events with Event IDs and complete Event objects, in commit order; heartbeats are comments.

actorobject
categoryenum
channelenum
conversationIdstring or null
createdAtdatetime
RFC 3339 timestamp with a UTC offset.
dataobject
idstring
Unique runEvent identifier generated by BCTRL.
object"event"
outcomeenum
Allowed values:
pageIdstring or null
runIdstring or null
runtimeIdstring or null
sandboxIdstring or null
seqinteger
sourceenum
spaceIdstring or null
spanIdstring or null
targetobject or null
taskIdstring or null1-200 characters
timedatetime
RFC 3339 timestamp with a UTC offset.
timestampdatetime
RFC 3339 timestamp with a UTC offset.
traceIdstring or null

W3C trace ID: GET /traces/{traceId} returns the span tree.

typestring3-200 characters
updatedAtdatetime
RFC 3339 timestamp with a UTC offset.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error