open source · python · declarative

Call it once
it stabilizes.

Define an experiment in YAML + SQL. A rigorous engine computes the cumulative effect, its confidence interval and power over the experiment's lifetime — and refuses to call a winner until the estimate stabilizes.

SRM-gated peeking-honest BI-agnostic
checkout_conversion · treatment vs control
+4.2% 95% CI [+2.7%, +5.7%]
WIN
day 1horizonday 30
p-value
0.001
power
0.92
method
CUPED t
SRM
pass
Reads from
ClickHouse Pg PostgreSQL My MySQL
Feeds
GrafanaLightdashMetabaseSuperset · orchestrate with Prefect
01 · Declare

An experiment is
YAML + SQL.

Assignment, variants and comparisons in one file, referencing a reusable library of metrics. Everything correctness-critical — the cohort join, the window filter, per-unit dedup, alpha — is packaged, never hand-repeated. Like dbt, like detectkit.

  • experiments/*.yml — the split & the metrics to read
  • metrics/*.yml — reusable SQL, shared across experiments
  • numpy-first — no pandas in the hot path
experiments/checkout_v2.yml YAML
name: checkout_v2
start_date: 2026-01-05 # pinned window start
end_date: 2026-01-26 # planner horizon
unit_key: user_id
cadence: 1d
 
assignment: # READ-ONLY exposure source
query_file: sql/checkout_v2.sql
variants: [control, treatment] # first = control
expected_split: { control: 0.5, treatment: 0.5 }
 
alpha: 0.05
correction: bonferroni # two-tier: main vs the rest
 
comparisons:
- metric: checkout_conversion # metrics/*.yml
is_main_metric: true
method: { name: cuped-t-test, params: { covariate_lookback: 14d } }
- metric: revenue_per_user
method: { name: bootstrap }
02 · Compute

A statistical engine you can trust.

Ported from a battle-tested legacy engine and improved deliberately — never a number changed silently. Each method is a plugin: relative & absolute effects, CI, p-value, MDE/power, multiple-testing correction.

// t-test parametric
t-test
Difference of means, unequal variance (large-sample normal approx) — the default for continuous metrics.
// two-prop parametric
Proportion z-test
Conversion & rate metrics, absolute and relative.
// cuped variance ↓
CUPED
Pre-experiment covariate adjustment — same power, less sample.
// ratio delta-method
Ratio metrics
Per-session ratios with the delta-method variance.
// bootstrap vectorised
Bootstrap family
Plain, paired, Poisson & post-normed — numpy-vectorised.
// correction family-wise
Multiple testing
Two-tier Bonferroni + read-time Benjamini-Hochberg across a metric family.
03 · Stabilize

Watch the estimate converge.

The signature chart: cumulative effect + CI, one point per day since launch. The band tightens as sample accrues. The daily view peeks — so abk validate measures the real cumulative-peeking FPR, and the readout refuses a pre-horizon WIN / LOSE.

checkout_conversion · treatment vs control · n = 96,090
+4.2% 95% CI [+2.7%, +5.7%]
WIN · stabilized
day 1day 15horizon · day 22day 30
cumulative effect 95% confidence interval zero / no effect decision horizon
04 · Decide

Five states. One contract.

Every metric resolves to exactly one state — colored from the same five tokens across the chat readout, the HTML report and the cockpit. SRM is a hard gate: it is checked before any effect is trusted.

WIN
+4.2%
Significant lift, stabilized past the horizon. Ship it.
LOSE
−3.1%
Significant harm — the whole CI is below zero. Roll back.
FLAT
+0.3%
Well-powered and null. A true no-change, not missing data.
INCONCL.
+2.1%
Underpowered — MDE not reached. Keep the experiment running.
SRM
Split ratio failed the χ² gate. Results withheld, row flagged.
05 · Validate

Prove your method is calibrated.

abk validate runs an A/A false-positive + power matrix that measures your method's real α — including the honest cumulative-peeking FPR — not the nominal 5% you assumed.

4.8%
fixed-horizon α
18.3%
naïve daily-peek α
5.1%
sequential α
A/A false-positive matrix observed α vs 5% budget
1k5k20k50kpeek t-test 0.0610.0520.0490.0480.183 z-test 0.0580.0510.0500.0490.176 CUPED 0.0640.0530.0500.0490.181 bootstrap 0.0720.0550.0510.0500.191 ratio 0.0690.0560.0520.0500.188
within budget elevated over budget
06 · Explore

The cockpit is the point.

abk explore is a local, chart-first cockpit: turn method knobs — CUPED, stratification, alpha — and watch the stabilization chart recompute live, with A/A calibration always in view. The priority interface, built first.

Method
CUPED
Stratify
alpha
0.05
estimator
CUPED t-test
bootstrap (paired)
two-proportion z
live · recomputed on every knob WIN +4.2%
A/A calibration
4.9% ✓
variance ↓ (CUPED)
−38%
power
0.92
The CLI is the unit of automation

Four commands,
start to decision.

Idempotent and re-runnable — an experiment is a finite, deterministic recomputation. Run it by hand or schedule it with Prefect.

abk init· scaffold experiments/ + metrics/
abk explore· the live cockpit
abk run --report· self-contained HTML
abk validate· the A/A matrix
~/experiments
$ abk init # scaffold the project
$ abk explore # open the live cockpit
http://127.0.0.1:… # opens in your browser
 
$ abk run --select checkout_v2 --report
┌─ LOAD 96,090 exposures
┌─ SRM χ² p=0.42 · pass
┌─ COMPUTE 3 metrics
└─ READOUT checkout ▸ WIN +4.2%
 
report.html written (self-contained)
// declarative
YAML + SQL
Experiments & reusable metrics — no analysis code to maintain.
// cumulative
Stabilization chart
Effect + CI per day; call it once it converges.
// honest
Peeking-aware
Real cumulative FPR measured; sequential CIs one toggle away.
// gate
SRM checked first
Blocking-but-non-dropping: loud flag, preserved row.
// bi-agnostic
One clean table
_ab_results for Grafana, Lightdash, Metabase, Superset.
// ai-native
abk init-claude
Assistant context + skills to scaffold and tune with you.