Skip to content

client.judgments

client.judgments — the judgments operations.

On AsyncKindgi every method is the same, awaited.

list(
*,
limit: int | None = None,
cursor: str | None = None,
run_id: str | UUID | None = None,
agent_id: str | UUID | None = None,
agent_version: str | None = None,
flow_id: str | UUID | None = None,
verdict: Literal['yes', 'no'] | None = None,
judge_class_id: str | UUID | None = None,
participant_id: str | UUID | None = None,
scope_kind: Literal['tenant', 'org', 'project'] | None = None,
scope_id: str | UUID | None = None,
timeout: float | None = None,
) -> JudgmentCollectionPage

List judgments. GET /v1/judgments

Live judgments (not removed or superseded), newest first, cursor-paginated. Filter by run, agent (and version), flow, verdict, judge class or participant; ?scopeKind + ?scopeId narrow to a project.

create(
body: CreateJudgmentBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> Judgment

Judge an item of a run's output. POST /v1/judgments

Records yes or no, with an optional reason, about one item of a finished run's output, optionally under a judge class that applies to the run's project or agent (unclassified judgments count with weight 1). item.pointer (a JSON Pointer) must resolve in the run's output; its value is kept as itemValue. The first judgment of a run also stores a copy of the run's input and output. assertedBy is the authenticated caller, never the body. Judging again as the same caller for the same run, item key and participantId supersedes the earlier judgment. Needs judge on the run.

get(judgment_id: str | UUID, /, *, timeout: float | None = None) -> JudgmentWithCopies

Fetch a judgment with its copies. GET /v1/judgments/{judgmentId}

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.

unregister(
judgment_id: str | UUID,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
) -> UnregisterJudgmentResult

Remove a judgment. POST /v1/judgments/{judgmentId}/unregister

Soft delete: the judgment stops listing; retention policy decides when it is purged.