List events
Lifecycle
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
Parsing a stream means switching on the outer
/changes for live tailing; this endpoint is for historical pagination.
Auth is optional: supports public shares.
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 | a step record (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 (e.g. idle). |
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 a step record (id,
run_id, step_parts, event); the nested event.kind tells you what happened:
event.kind | Payload (under data.event) | Meaning |
|---|---|---|
message_event | content[], caller_id | A user or agent message. |
observation_event | observation, a page snapshot keyed by kind (see Observation shapes) | What the agent perceived this step. |
policy_event | message, tool_reqs[] | The agent’s decision: its reasoning and the action(s) it chose. |
tool_result | tool_req (tool_name, args), result | The outcome of an action. |
answer_event | answer, context | 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). |
flow_event | flow, origin | A control-flow signal such as pause, resume, or force_answer, including the ones you trigger via the session controls. |
type, then for AgentEvent, on data.event.kind:
Observation shapes
observation_event.observation is keyed by kind. The Browser emits one of two shapes, depending on the environment’s mode.
web is emitted in visual and multimodal modes: a screenshot plus page metadata.
| Field | Type | Description |
|---|---|---|
kind | string | "web". |
url | string | Current page URL. |
title | string | Page title. |
tabs | array | Open tab IDs. |
current_tab | string | Active tab ID. |
image | object | Screenshot, uploaded and referenced by URL. |
text | string | Visible page as markdown. Empty in visual, populated in multimodal. |
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. |
textual_web is emitted in text mode: paginated page text, no screenshot.
| Field | Type | Description |
|---|---|---|
kind | string | "textual_web". |
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. |