Skip to main content
Use trials() to create client. Examples run inside an async context; ids name existing records. The trial guide shows the full inspection workflow.

get

Read one attempt by its globally unique id. Returns Trial, including job_id and the untruncated exception message.
See trial fields for rewards, usage, retries, timing, and provenance.

trace

Read one page of parsed events. Returns TraceEventPage.
The page has items, nextCursor, hasMore / Python next_cursor, has_more. An event has seq: number, type: string, and data: object. A null next cursor means caught up. To poll again later, retain the last event’s seq.

traceEvents

Python: trace_events. Iterate currently available parsed events across pages. It finishes when caught up; it is not a live subscription.
Accepts the same cursor, limit, type, grep, and tail options as trace. Returns an async iterator of TraceEvent.

files

List the stored trial tree by relative path. Returns one TrialFilePage, sorted by path.
Optional limit defaults to 200 (maximum 1,000); cursor continues the page. Each item contains path: string and size_bytes: number. An empty tree is a normal result.

file

Read one path returned by files. Returns exact bytes: TypeScript Buffer, Python bytes.
Optional byte range: start plus inclusive end, start through EOF, or suffix for the last N bytes. Do not combine suffix with start or end. TypeScript passes the range as the third object; Python uses keyword arguments. A missing path is a typed 404.

artifact

Read a named stored artifact. Returns text, a path-to-text map, or null when nothing was stored.
Use trace for trace-parsed, and filesystem(id).archive() for filesystem. Python’s annotation lists these selectors, but artifact rejects both locally. Non-text home files are omitted from the text map and recorded in /agent-home.json; the job archive preserves their bytes.

filesystem

Get a RunFilesystem client for this attempt. No request is made until you call a method on it.
See every filesystem method, including live files, captured files, sandbox logs, and processes.

retry

Run one settled attempt again in a new linked job. Returns Job; the source job may still be running.
Optional idempotencyKey / idempotency_key makes a repeated request return the same accepted job. This is the one-trial form of jobs().retry. Imported attempts cannot retry.

regrade

Run only the verifier again against eligible recorded inputs. Returns a new one-trial Job.
The attempt must be settled and have retained inputs from separate verification. Shared-mode or pre-persistence trials are refused with regrade_source_ineligible; imported jobs are refused.

stop

Stop selected in-flight trials or trace analyses owned by the caller. Returns StopResponse. Pass 1–100 non-empty IDs in one call. The list can contain trial IDs, analysis IDs, or both.
This does not cancel the whole job. Repeating the request is safe: terminal work stays unchanged.