List events
Track progress
List events
Paginated list of session events.
GET
List events
Returns a paginated list of events for a session. Use
Event types (
The most common event types are below.
Agent activity (
The agent’s step-by-step trace lives inside
Each
/changes for live tailing; this endpoint is for historical pagination.
Auth is optional, so public shares are supported.
Returns a paginated list of TrajectoryEvent objects.
Path parameters
The session ID.
Query parameters
Page number (1-based).
Items per page. Maximum:
200.Sort order. Options:
timestamp, -timestamp.Filter by event type, e.g.
AgentEvent or MetricsUpdateEvent. See Event shape for the full list.Event shape
Every event, on both this endpoint and/changes, is the same envelope:
| Field | Type | Description |
|---|---|---|
type | string | The event type (see below). |
data | object | Type-specific payload. |
timestamp | string | ISO 8601 time the event was recorded. |
Event types (type)
The most common event types are below. data is an open JSON object whose shape varies by type, so treat this list as representative rather than exhaustive (other types such as DelayAgentStartEvent and AgentRunStatusChangeEvent may appear).
type | data | Emitted when |
|---|---|---|
RequestStartEvent | {} | The session request is received. |
RequestStartDispatchedEvent | { "status": "..." } | The run is dispatched to a runner. |
AgentStartedEvent | {} | The agent begins executing. |
AgentEvent | the step event (see below) | The agent observes, decides, acts, or answers. |
MetricsUpdateEvent | { "metrics": {...} } | Usage and cost are rolled up. metrics carries steps, total_cost, input_cost, output_cost, and cost_per_model[]. |
ActiveStateChangeEvent | { "state": "..." } | The agent’s active state changes (running, idle, or awaiting_tool_results; the latter also carries pending_tool_calls for custom tools). |
AgentCompletionEvent | { "reason": "..." } | The run ends (e.g. "finished"). |
AgentErrorEvent | { "error": "...", "trace": "...", "info": ... } | The run fails; the session moves to failed. |
Agent activity (AgentEvent.data)
The agent’s step-by-step trace lives inside AgentEvent. Its data is the step event; data.kind tells you what happened:
data.kind | Payload (under data) | Meaning |
|---|---|---|
policy_event | reasoning_content, content, tool_reqs[], validation_errors[] | The agent’s decision: its reasoning, message, and the action(s) it chose. |
observation_event | type, text, image, metadata (see Observation shapes) | What the agent perceived this step. |
tool_result | tool_req (tool_name, args, id), result | The outcome of an action; result is opaque JSON. |
answer_event | answer | The final answer. Same value as /changes answer. |
error_event | error, origin, tool_req? | A recoverable error during the step (e.g. a failed or invalid action). |
message_event | caller_id, content[] | A user or agent message. |
flow_event | flow, origin | A control-flow signal such as pause, resume, or force_answer, including the ones you trigger via the session controls. |
tool_reqs[] entry (and tool_result.tool_req) is { tool_name, args, id }. policy_event.content and reasoning_content may be null.
Parsing a stream means switching on the outer type, then for AgentEvent, on data.kind:
Observation shapes
Anobservation_event is flat: type names the environment that produced it, image is the screenshot (if any), and metadata is that environment’s snapshot, shaped by type (an open object, so switch on type to read it). The Browser emits one of two types, depending on the environment’s mode.
The page text lives in
metadata, not in the top-level text: read metadata.text for web and metadata.page_markdown (or page_html) for textual_web. The top-level text carries only occasional step notices (e.g. [page unchanged since previous observation]) and is null for most observations.web is emitted in visual and multimodal modes: a screenshot (top-level image) plus page metadata.
metadata field | Type | Description |
|---|---|---|
url | string | Current page URL. |
title | string | Page title. |
text | string | Visible page rendered as markdown. Empty in visual, populated in multimodal. |
tabs | array | Open tab IDs. |
current_tab | string | Active tab ID. |
viewport_size | array | Viewport [width, height] in pixels. |
page_size | array | Full page [width, height] in pixels. |
scroll_position | array | Scroll offset [x, y] in pixels. |
cursor_position | array | Cursor [x, y] in pixels, or null. |
textual_web is emitted in text mode: paginated page text under metadata, no screenshot.
metadata field | Type | Description |
|---|---|---|
url | string | Current page URL. |
title | string | Page title. |
tabs | array | Open tab IDs. |
current_tab | string | Active tab ID. |
mode | string | "markdown" or "html". |
page_markdown | string | Full page rendered as markdown. |
page_html | string | Full page HTML. |
text_offset | integer | Start character offset of the current chunk. |
chunk_size | integer | Characters per chunk. |
chunk_number | integer | Current chunk, 1-based. |
total_chunks | integer | Total chunks for the page. |
Images
Theimage on an observation_event, and any image inside message_event.content[], is { source, type, media_type }. type is url for platform-served screenshots (fetch source with your API key) or base64 for inline images. Images embedded in a tool_result.result or an answer_event.answer stay inline as base64 within that opaque payload, never as URLs.