Skip to main content
The agent records every step it takes to a durable thread. A migration’s thread is the union of those events across all its runs (generate, update, clarify, execute), in a stable order — so you can render a live activity feed, a transcript, or just watch progress without tight-polling the run. Read it two ways: a snapshot you page through with a cursor, or a live SSE stream.

Authentication

Requires an x-api-key header. See Authentication.

Query parameters

Both endpoints accept the same parameters:
after
number
Return only events with a sequence greater than this. Pass the previous response’s last_sequence to page forward (snapshot) or resume (stream). Omit to start from the beginning.
include
string
default:"user"
Verbosity:
  • user (default) — prose, status, preview, the agent’s questions, completion, and errors.
  • tools — the above plus tool calls, tool results, and task IDs.
  • all — everything, including the agent’s thinking and internal prepared inputs.

Snapshot

200 OK
events[].sequence
number
The event’s stable cross-run ordinal. Use the response’s last_sequence as the next after.
events[].type
string
The public event type — one of message, thinking, status, tool_call, tool_result, task, request_input, prepared, preview, completed, error. Which types appear depends on include.
events[].data
object
The event payload, kept intact so you can render tool calls, previews, and prompts.
events[].created_at
string
ISO 8601 timestamp.
last_sequence
number | null
The highest sequence in this page — pass it as after to fetch what’s next.

Live stream (SSE)

A Server-Sent Events stream of the same events. Each message is event: <type> + data: <json>:
The stream tails new events until the migration has no active run and the backlog is drained, then sends a final event: done carrying the last sequence. It also closes after a time budget (~5 minutes) — when it does, reconnect with ?after=<last_sequence> to continue exactly where you left off. Watch for an event: error message, which signals a stream-side error before close.

Errors

Next