Skip to content

Fetch a judgment with its copies

View as Markdown
GET
/v1/judgments/{judgmentId}
curl --request GET \
--url https://example.com/v1/judgments/example \
--header 'Authorization: Bearer <token>'

Returns the judgment (live or not) with the stored copy of the run’s input and output and, when the judgment pointed at an item, its value.

judgmentId
required
string
>= 1 characters

Judgment id.

Judgment with copies.

Media typeapplication/json

A judgment with the stored copies of what was judged.

object
id
required
string
tenantId
required
string
projectId
required
string
runId
required
string
subject
required

What a judged run ran: an agent at a version, or a flow at a version.

object
kind
required
string
Allowed values: agent flow
id
required
string
version
required
string
item
required

The judged item of a run’s output.

object
key
required

The caller’s stable id for the item. kindgi:correction is reserved: a judgment on it is accepted only when it carries a correction at pointer "".

string
>= 1 characters
pointer

Where the item is in the run’s output, as a JSON Pointer (RFC 6901), e.g. /matches/2. "" is the whole output.

string
rank

The item’s position in a ranked list (0 = first).

integer
verdict
required
string
Allowed values: yes no
reason
string
correction

The expert’s correction of the run’s decisions, when they gave one.

object
calls
required

The calls the agent should have made.

Array<object>
<= 50 items
object
tool
required
string
>= 1 characters <= 200 characters
args
required

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
<= 100 properties
notCalled
required

Tools that should not have been called at all.

Array<string>
<= 50 items
judgeClassId

The judge class the judgment is recorded under. Absent when unclassified (counts with weight 1).

string
restricted

Present (true) when the judge class was restricted (assertableBy) when the judgment was recorded, so the judge was checked against it. A restriction added or lifted later doesn’t change it.

boolean
assertedBy
required

Who asserted a judgment: the authenticated caller, never a typed name.

object
kind
required
string
Allowed values: user service
id
required

A user id, or for a service token its token or session id.

string
participantId

The app’s opaque id for its end user who judged, when an app judged on their behalf.

string
createdAt
required
string format: date-time
unregisteredAt

Set when the judgment was removed or superseded.

string format: date-time
supersededBy

The judgment that replaced this one.

string
run
required

The stored copy of a judged run’s input and output, taken when it was first judged.

object
runId
required
string
subject
required

What a judged run ran: an agent at a version, or a flow at a version.

object
kind
required
string
Allowed values: agent flow
id
required
string
version
required
string
input
required
context

What a judged run needs besides its input to be replayed, captured when it was first judged. 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
history

The conversation’s messages before the turn, oldest first (at most the last 200).

Array
historyTruncated

Whether older messages were left out of history.

boolean
retrieved

What the turn’s retrievals returned.

recalled

Messages of earlier conversations the turn recalled (intents over conversations), as quoted to the model.

sessionApproval

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
approved
required
boolean
rationale

The reviewer’s reason for a rejection.

string
flow

For a flow run: what it did, kept at its first judgment 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
calls
required
Array<object>
object
runId
required

The run that made it: the flow run, a sub-flow’s, or an agent step’s turn.

string
nodeId

The tool node that made it, or the agent step whose turn did.

string
scope

The loop iteration, in a loop body.

string
toolId
required
string
arguments
result
fromEvent

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 judged before the mark was kept.

boolean
steps
required
Array<object>
object
runId
required
string
nodeId
string
scope
string
agentId
required
string
agentVersion
required
string
retrieved

What the step’s turn retrieved.

recalled

Messages of earlier conversations the step’s turn recalled.

truncated

More calls were made than were kept.

boolean
toolEnv

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
key
additional properties
object
key
additional properties
string
replayOf

When the judged run is a comparison’s replay: the run it re-ran, stamped at its first judgment. A test set built from judgments leaves replays out.

string
output
required
segments

The segment path the run was started with (empty: none). Absent for runs judged before it was recorded.

Array<object>
object
key
required

Lowercase, like an identifier: company, contact-role.

string
/^[a-z][a-z0-9_-]{0,63}$/
value
required
string
>= 1 characters <= 256 characters
capturedAt
required
string format: date-time
itemValue

The judged item’s value, when the judgment pointed at it.

Example
{
"subject": {
"kind": "agent"
},
"verdict": "yes",
"restricted": true,
"assertedBy": {
"kind": "user"
},
"run": {
"subject": {
"kind": "agent"
},
"context": {
"flow": {
"calls": [
{
"fromEvent": true
}
]
}
}
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No judgment with that id under this tenant.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
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.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

See also