Skip to main content
The eval suite runner executes declared Cases sequentially and returns a SuiteResult. Each case runs one input against one agent or team, then applies an optional judge check (AgentAsJudgeEval via criteria) and an optional reliability check (ReliabilityEval via expected_tool_calls).

Case

A Case describes a single input and its checks. It’s a frozen dataclass; construction raises ValueError unless exactly one of agent or team is set and at least one check (criteria or expected_tool_calls) is configured.

JudgeMode

JudgeMode is a string enum whose values match AgentAsJudgeEval.scoring_strategy. The plain strings "binary" and "numeric" work anywhere a JudgeMode does.

run_cases and arun_cases

arun_cases takes the same arguments and is awaited. run_cases is a sync wrapper that runs the whole suite on a single event loop via asyncio.run. The runner performs no console I/O; all presentation flows through the hooks. Hooks must be sync callables invoked on the event loop. A hook that raises, or an async hook, is recorded as a hook: error on the case without aborting the suite. A cancelled run aborts the suite; the unrun cases are appended as failed with skipped=True so the payload accounts for every selected case.

CaseResult

SuiteResult

cli and acli

cli runs an argparse CLI over the given cases and returns the exit code. Call it from a script’s __main__ block with sys.exit(cli(CASES)). acli takes the same arguments and is the awaitable variant for callers already inside an event loop. When argv is None, arguments are read from sys.argv.

Flags

Exit codes