Skip to main content
jobs() returns the jobs client. Every job method takes a job id, and every derived run returns a new Job.

start

JobCreate: datasets (selectors: name, optional version, task_names, exclude_task_names, n_tasks), agents (arms: name, model_name, optional version, reasoning_effort, kwargs, preset, skills), and optional job_name, n_attempts, n_concurrent_trials (1 to 150), max_trial_spend_usd, sandbox_provider, retry, analyze, the five *_timeout_multiplier fields, verifier_env (REWARDKIT_JUDGE and REWARDKIT_MODEL only) and secrets. agent_env is in the shape but refused by the server.The response is the Job, with the resolved max_trial_spend_usd, worst_case_spend_usd, retry, analyze and multipliers. options.idempotencyKey makes a repeated call return the same job, with idempotent_replay true; a different request under a used key is refused with idempotency_key_reused.

get

One job in full.

list

Your jobs, newest first. Await one page, or iterate every page.

trials

A job’s trials. status and dataset filter.

tasks

One row per task: its trial tally, mean reward and cost, the dataset it came from (source), and its latest quality check (check, null when never checked).

watch

The job’s event stream. Await the handle for the final job, or iterate it for each event; one form per call, and onEvent fires in both. The stream replays from the beginning and reconnects on its own, backing off from reconnectDelayMs (default 1000) to maxReconnectDelayMs (default 30000). Every event type and payload is on types; a trial.settled is not final while a trial.retrying can follow it.

cancel

Request cancellation. A finished job is a no-op.

resume

A new job over a finished job’s failed or stopped trials; source_jobs records action: "resume". The default set and the refusals are on jobs. Supports idempotencyKey.

retry

A new job re-running selected trials: named ids, the failed ones, or all of them; trial_ids and failed_only together is refused. The named form works on a running job once every named trial has settled; the other two need a finished source. The rules are on jobs.

regrade

Verifier-only re-run of a finished job, in fresh separate verifier boxes under the recorded network policy. The result is a job with is_regrade true. Only settled separate-mode trials are eligible; no_regradable_trials when none are. See jobs.

analyze

Enqueue one trace analysis per trial and return at once with the job, its stats.analysis.n_pending counting the batch. AnalyzeConfigInput: model_name, rubric, prompt, sandbox_provider, reasoning_effort, n_concurrent, passing, failing, n_trials, all optional; {} is every default. Calling it again is the re-analysis path, one wave at a time. The same object on start() as analyze arms the embedded trigger.

watchAnalysis

Poll until no analysis is pending, from pollIntervalMs (default 2000) doubling to 30 s while the tally stands still, onStats firing on every change. Resolves with the final job. A job that was never analyzed polls forever, so call it after analyze(). On a still-running job created with analyze, n_pending can touch 0 between trial settles, so the watch can return early.

compare

Two to ten jobs side by side: per-job aggregates and a per-task matrix, disagreement rows first. Means cover SCORED trials only, with coverage beside them. The shape is on types.

download

A finished job’s results as one .tar.gz in the standard job layout: the bytes, the saved file’s path, or a stream. The first two shapes are verified against the response’s Content-Length and, when the server states one, its digest; { stream: true } hands you the raw bytes to verify yourself.

upload

Upload a job directory, its .tar.gz, or a public archive URL as a finished job. Returns the import record; follow it with watchImport. A large upload resumes after a dropped connection, and onRegistered hands you the import id as soon as it starts. A directory without result.json and config.json at its root is refused client-side.

getImport, watchImport, listImports

Read one upload, follow it until it settles, or list your uploads.

delete

Permanently delete a job you created: its trials, traces, analyses and stored files. The receipt is { job_id, trials_deleted, analyses_deleted }. The refusals are on jobs.

grep

Search every trial’s parsed trace in one pass. q is a case-insensitive regex over each event’s type and content; a plain string is a plain substring. Items are per-trial groups with the exact match_count and the first five matching events, ordered by trial id; limit defaults to 50, at most 200. Keep paging while hasMore (has_more in Python) is true; a pattern too expensive to evaluate is refused with invalid_input.

passAtK

Reads stats.evals[key].pass_at_k off a job you already hold, as sorted numbers; no request is made. Groups that cannot answer are left out, so an empty array means the job has no pass@k to show.