Skip to content

experimentation-toolkit

A robot holds up cartridges A and B; the scoreboard crowns A, A ships through the door and B goes to recycling

Agents propose, statistics decide, winners ship.

AI agents write new copy, layouts and features faster than any team can test them. The bottleneck is knowing which idea really won, without fooling yourself, and removing the losers before they pile up. experimentation-toolkit is the decision layer for that loop:

  • Decisions you can defend. Every verdict comes from typed, deterministic statistics: a sample ratio gate, multiple-testing correction and guardrails that veto a harmful win. The same data always gives the same decision.
  • More tests on the same traffic. A portfolio planner sizes each test to the real audience and runs together only the tests that can decide in time.
  • No invented numbers. The library never calls an LLM. Agents draft challengers and reports; the numbers and the wording of a result come from the statistics.
  • Agent-ready. An MCP server and four Claude Code skills cover every step from challenger to merged winner.

It decides the experiments of RetroSpeedLab, a game studio run by AI agents.

Quickstart

pip install experimentation-toolkit
from experimentation_toolkit import analyze_proportion

result = analyze_proportion(
    control_successes=2_600,
    control_total=5_000,
    treatment_successes=2_850,
    treatment_total=5_000,
    confidence_level=0.95,
    alternative="two-sided",
    metric_name="kept_rate",
)
print(result.absolute_effect, result.p_value)

Next: Getting started walks through one experiment from assignment to explanation, and Concepts explains how a verdict is reached.