Packages
Judge contracts
Judge is a functional interface whose single method maps JudgmentContext to Judgment.
AsyncJudge supplies the CompletableFuture variant.
JudgeWithMetadata marks a judge that exposes JudgeMetadata.
DeterministicJudge is the reusable base for rule-based implementations, and NamedJudge attaches identity to another judge without changing its evaluation.
Judges contains logical composition and naming helpers.
JudgmentContext
JudgmentContext is the immutable in-process input record.
It carries goal, workspace, execution duration, start time, optional agent output, execution status, optional error, and arbitrary context metadata.
The context metadata may contain framework-native objects because it does not cross the result boundary.
Bridge modules use it to expose relevant runtime evidence to ordinary judges.
ExecutionStatus values are SUCCESS, FAILED, TIMEOUT, CANCELLED, REFUSED, and UNKNOWN.
Judgment
Judgment is the immutable portable output record.
Direct factories are
pass(reasoning), fail(reasoning), abstain(reasoning), and error(reasoning).
verdict(boolean) starts an enrichable Boolean result without storing a duplicate score.
scored(normalizedScore).passingAt(threshold) builds a measured result whose status follows an explicit threshold.
The raw-scale overload normalizes a bounded source measurement before the threshold is applied.
effectiveScore() returns the explicit score when present, derives 1.0 or 0.0 for an unscored PASS or FAIL, and is empty for ABSTAIN or ERROR.
elapsed() derives Duration from the portable elapsedMillis metadata value.
Check
Check is a named Boolean sub-assertion with a message.
Use its passing and failing factories to explain the evidence contributing to an overall result.
Jury contracts
Jury.vote(context) returns a Verdict containing aggregate and individual evidence.
SimpleJury runs peer judges, while CascadedJury evaluates ordered tiers.
Voting strategies are MajorityVotingStrategy, ConsensusStrategy, AverageVotingStrategy, WeightedAverageStrategy, and MedianVotingStrategy.
TiePolicy, ErrorPolicy, and TierPolicy make edge behavior explicit.
See Jury System for their reduction rules.
AI composition
ModelBackedJudge combines JudgePromptTemplate, JudgeModel, and JudgmentClassifier.
JudgmentClassifiers supplies common classifiers, and LabelJudgmentClassifier maps explicit labels to outcomes and optional declared scores.
JudgeModelRequest and JudgeModelResponse are framework-neutral.
Usage records optional provider-reported input, output, reasoning, cache-creation, cache-read, and total token quantities, and projects them to portable metadata.
It never derives price or assumes that the categories sum to the reported total.
Framework bridges
SpringAiJudgeModel and AgentClientJudgeModel adapt those backends to the judging-side JudgeModel interface.
Version and migration
Use all Agent Judge artifacts at version0.15.0.
Consumers migrating from the former score hierarchy should follow the normalized Judgment migration guide.