Basic Example
Here,AgentAsJudgeEval takes the Agent’s input and output and scores the response against the criteria you set.
agent_as_judge.py
Custom Evaluator Agent
You can use a custom agent to evaluate responses with specific instructions:agent_as_judge_custom_evaluator.py

Params
Methods
run() / arun()
Run the evaluation synchronously (run()) or asynchronously (arun()).
Provide either (
input, output) for single evaluation OR cases for batch evaluation, not both.Run in a Suite
To gate many judge checks in CI, declare aCase per input with criteria and run them as a suite. judge_mode and judge_threshold on the Case map to scoring_strategy and threshold here, with the same defaults. See Eval Suites.
Examples
Basic Agent as Judge
Basic usage with numeric scoring and failure callbacks
Agent as Judge as Post-Hook
Automatic evaluation after agent runs