Your agent passed CI once. That proves nothing.
Reliability metrics and statistically sound CI gates for AI agents evaluated with repeated runs.
Watch the 30-second film. Every number in it is real output of this repo's example files.
Most agent evals run each task once and gate CI on a score threshold. Agents are stochastic, so the same commit can pass on Monday and fail on Tuesday, and you get false alarms and false all-clears.
reliagate treats the task as the unit of evidence:
- Run every task
ktimes and ask whether it is solved consistently, not just once. - Measure reliability, not luck:
pass^k, unbiasedpass@k, consistency classes, Wilson and task-level bootstrap intervals. - Gate on a paired statistical test between two versions (McNemar, with Wilcoxon and a Newcombe interval alongside), with exit codes your CI can trust.
Pure Python, zero dependencies, 148 offline tests.
Why pass@k is not enough
The film above uses the two files in examples/: the same 40 tasks, 4 runs each, before and after a change.
| v1 | v2 | |
|---|---|---|
pass@4: solved at least once |
1.00 | 1.00 |
pass^4: solved every time |
0.85 | 0.65 |
pass@4 says nothing changed. In fact 9 tasks that used to pass every run now fail some of the time, and only 1 went the other way:
$ reliagate gate --base examples/base.jsonl --new examples/new.jsonl
gate decision: REGRESSION (exit 2)
consistently solved: base 34/40 -> new 26/40
gained (b)=1 lost (c)=9 b-c=-8 test=mcnemar_exact p=0.02148
...
Quickstart
pip install reliagate
from reliagate import read_jsonl, pass_k, pass_at_k, compare, gate
v1 = read_jsonl("examples/base.jsonl") # one line per trial: {"task_id", "attempt", "success"}
v2 = read_jsonl("examples/new.jsonl")
pass_at_k(v2, k=4) # 1.0 solved at least once in 4
pass_k(v2, k=4).value # 0.65 solved in all 4
pass_k(v2, k=4, ci="wilson_indicator").ci # (0.495, 0.779)
r = compare(v1, v2) # paired McNemar on "consistently solved"
r.b, r.c, r.p_value # (1, 9, 0.02148)
gate(v1, v2, max_regression=0.05).exit_code # 2: significant regression
Trials are {"task_id": "checkout", "attempt": 0, "success": true}. success: null means the trial abstained or hit an infrastructure error. It stays in the denominator and is never counted as a failure.
Gate your CI
- run: pip install reliagate
- run: reliagate gate --base evals/main.jsonl --new evals/pr.jsonl --max-regression 0.05
| Exit | Meaning |
|---|---|
0 |
pass: the drop in consistently-solved tasks is within --max-regression |
2 |
significant regression in consistently-solved tasks |
3 |
infra or usage error, including too many infra-errored trials: never a silent pass |
4 |
inconclusive: a drop beyond the limit that the data can't confirm. Run more tasks |
Full recipe, including how to size the run with plan() and stop early with SPRT: docs/ci-gate.md.
Documentation
| Getting started | data format, the example walkthrough, collecting runs |
| Metrics | every estimator, its definition and what it is verified against |
| CI gate | GitHub Actions recipe, exit codes, planning and early stopping |
| Design and limitations | abstentions, zero dependencies, what reliagate does not do |
| First real study | the toolkit on 494 real tau-bench retail tasks |
| Changelog | what changed in each release |
| Roadmap | what's done and what's next |
Validated on real data
docs/results/first-study.md applies reliagate to real tau-bench retail trajectories, regenerated deterministically by scripts/first_study.py with no LLM calls. On 494 tasks at k=2, pass^2 = 0.907 (Wilson 95% CI [0.878, 0.930]). With k=4, the pass@k minus pass^k gap reaches +0.20 for one gating policy. All five paired policy comparisons come out null and underpowered, and the study says so instead of rounding them into a win.
Contributing
Issues and PRs are welcome. Read CONTRIBUTING.md first: the core stays stdlib-only and every claim must be backed by a test or a rerunnable script. If you use reliagate in research, please cite it (CITATION.cff).
MIT © 2026 Youssef Ouhaghi
Metadata
Release files for reliagate 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reliagate-0.2.0.tar.gz | 46.3 kB | With provenance | Details for reliagate-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reliagate-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for reliagate-0.2.0-py3-none-any.whl |
Total release size: 80.1 kB
Release files / reliagate-0.2.0.tar.gz
| Download URL | reliagate-0.2.0.tar.gz |
|---|---|
| Size | 46.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e602b77bf12098145de952b6855a5f318de437c39e4a179c0fbe7f8b01f32bef
|
|
BLAKE2b-256 checksum How to use checksums |
cdad30b3012bf94b2f947f81611f2df59ee17c06568cf16a283095be5a7701bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / reliagate-0.2.0-py3-none-any.whl
| Download URL | reliagate-0.2.0-py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb375e048f9b24cac6308f126f6e8a259620f14daff2b0c8f96c0a3a2811016e
|
|
BLAKE2b-256 checksum How to use checksums |
f53aa61dcbba30f17d81cf5834a2619808a06030d6207aae75ddf3a757717280
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for reliagate 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for reliagate-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.