Get a run's events
get_run_eventsRead a run's recorded events, oldest first, to see what it did and why it failed: worker_started, tool_start and tool_end (each tool the agent called, its arguments and result), text_delta (the agent's text), usage (each model call: authorized_micros when it is authorized, then actual_micros once the provider reports its cost; a call the provider refused is reconciled to 0), model_call_failed and model_call_refused (with the reason), web_request, web_search and web_refused, output_file (a file the run saved), worker_error (why the worker failed), status, and microvm_* (the sandbox starting and stopping). Long strings are cut to max_string_bytes (default 2000). Page with after: while has_more is true, call again with after set to next_after. Filter with types, for example ["worker_error", "model_call_failed", "usage"]. A zero-data-retention run keeps its events only briefly after it finishes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "get_run_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The run's id, as returned by create_run. | |
| after | No | Return events after this event id: next_after from the previous page (default 0, from the start). | |
| limit | No | At most this many events (default 50). | |
| types | No | Only events of these types. | |
| max_string_bytes | No | Cut every longer string in an event to this many bytes (default 2000). |