CLI + GitHub Action · Apache-2.0 Core + Pro Packs

Deterministic Chaos Testing for AI Agents

Catch duplicate charges, broken rollbacks, and infinite tool-call retry loops in CI before merging. afc proxies your agent's HTTP tool calls, injects deterministic faults, and asserts real database and API state.

End-to-end demo of agent-fault-check: injecting commit_then_fail, catching a duplicate write in PostgreSQL, verifying the idempotency fix with SARIF output, and gating PRs in GitHub Actions

How afc Fits Into Your CI Workflow

AI agents fail in production when tool APIs time out, drop responses after writing, or return corrupt JSON. afc sits between your agent and disposable test tools in CI to catch those bugs deterministically before merge.

YOUR CI RUNNER / LOCAL DEV (GitHub Actions · Docker · Laptop — Zero Telemetry) 1. PULL REQUEST afc run chaos-spec.yaml 2. YOUR AI AGENT Python / TS / Go LangGraph · CrewAI · SDK POST /orders 502 / timeout! 3. afc FAULT PROXY Injects Deterministic Faults commit_then_fail · 502 · timeout fail_before_upstream · bad JSON 201 OK 4. TEST TOOL & STATE Upstream API + Stores Postgres · Redis · HTTP Row committed before 502! Query real state 5. ASSERTIONS & BUDGETS sql_row_count · redis · max_tool_calls Verifies retry + exact DB row count EXIT 1 · PR BLOCKED (BUG CAUGHT) Agent retried without idempotency → 2 rows SARIF AFC101 + JUnit + redacted timeline EXIT 0 · PR APPROVED (RESILIENT) Agent reused idempotency key → 1 row Safe to merge · zero duplicate writes

The Problem Without afc

Unit tests mock happy paths. In production, a single dropped 201 response or mid-saga 500 causes AI agents to double-charge customers, leak Redis locks, or burn API budgets in retry loops.

The Guarantee With afc

Every PR runs deterministic network faults against real disposable Postgres, Redis, and HTTP endpoints—blocking regressions with exit code 1 and GitHub Code Scanning (SARIF) annotations before code ships.

$ afc run --spec chaos-spec.yaml --sarif afc-results.sarif
Scenario: checkout_retry_on_dropped_response
Fault:    commit_then_fail on POST /v1/charges (upstream committed, socket dropped)
Timeline: #1 POST /v1/charges -> 200 upstream, fault injected (reset)
          #2 POST /v1/charges -> 200 OK (agent retried without idempotency key)

FAIL  sql_row_count(postgres.orders): expected 1, got 2  [AFC101]
FAIL  no_duplicate_writes: duplicate mutation detected   [AFC102]
SARIF wrote afc-results.sarif (GitHub Code Scanning ready)
Exit code: 1 (PR merge gate blocked)

Built for Real CI Merge Gates

No flaky LLM-as-a-judge heuristics. Deterministic network faults paired with hard state assertions.

1. HTTP Fault Injection Proxy

Intercepts agent HTTP tool calls and injects commit_then_fail (response dropped after upstream write), fail_before_upstream, and malformed_json.

2. State & Budget Assertions

Verifies actual side effects in PostgreSQL, Redis, and HTTP state endpoints alongside max_tool_calls and no_duplicate_writes retry checks.

3. Native CI & Security Reports

Outputs console summaries, JUnit XML, and SARIF 2.1.0 (AFC101–AFC201) with automatic secret redaction for GitHub Code Scanning.

Simple, Transparent Pricing

Start with the Apache-2.0 OSS CLI. Upgrade to Pro or Team for Redis/HTTP assertion packs, SARIF/JUnit reporting, and unlimited scenarios. Billing and license delivery are handled securely by Polar.sh.

OSS Core
$0 / forever
Apache-2.0 Open Source
  • Up to 3 scenarios per run
  • HTTP fault injection proxy
  • PostgreSQL & tool budget assertions
  • Console output & GitHub Action
Download OSS
Team
$99 / month
7-day free trial · or $990/year (2 months free)
  • Everything in Pro
  • Up to 10 developers / CI orgs
  • Commercial team license key
Start 7-Day Free Trial

Zero Telemetry. Runs 100% in Your Environment.

afc runs locally on your laptop or inside your own CI runners. It never sends prompts, database rows, or HTTP payloads to external servers. Pro license validation contacts Polar.sh solely to verify your license key.

Questions or enterprise invoicing? Email [email protected].