Skip to main content

Running Commands

Agent Bench runs via Maven exec plugin:
Use agent-bench-agents when running benchmarks with LLM judges (like code-coverage). Use agent-bench-core for simple benchmarks (like hello-world) or when Spring AI Agents dependencies are unavailable.

Commands

list

List available benchmarks.

tasks

List tasks in a benchmark.
FlagRequiredDescription
--benchmarkYesBenchmark name

run

Run a benchmark end-to-end: set up workspace, invoke agent, grade result.
FlagRequiredDescription
--benchmarkYesBenchmark name
--agentNoPath to agent config YAML. If omitted, workspace is prepared for manual grading.
--taskNoRun only this specific task ID
--difficultyNoFilter tasks by difficulty: easy, medium, or hard
Output: Creates runs/<uuid>/ with result.json, run-metadata.json, and per-task directories.

resume

Resume an interrupted run. Skips tasks that already have a result.json.
FlagRequiredDescription
--run-idYesUUID of the run to resume

compare

Compare results across multiple runs.
FlagRequiredDescription
--runsYesTwo or more run directory paths
Output: Table comparing agent, accuracy, pass@k, cost, duration, and trial count.

provide

Set up a workspace for manual agent invocation (without running an agent).
FlagRequiredDescription
--benchmarkYesBenchmark name
--taskNoTask ID (if benchmark has multiple tasks)
--workspaceYesDirectory to set up

grade

Grade an existing workspace without running an agent.
FlagRequiredDescription
--benchmarkYesBenchmark name
--taskNoTask ID
--workspaceYesDirectory to evaluate

Output Structure

Failure Modes

When a trial fails, the failureMode field classifies why:
ModeMeaning
NONETask resolved successfully
AGENT_TIMEOUTAgent process timed out
AGENT_ERRORAgent process exited with non-zero code
CONTEXT_LENGTH_EXCEEDEDAgent hit LLM context length limit
SETUP_ERRORSetup script failed before agent ran
GRADE_ERRORJudge/grading itself failed
BUILD_FAILUREMaven build failed during grading
TEST_FAILURETests failed during grading
UNKNOWNUnclassified failure