run
Compare two pre-computed score files to get a statistically grounded verdict on whether an LLM agent's performance change is a real regression, improvement, or just run-to-run noise.
Instructions
Run the agent-regress CLI as a subprocess and return its parsed --json output, so an agent can get a statistically grounded verdict on whether an LLM agent's behavior actually shifted between two versions instead of eyeballing two numbers.
Call this after you already have two pre-computed sets of per-run scores (one JSON array of numbers per agent version, produced by whatever harness ran each version) and you need to know whether the difference between them is a real regression/improvement or just run-to-run noise. Do not call it to generate those scores in the first place -- it only compares numbers that already exist on disk. Right now the CLI has one subcommand, compare; pass ["--help"] or ["compare", "--help"] as args to discover any subcommands/flags added since this description was written.
Behavior: this is a read-only, idempotent operation with no network calls -- it spawns a local subprocess, reads the two score files you point it at, and writes nothing to disk itself. No API keys or network access are required, but the paths passed via --version-a-results/--version-b-results must already exist and contain valid JSON arrays of numbers. On a normal run (including a REGRESSED verdict with --fail-on-regression, which legitimately exits 1) the tool returns the CLI's parsed JSON report. On an actual failure (bad args, CLI not on PATH, unparseable output) it instead returns a dict with an "error" key and, where available, the captured "stderr"/"stdout".
Parameters:
args: list[str] -- CLI argv, NOT a shell string. Include the subcommand and its flags exactly as agent-regress would take them on the command line; --json is appended automatically if you omit it. Examples:
["compare", "--version-a-results", "a.json", "--version-b-results", "b.json"]
["compare", "--version-a-results", "a.json", "--version-b-results", "b.json",
"--metric", "tool_accuracy", "--min-effect", "0.3", "--fail-on-regression"]
["compare", "--help"]
Returns (JSON object) on success: metric, verdict (one of REGRESSED / STABLE / IMPROVED / INSUFFICIENT_DATA), p_value, effect_size, ci_lower, ci_upper, n_a, n_b, mean_a, mean_b, std_a, std_b, mean_delta, p_threshold, min_effect, and warnings (e.g. low sample size). On failure: error (and stderr/stdout when captured).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||