Skip to main content

Agent Eval & Testing (Cage Eval)

Cage Eval lets you define reproducible test scenarios for AI agents. Run agents against assertions, detect flaky behavior, and catch regressions before shipping.

Concepts

  • Scenario — A single test case: a prompt, a sandbox template, and assertions to verify the output
  • Suite — A group of related scenarios for batch execution
  • Run — A single execution of a scenario, producing assertion results and a score
  • Assertion — A verification check (file exists, output contains, cost below, etc.)

YAML File Format

Suite File (.caged-eval.yaml)

Single Scenario File (*.scenario.yaml)

Assertion Types

CLI Commands

Flakiness Detection

Run a scenario N times and measure consistency:
Returns:
  • Pass rate (e.g. 8/10 = 80%)
  • Per-assertion flakiness breakdown
  • Verdict: stable, flaky, or broken

Regression Detection

Compare current run against baseline (last N runs):
Detects:
  • Score drops (>10% threshold)
  • New failing assertions
  • Cost increases (>20% threshold)

CI/CD Integration

Add to your CI pipeline:

API