Runs

List a run's events

Changed on

Lists an agent run's events as pages, oldest first: the frames its stream sends (its spans, the model's text and the run's own run_status, run_input_required, run_resumed, run_result and user_message logs) in time order, for a caller that polls rather than holds the stream open. A live run's page always has a next_cursor to poll from; an ended run's last page closes with its final run_status, as the run itself has it, and has none. Pages never repeat a frame, except that a cursor older than the stream's 10-minute window starts again from the run's first event, so a reader that keeps one deduplicates on span_id and phase, as a stream reader does across reconnects. A page keeps a stream entry's frames together, so it can hold a few more than limit. The run's own events and the model's text are live only: past the stream's 10-minute window a page has the archived spans and the closing run_status but no run_result, and a run with telemetry off has only its events while they are live. The run itself always has its result.

get/runs/{run_id}/events

Request

Path parameters

run_idstring uuid required

The run's id.

Query parameters

cursorstring

The next_cursor of the page before; leave out for the first page.

limitinteger

Page size.

Response

OK

next_cursorstring

Pass as cursor for the next page. Absent on an ended run's last page; a live run's page always has one to poll from.

Changes