A single judge gives you one judgment.
A jury aggregates multiple judgments into a verdict with diagnostic information — when something fails, you can see which checks failed, which tier failed, and why.Agent Judge provides two jury types:
Jury
Use when
SimpleJury
All judges run as peers — aggregate with voting
CascadedJury
Judges are organized in cost tiers — fail fast on cheap checks, escalate to expensive ones
The snippets below omit imports for brevity. See API Reference for package names.
SimpleJury aggregates peers. It does not provide fail-fast cost control. Use CascadedJury when you want cheap checks to prevent expensive judges from running.
MajorityVotingStrategy strategy = new MajorityVotingStrategy( TiePolicy.FAIL, // What to do on a tie ErrorPolicy.TREAT_AS_FAIL // How to handle ERROR judgments);
TiePolicy — when pass count equals fail count:
Policy
Behavior
TiePolicy.PASS
Optimistic — resolve ties as PASS
TiePolicy.FAIL
Pessimistic — resolve ties as FAIL (default)
TiePolicy.ABSTAIN
Neutral — no verdict
ErrorPolicy — when a judge returns JudgmentStatus.ERROR:
Policy
Behavior
ErrorPolicy.TREAT_AS_FAIL
Count errors as failures (default)
ErrorPolicy.TREAT_AS_ABSTAIN
Count the judge as having abstained
ErrorPolicy.IGNORE
Exclude the errored judge from the vote count and diagnostics
A cascaded jury organizes judges into tiers.
Each tier is itself a jury (typically a SimpleJury).
Tiers execute sequentially — if a cheap tier already has a verdict, expensive tiers never run.