Skip to content

Running Evaluations

Terminal window
agentv eval evals/my-eval.yaml

Results are written to .agentv/results/eval_<timestamp>.jsonl.

Run against a different target than specified in the eval file:

Terminal window
agentv eval --target azure_base evals/**/*.yaml

Run a single eval case by ID:

Terminal window
agentv eval --eval-id case-123 evals/my-eval.yaml

Test the harness flow with mock responses (does not call real providers):

Terminal window
agentv eval --dry-run evals/my-eval.yaml
Terminal window
agentv eval evals/my-eval.yaml --out results/baseline.jsonl

Persist full execution traces (tool calls, timing, spans) to disk for debugging and analysis:

Terminal window
agentv eval evals/my-eval.yaml --trace

Traces are written to .agentv/traces/<timestamp>/<eval-file>.trace.jsonl as JSONL records containing:

  • evalId - The eval case identifier
  • startTime / endTime - Execution boundaries
  • durationMs - Total execution duration
  • spans - Array of tool invocations with timing and input/output
  • tokenUsage / costUsd - Resource consumption

When using workspace_template, temporary workspaces are created for each eval case. By default, workspaces are cleaned up on success and preserved on failure for debugging.

Terminal window
# Always keep workspaces (for debugging)
agentv eval evals/my-eval.yaml --keep-workspaces
# Always cleanup workspaces (even on failure)
agentv eval evals/my-eval.yaml --cleanup-workspaces

Workspaces are stored at ~/.agentv/workspaces/<eval-run-id>/<case-id>/.

Check eval files for schema errors without executing:

Terminal window
agentv validate evals/my-eval.yaml

Run agentv eval --help for the full list of options including workers, timeouts, output formats, and trace dumping.