List Improve runs
const url = 'https://example.com/v1/improve-runs?limit=25&status=running';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/improve-runs?limit=25&status=running' \ --header 'Authorization: Bearer <token>'Newest first, only the Improve runs of agents the caller can read. ?agentId=, ?projectId= and ?status= narrow them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
Only the Improve runs in this project.
Only the Improve runs with this status.
Responses
Section titled “Responses”Page of Improve runs.
object
An Improve run: the runtime looking for better wording or settings values for an agent in a project, on the project’s test set, within a budget. A candidate that does better becomes a suggested change.
object
The project it works in. Absent from older servers, and on a run started for a tenant or an org before Improve runs worked in a project.
The version an Improve run starts from: the one the project runs, pinned there (pin) or the agent’s latest (latest).
object
The version of the project’s test set it searches and proves on; absent until it’s frozen.
The test set’s cases set aside for the proof: cases of of. None with fewer than five. Absent from older servers.
object
The tiers it tries, the prompt tier first.
Which corrections its comparisons count.
For the prompt tier: the provider and model that drafts the templates.
object
For the prompt tier: how many templates it drafts.
object
The most the Improve run’s comparisons may cost, in US dollars.
The most candidates it compares.
user:<id> or service:<id>.
Candidates tried so far.
What its comparisons have cost so far (US dollars).
A change passed more cases than the version the run started from, and failed none that passed: the run wrote it as a suggested change for a reviewer to decide.
object
No change the run tried did better: reason says why, and holdOut has the best change’s numbers when one got that far.
object
The best change’s proof numbers, when one got that far: on every case, or on the set-aside part for a run stored before that.
object
The run reached its budget with nothing kept.
object
What it spent, in US dollars.
The run failed: message says why.
object
The ids of the corrections it took when it started. Absent from older servers.
Why a cancelled Improve run stopped when nobody cancelled it: a comparison’s test run was cancelled for it (that run’s cancelReason, e.g. project-suspended). It wrote no suggested change. Absent when it was cancelled.
Its comparisons so far, each a test run to open: reference (the version as it is, on each part: what the proof is held to, case by case), each candidate (the block and the values it changed, on the search part: what picks the change to suggest), and the proof (the suggested change, on all the cases at the reference’s repetitions: what keeps it or not; an Improve run from before 0.4 ran its proof on the hold-out part). Absent from older servers.
object
object
For a drafted template that was never compared: why the check refused it (what it reads or names that the agent doesn’t have, or its size).
object
For a drafted template: what the drafter meant it to change.
The improve schedule and fire that started it (GET /v1/schedules/{triggerId}/fires); absent for an Improve run a person started.
object
Example
{ "data": [ { "startsFrom": { "follows": "pin" }, "tiers": [ "settings" ], "objective": "passRate", "groupWeights": "as-recorded", "status": "running", "outcome": { "kind": "suggested" }, "comparisons": [ { "role": "reference", "part": "search" } ] } ]}bad-input: projectId is not a UUID, or status is not a status.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}improve-unsupported: this runtime runs no Improve runs.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The database was too busy to answer in time (database-busy); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}