Skip to main content
Use trials() to create client. IDs name existing records. The trial guide shows the full inspection workflow. Examples reuse the SDK setup. Use IDs returned by the relevant list or create call. Run Python snippets inside the async function shown in the Python guide.

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 is served. Request a reason to distinguish unavailable output from output withheld after a retry.
Null / None means nothing is served: output may be absent, purged, or withheld because it belongs to an earlier retry attempt. For log selectors, pass { withReason: true } in TypeScript or with_reason=True in Python to return TrialArtifactLog:
TrialArtifactLog contains log: string | null and optional reason: string. Python returns a dataclass with log and reason, both nullable. A supplied reason explains why output from an earlier attempt was withheld. This option does not apply to agent-home; TypeScript exposes no such overload and Python raises ValueError. 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.

download

Download one settled trial’s folder as a .tar.gz. Its job can still be running.
The archive extracts to the trial’s folder, <task>__<7 characters>/, with the same files as this trial’s folder in a job download. Job-level files are not included. Cost and token figures can still change for about 30 minutes after the trial ends, and analysis.json appears once an analysis of the trial completes. Omit options for Buffer / bytes; use to for a saved file path. TypeScript also accepts { stream: true }, a raw stream whose integrity the caller verifies. Python has no stream option. A trial that has not settled, including one still due an automatic retry or still being finished by its worker, returns trial_not_settled; wait, then retry. A regrade outcome has no trial folder and returns feature_unsupported; details.source_trial_id names the trial to download instead.

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.
Last modified on November 9, 2026