Metadata-Version: 2.5
Name: agent-reliability-ci
Version: 3.6.0
Summary: Did your change make your AI agent worse? Runs your own tests on the old and new version in paired rounds and answers PASS, BLOCK or INCONCLUSIVE as an exit code. Also compares Claude Code plugin versions and reads Claude Code and Codex logs.
Project-URL: Homepage, https://github.com/ajaysurya1221/agent-reliability-ci
Project-URL: Source, https://github.com/ajaysurya1221/agent-reliability-ci
Project-URL: Changelog, https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/ajaysurya1221/agent-reliability-ci/issues
Project-URL: Design records, https://github.com/ajaysurya1221/agent-reliability-ci/tree/main/docs/design
Author: Ajay Surya Senthilrajan
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: ai-agents,ci,claude-code,codex,coding-agents,evaluation,fault-injection,llm,pytest,regression,reliability,reproducibility,statistics,testing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: pydantic<3,>=2.7
Requires-Dist: pyyaml<7,>=6
Provides-Extra: langchain
Requires-Dist: langchain<2,>=1.4.9; extra == 'langchain'
Description-Content-Type: text/markdown

<div align="center">

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/wordmark-dark.svg">
  <img src="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/wordmark-light.svg" alt="arci" width="280">
</picture>

### Know if a change made your AI agent worse, before you ship it.

ARCI is the statistical regression gate for the evaluations you already have: it reruns your suite on the old and the new version and answers PASS, BLOCK or INCONCLUSIVE against the loss you fixed in advance.

[![PyPI](https://img.shields.io/pypi/v/agent-reliability-ci?label=pypi)](https://pypi.org/project/agent-reliability-ci/)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://pypi.org/project/agent-reliability-ci/)
[![CI](https://github.com/ajaysurya1221/agent-reliability-ci/actions/workflows/ci.yml/badge.svg)](https://github.com/ajaysurya1221/agent-reliability-ci/actions/workflows/ci.yml)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/LICENSE)

**[Quickstart](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/README.md#quickstart)** · **[Recipes](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-change.md)** · **[Evidence](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/README.md#see-the-evidence-build)** · **[Studies](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/STUDIES.md)** · **[Neighbouring tools](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/NEIGHBOURS.md)** · **[Full reference](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/REFERENCE.md)**

</div>

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/replay-dark.svg">
  <img src="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/replay-light.svg" alt="Replay of a real run: a Claude Code plugin with one rule deleted, six tasks, a cap of 20 rounds. In every round the new version did worse than the old on two or three tasks. The BLOCK score, the evidence that the mean loss is above the allowed margin, climbed past its bar of 40 at round 11, and ARCI answered BLOCK, exit 1. The old version passed 64 of 66 task runs and the new version 43 of 66." width="100%">
</picture>

## Quickstart

### 1 · Try the offline example

With uv installed, run the bundled 20-task suite. The comparison runs offline without an account or API key. The old version passes 18 tasks and the new version passes 4, enough to BLOCK in round 1.

```console
$ uvx --from agent-reliability-ci arci check-change --example
VERDICT: BLOCK (exit 1)
```

For the six-step replay demo, run `uvx --from agent-reliability-ci arci demo`.

### 2 · Check your own change

Ask what your round budget can decide, then compare. Each side is the command you already use to test your agent. Here the tests read the prompt file named by `AGENT_PROMPT`, so that file is the one difference between the two sides; if your tests ignore the switch, both sides run the same thing.

```sh
pip install agent-reliability-ci
arci plan change --tasks 20 --baseline-rate .90 --candidate-rate .90 --max-rounds 10,20
arci check-change \
  --baseline  'env AGENT_PROMPT=prompts/old.txt python -m pytest tests/agent --junitxml={out}' \
  --candidate 'env AGENT_PROMPT=prompts/new.txt python -m pytest tests/agent --junitxml={out}' \
  --max-rounds 20 --out-dir prompt-comparison
```

### 3 · Gate it in CI

PASS exits 0 when the evidence puts the mean loss below your margin on these tasks (10 points by default). BLOCK, INCONCLUSIVE and ERROR fail the check by default.

```yaml
# One step in your job, after checkout and installing your test dependencies
- name: Did the new prompt make the agent worse?
  uses: ajaysurya1221/agent-reliability-ci@v3.6.0
  with:
    mode: check-change
    baseline: env AGENT_PROMPT=prompts/old.txt python -m pytest tests/agent --junitxml={out}
    candidate: env AGENT_PROMPT=prompts/new.txt python -m pytest tests/agent --junitxml={out}
    max-rounds: '20'
    out-dir: prompt-comparison
```

The Action writes the verified report to the job summary. Evidence uploads are off by default. For a suite that needs credentials, see [Forks and secrets](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-change.md#forks-and-secrets).

## Why ARCI

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/features-dark.svg">
  <img src="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/features-light.svg" alt="Four features. Your tests, not a new framework: any test command that writes JUnit XML, CSV or JSONL rows with task_id and outcome, or a supported promptfoo JSON export. Sealed before scoring: after one discovery run, ARCI fingerprints the rule and the task list before round 1. Stops as soon as it can: it checks after every complete round and stops at the first one that decides. An answer CI understands: PASS exits 0, BLOCK 1, INCONCLUSIVE 2, and a finished round's verdict can be recomputed from its rule and saved snapshots." width="100%">
</picture>

Accepted result formats and what each needs: [check-change recipe](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-change.md).

## See the evidence build

In the plugin run at the top of this page, ARCI updated two scores after each complete round. The BLOCK score tracked evidence that the mean loss exceeded the allowed margin. The PASS score tracked evidence that the loss was below it. The BLOCK score crossed 40 in round 11, ending the run.

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/evidence-dark.svg">
  <img src="https://raw.githubusercontent.com/ajaysurya1221/agent-reliability-ci/main/docs/assets/evidence-light.svg" alt="Line chart on a log scale over rounds 1 to 20. The BLOCK score rises from 1 to 57.4 and crosses the decision bar of 40 at round 11. The PASS score falls from 1 to 0.0035. Rounds 12 to 20 were not needed." width="100%">
</picture>

The bar of 40 keeps a wrong BLOCK and a wrong PASS each at or below 1 in 40, under conditions that every verdict lists. [The printed report](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/results/plugin-eval-2026-11-30/v1-v3-report.txt) · [The statistics, in full](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/STATISTICS_OUTCOMES.md)

## Works with what you have

`pytest / JUnit XML` · `CSV` · `JSONL` · `promptfoo` · `claude plugin eval` · `Inspect AI` · `Claude Code logs` · `Codex logs` · `GitHub Actions`

| You have | Run | You get |
|---|---|---|
| A test command for your agent | [`arci check-change`](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-change.md) | PASS, BLOCK or INCONCLUSIVE on fresh paired rounds |
| A Claude Code plugin or skill with eval cases | [`--format claude-plugin-eval`](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/claude-plugin-eval.md) | The same verdict, version 1 against version 2 |
| Local Claude Code or Codex session logs | [`uvx --python 3.14 realornoise`](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/logs.md) | A separate diagnostic for changes in session measures such as reasoning tokens per response |
| Pass and fail results from another tool | [`arci verdict`](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/REFERENCE.md) | A descriptive verdict, with no new runs |
| Attack cases that another tool ran and graded, as CSV or JSONL | [`arci check-attacks`](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-attacks.md) | PASS, BLOCK or INCONCLUSIVE on the mean attack success rate against your limit, and every case that succeeded. Never a statement that the agent is safe |

## Stronger gates (3.5)

- `--floor 0.8` makes PASS require evidence that the new version’s mean pass rate exceeds 80% as well as meeting the loss margin.
- `--critical TASK_ID` lets evidence of a loss on that task veto a suite PASS.
- `--cluster round` allows tasks in the same round to fail together, at the price of about 79 independent rounds for an all-ties PASS at a 10-point margin with no floor.

Use `--max-launches` or `--max-minutes` to budget whole rounds. For Claude plugin eval, `--max-cost-usd` checks observed spend before starting another round. The final round can take spend over budget. [Thresholds and budgets](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-change.md)

## Real runs, misses included

| Change | Verdict | Old passed | New passed |
|---|---|---:|---:|
| Plugin: one rule deleted | **BLOCK** at round 11 | 64 of 66 | 43 of 66 |
| Plugin: one line added | **INCONCLUSIVE** after 20 rounds | 117 of 120 | 115 of 120 |
| Study Note-0, Gemma 4 12B: working note dropped | **BLOCK** at round 1 | 15 of 16 | 0 of 16 |
| Study Note-0, Gemma 4 12B: identical copy | **PASS** at round 6 | 15 of 16 each round | 15 of 16 each round |

The plugin rows are one maintainer run each on 30 Nov 2026 (Claude Code 2.1.322, `haiku`), not a study: [plugin recipe](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/claude-plugin-eval.md#real-runs). Note-0 was registered before it ran; its second model, Qwen 3.5 4B, was not admitted, so the registered two-model test did not happen: [Note-0 result](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/plan/exec/v2/study/RESULT-note-0.md). More studies and their registrations: [docs/STUDIES.md](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/STUDIES.md).

## What it does not tell you

- It answers for the tasks and the two versions you give it, nothing wider.
- Every verdict lists the conditions its error bound requires, including independence across rounds.
- On Windows, `check-change` installs and prints `--help` but does not run comparisons, and the log reader is untested.
- One maintainer builds it, and nobody outside the project has reported a run yet. [Tell us about yours](https://github.com/ajaysurya1221/agent-reliability-ci/issues).

## Learn more

- [Full reference](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/REFERENCE.md): everything this page used to hold, including controlled trials with `arci run`, the gate and its GitHub Action, LangChain agents, the log reader's limits, verdicts and exit codes, and development.
- [Recipes](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/recipes/check-change.md) · [Statistics](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/STATISTICS_OUTCOMES.md) · [Studies](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/STUDIES.md) · [Neighbouring tools](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/docs/NEIGHBOURS.md) · [Changelog](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/CHANGELOG.md)

## Community

[Contributing](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/CONTRIBUTING.md) · [Code of conduct](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/CODE_OF_CONDUCT.md) · [Security](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/SECURITY.md) · [Cite ARCI](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/CITATION.cff) · [Apache-2.0](https://github.com/ajaysurya1221/agent-reliability-ci/blob/main/LICENSE)
