SuperAPIAI Directory

agentstats

github.com · AI agents

Python statistical analysis for repeated AI-agent benchmark runs: significance tests, run-count planning and leaderboard uncertainty audits. Analyzes run tables; does not execute agents or establish production performance.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

agentstats is a Python statistical analysis library focused on the variance problem caused by repeated runs in AI agent benchmarks. It is applicable to any benchmark that marks task outcomes as success or failure, such as SWE-bench, WebArena, and OSWorld.

Main uses include: performing significance tests on performance gaps between agents; planning the minimum number of runs required to reach statistical significance; and auditing the uncertainty of leaderboards to determine whether rankings are stable.

Input requirements: a runs table where each row corresponds to one (agent, task, run) combination, and the success column can be 0/1 or a score in the [0,1] interval. The agent, task, run, and success columns must not contain missing values; extra columns can serve as nuisance factors.

Core features:

  • compare() provides Welch tests or permutation tests, supports multiple-comparison correction (Holm method), and strictly validates parameters.
  • The plan feature is based on pilot runs (at least 3) or a default of 5, and gives the minimum number of runs required to claim a minimum gap.
  • flip_statistics() is used to compute paired flip statistics while preserving the tie-handling approach.
  • k_min_from_components() plans the number of runs based on variance components, supporting both benchmark inference and population inference modes.
  • Provides diagnostic correlation (DEFF) recommendations, suggesting level="run" when the median DEFF > 1.5.

Usage: install from the GitHub repository (the package is not on PyPI; agentstats on PyPI is an unrelated package). Running the example script examples/leaderboard_uncertainty.py reproduces the leaderboard uncertainty analysis (requires matplotlib, about 25 seconds). The test suite uses pytest to test type I error, power of the plan, variance component recovery, etc.

Use cases: statistical analysis of agent benchmarks, leaderboard reliability auditing, and run planning. Limitations: it does not execute agents, does not establish production performance conclusions; the work grows with the number of agents; and users need to provide the runs table data.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools