Fetch a correction with its copies
const url = 'https://example.com/v1/corrections/example';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/corrections/example \ --header 'Authorization: Bearer <token>'Returns the correction (live or not) with the stored copy of the run’s input and output.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Correction id.
Responses
Section titled “Responses”Correction with copies.
A correction with the stored copies of what was corrected.
object
What a corrected run ran: an agent at a version, or a flow at a version.
object
Whether the run’s decisions were right. Absent when it says nothing about them.
With decisions: "wrong": the calls the agent should have made.
object
The partial set of top-level argument fields to compare, by value. Fields left out are not compared; an empty object asks only that the tool was called. At most 4000 characters in canonical JSON.
object
With decisions: "wrong": the tools that should not have been called.
Whether the run’s answer was right. Absent when it says nothing about it.
With answer: "wrong": what it should have said.
For an answer that is a ranked list: each item, and whether it was right there.
object
The caller’s stable id for the item, such as a matched case’s id, never the item’s own text.
Where the item is in the run’s output, as a JSON Pointer (RFC 6901), e.g. /matches/2.
The item’s position in the ranked list (0 = first).
The corrector group the correction is recorded under. Absent when unclassified (counts with weight 1).
Present (true) when the corrector group was restricted (assertableBy) when the correction was recorded, so whoever recorded it was checked against it. A restriction added or lifted later doesn’t change it.
Who asserted a correction: the authenticated caller, never a typed name.
object
A user id, or for a service token its token or session id.
The app’s opaque id for its end user who corrected it, when an app corrected it on their behalf.
Where it is in being fixed. with-owner while the agent’s owner decides; fixed only when a pin or a deploy fixed it, or it said nothing was wrong; removed can’t come back.
Who works on it: Improve, a developer, or the agent’s owner. Absent while unsorted.
Present while it’s fixed, and beside reopenedIn after a test run reopened it.
object
The version that fixed it. Absent for recorded-right, which nothing had to fix.
pin: a pin fixed it. latest: a deploy or an add moved Latest in a project that follows it. recorded-right: it said nothing was wrong.
Who asserted a correction: the authenticated caller, never a typed name.
object
A user id, or for a service token its token or session id.
Present after a test run got a fixed correction wrong again: it’s open, or with-owner when it’s sorted to the owner, with the fixedIn it had beside it. A status set by hand clears both, and a re-sort alone keeps them. A test run that gets it right again makes it fixed with a new fixedIn.
object
The version that gets it wrong.
How the project came to run it. pin: a pin. went-back: a pin of a version earlier than the one it ran just before. unpin: an unpin. latest: a deploy or an add moved Latest in a project that follows it.
Who pinned, went back or unpinned. Absent when Latest moved.
object
A user id, or for a service token its token or session id.
object
Who asserted a correction: the authenticated caller, never a typed name.
object
A user id, or for a service token its token or session id.
When it last changed: createdAt until something changes it.
Set when the correction was removed or superseded.
The correction that replaced this one.
The stored copy of a corrected run’s input and output, taken when it was first corrected.
object
What a corrected run ran: an agent at a version, or a flow at a version.
object
What a corrected run needs besides its input to be replayed, captured when it was first corrected. For an agent turn: the conversation before it, what its retrievals returned, and the decision at its session approval gate. For a flow run: its tool calls with their results. For both: the env values its tools were sent.
object
The conversation’s messages before the turn, oldest first (at most the last 200).
Whether older messages were left out of history.
What the turn’s retrievals returned.
Messages of earlier conversations the turn recalled (intents over conversations), as quoted to the model.
The reviewer’s decision at the turn’s session approval gate, when the turn waited on one. A replay of the turn follows it.
object
The reviewer’s reason for a rejection.
For a flow run: what it did, kept at its first correction so it can be replayed. Every tool call it made with its result (at its tool nodes, in its agent steps’ turns and in its sub-flows), at most 500, and its agent steps.
object
object
The run that made it: the flow run, a sub-flow’s, or an agent step’s turn.
The tool node that made it, or the agent step whose turn did.
The loop iteration, in a loop body.
An agent step’s turn kept the result as outside data: another system’s answer to a paused call, or a result its tool says is outside data. A replay hands it to the model as data, as the turn did. Absent for a tool node’s call, and for a run corrected before the mark was kept.
object
What the step’s turn retrieved.
Messages of earlier conversations the step’s turn recalled.
More calls were made than were kept.
The env values each tool’s calls were sent (needsSpec.env), by tool id: its first call’s, as the run recorded them. A replay sends them to a read-only tool it runs live, so the tool reads the config the run saw, not today’s. Absent for a run from before env was recorded.
object
object
When the corrected run is a comparison’s replay: the run it re-ran, stamped at its first correction. A test set built from corrections leaves replays out.
The segment path the run was started with (empty: none). Absent for runs corrected before it was recorded.
object
Lowercase, like an identifier: company, contact-role.
Example
{ "subject": { "kind": "agent" }, "decisions": "right", "answer": "right", "items": [ { "verdict": "right" } ], "expert": true, "madeBy": { "kind": "user" }, "status": "open", "sortedTo": "improve", "sorted": { "by": { "kind": "fix-job" } }, "link": { "kind": "improve-run" }, "fixedIn": { "how": "pin", "by": { "kind": "user" } }, "reopenedIn": { "how": "pin", "by": { "kind": "user" } }, "statusNote": { "by": { "kind": "user" } }, "run": { "subject": { "kind": "agent" }, "context": { "flow": { "calls": [ { "fromEvent": true } ] } } }}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" }}No correction with that id under this tenant.
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" }}