Live on x402 · $0.005 per check

Loop detection and
model stop-loss for
paid AI agents.

Detects stale retries, same-tool loops, premium-model burn, and unverified deploys before the next expensive step. 4 lines in your MCP config — works with Codex CLI, Claude Code, Cursor, Cline, Hermes Agent. 98.0% LCR · 100/100 on 130-step Odyssey, p50 0.004 ms.

Privacy-first No training on your data < 50 ms P95
Live on x402 ecosystem

Real settlements through real facilitators — every payment is on-chain on Base mainnet USDC.

AIBrake is registered in x402scan marketplace, callable via agentcash, runs in Hermes Agent & every MCP-capable IDE.

40+
Settlements
v0.7.2
on npm
$0.005
per check
Works in
Claude Code Codex CLI Cursor Cline Hermes Agent OpenClaw Goose OpenHands + any MCP / agentskills.io runtime
Test the live API — 1 paid call, $0.005

No signup. No API key. Real payment, real decision.

Hit the paid endpoint from any terminal with an agentcash wallet. Pays a fraction of a cent via x402 (USDC on Base) and returns the actual AIBrake decision your agent would see. Round-trip under 3 seconds.

# 1. Install the agentcash CLI wallet (one-time, ~$0.50 funds ~100 checks)
npm install -g agentcash
agentcash fund

# 2. Make a real paid call to the live AIBrake endpoint
npx agentcash try https://api.aibrake.dev/x402/v1/check

Want AIBrake permanently inside your agent? That's a different install — skill manifest + MCP server, no x402 payments. Jump to Install in your agent ↓ (Claude Code · Codex · Hermes · Cursor · Cline · Node SDK).

Or browse it live on x402scan — 40+ settlements indexed, paid via the aibrake@beta npm package.

Retry loop detection

Catches stale retries, same-tool loops, and unproductive cycles in real time.

Model stop-loss

Prevents unnecessary model escalation and caps premium-model burn.

MCP-server · one config entry

Works with Codex CLI, Claude Code, Cursor, Cline, Hermes Agent. Tool appears automatically. agentskills.io-compatible SKILL.md ships in the repo.

x402-ready API

Built for the x402 economy. Granular auth, metering, and continuels ready.

How it works

01 · Agent

Your agent is about to take an action

Tool call, request, or model upgrade.

02 · /v1/check

Send context to AIBrake

For a real-time guardrail evaluation.

03 · Decision

Receive one of four decisions

With risk score and reasoning.

04 · Suggested action

Your agent follows the recommendation

And continues safely.

04 · Benchmark

100 partners. 7 days. 73,765 real checks.

Stress-tested against 100 synthetic partners across 10 realistic archetypes over 7 simulated workdays — 73,765 real /v1/check POSTs against a live hosted server, deterministic seeds, fully reproducible.

Savings offered

$6,883.44

sum of projected_savings across 17,978 catches (~107% of spend)

Spend observed

$6,450.83

simulated agent spend across the week

Calls observed

73,765

100 partners × 7 days · 10 archetypes

Median latency

~5 ms

per /v1/check POST

Premium-heavy archetype (always-opus, $0.42/call) saw 169% savings-to-spend. Disciplined archetype rarely tripped — by design, 44% ratio. No false-positive warns on healthy debug cycles.

Honest framing: simulated workloads, not paying customers. Numbers are offered savings — realized depends on team heed rate (typically 40-80%). Full methodology in SIMULATION_100_PARTNERS_WEEK_REPORT.md.

Odyssey — multi-step agent sessions

Five hand-crafted agent journeys (130 steps total) that mix loop-prone regions with legitimate progress. AIBrake is asked at every step. Ground-truth labels per step let us score sensitivity and precision separately.

Sensitivity

100%

37 of 37 loop-region steps caught

Precision

100%

37 of 37 catches correct (0 false positives across 88 progress steps)

Savings realized

$6.28

of $6.12 potential — caught loops earlier than expected

Latency / step

~0.04 ms

40 microseconds — invisible at runtime

Synthetic v1. Per-Odyssey results and reproduction in ODYSSEY_RESULTS.md.

05 · Integrate

Four lines. Tool appears in your agent.

Add one MCP-server entry to your agent’s config. Restart. aibrake_check tool is now available — agent calls it before retries, deploys, and success-assertions.

Which tab is for you?
→ Codex CLI
You run OpenAI Codex CLI agent.
→ Claude · Cursor · Cline
You code inside Claude Code, Cursor, or Cline. AIBrake becomes a tool the agent calls before any retry / deploy.
→ Hermes Agent
You run the Hermes Agent runtime from NousResearch (a separate product). Different install — skill files + MCP server registration.
→ Manual SDK
You have your own Node.js app that calls openai / @anthropic-ai/sdk directly. One import "aibrake/auto" patches every call.
Common confusion: the Hermes Agent runtime is a full agent platform — install via the Hermes tab. The HermesAdapter class in our npm package is something else entirely — a Node.js SDK helper, used via the Manual SDK tab. Same name, different layers (like react the npm package vs Next.js the framework — related but not interchangeable).
# ~/.codex/config.toml

[mcp_servers.aibrake]
command = "npx"
args = [ "-y", "aibrake@beta", "mcp" ]

# Restart Codex CLI. `mcp__aibrake__aibrake_check` is now a tool
# the agent can call before paid LLM calls, deploys, retries.
// Claude Code — one CLI command (canonical, v2.x+):

claude mcp add aibrake -- npx -y aibrake@beta mcp

// Or edit ~/.claude.json directly (Cursor uses .cursor/mcp.json,
// Cline uses VS Code Settings → "cline.mcpSettings" — same JSON shape):

{
  "mcpServers": {
    "aibrake": {
      "command": "npx",
      "args": ["-y", "aibrake@beta", "mcp"]
    }
  }
}

// Restart the IDE. Tool appears as `mcp__aibrake__aibrake_check`.
// Verify in Claude Code:  /mcp     → aibrake / connected
# Tested live with Hermes Agent v0.15.1 — see docs/HERMES_LIVE_TEST.md.
# 1. Install the AIBrake skill (agentskills.io SKILL.md format).

hermes skills install \
  "https://raw.githubusercontent.com/Askbsman/aibrake/main/skills/aibrake/SKILL.md" \
  --category agent-safety --name aibrake --force --yes

# 2. Install the MCP server globally — `npx -y aibrake@beta` is too slow
# for Hermes' 40s connect-test, install once and point at the resolved binary.

npm install -g aibrake@beta

# 3. Register the MCP server in Hermes' config.yaml (NOT mcp.json):
# ~/.hermes/config.yaml

mcp_servers:
  aibrake:
    command: <path-to>\aibrake.cmd   # or `aibrake` on macOS/Linux
    args: ["mcp"]
    enabled: true

# 4. Windows only — installer puts config in %LOCALAPPDATA%\hermes
# but the CLI reads %USERPROFILE%\.hermes by default. Bridge them:

setx HERMES_HOME "%LOCALAPPDATA%\hermes"

# 5. Verify:
#   hermes mcp list     → aibrake / enabled
#   hermes skills list  → aibrake / enabled
# Full guide: docs/HERMES_INSTALL.md
// For Node.js apps that call openai / anthropic directly.
// One side-effect import patches every chat.completions.create
// and messages.create — shadow mode by default (decisions log to
// stderr, calls never block). Switch to enforcement with
// AIBRAKE_MODE=hard.

// 1. Install
// $ npm install aibrake

// 2. Add to your entrypoint (one line — must be first):
import "aibrake/auto";
import OpenAI from "openai";

const client = new OpenAI();
await client.chat.completions.create({
  model: "gpt-4o",
  messages: [ /* ... */ ],
});  // ← AIBrake watches every call automatically

// Fine-grained control? Same class, three import names (backward compat):
//   import { OpenClawAdapter, HermesAdapter, CodingAgentAdapter } from "aibrake";
// All three resolve to one adapter — pick whichever matches your runtime name.

// Python / Go / shell? Two HTTP options:
//   Free (Bearer auth):  POST https://api.aibrake.dev/v1/check
//                        Header: Authorization: Bearer asg_v1_yourkey
//   Paid x402 (no key):  POST https://api.aibrake.dev/x402/v1/check
//                        $0.005 / call via USDC on Base mainnet
// Schema: github.com/Askbsman/aibrake#schema
06 · Pricing

$0.005 per call. 18× ROI. No signup.

Self-host free. Hosted x402 endpoint at $0.005 per call. No signup, no API key, no commitment.

Self-hosted MCP

Free
  • npx aibrake mcp — run locally
  • All six detectors, fully open source
  • JSONL decision log to your own sink
  • MIT licensed

Best for individuals + Node.js stacks.

Hosted x402 endpoint

$0.005
  • Per POST /x402/v1/check call
  • USDC via xpay facilitator on Base mainnet
  • No account, no API key
  • Avg $0.09 saved per call — ROI 18×

Live on x402scan.

Deep audit (planned)

$0.02–$0.10
  • Per /v1/check-deep
  • LLM-based semantic judgment
  • Not built — listed for transparency

Ship-when-needed feature.

Team hosted

$29–$99/mo
  • Dedicated keys, custom domain
  • SLAs, log retention, audit trail
  • Per-objective dashboards

Email hello@aibrake.dev.

07 · FAQ

Common questions.

Will the guard slow down my agent?

Median /v1/check latency is ~5 ms against a steady-state hosted instance. At 95th percentile it stays under 50 ms. The SDK default timeout is 500 ms; if the guard is unreachable you fail open by default.

What if the guard service is down?

The SDK defaults to failureMode: "open" — transport-class errors (DNS, timeout, 5xx) are converted to a synthetic allow. Your agent never goes offline because of us.

What data do you log?

Hashes and counts only. No raw prompts, no source-file contents, no API keys. Full contract in SECURITY.md.

How is this different from PQS / Boundary Guard?

PQS scores one prompt at a time. Boundary Guard validates outputs. AIBrake watches the session loop — per-session history with universal evidence model. We compose with the others.

Do you support GPT? Gemini? Local models?

Provider-agnostic. The guard never calls a model — it judges your next call. Send any provider/model name and it works.

Is the source open?

Source, SDK, examples, simulation harness, benchmarks — all open at github.com/Askbsman/aibrake under MIT. The hosted x402 endpoint at api.aibrake.dev is public — pay $0.005 USDC per call, no signup. Run your own instance via DEPLOYMENT.md.

Ship it tonight

4 lines in MCP config or one paid x402 call. No signup, no waitlist, no API key.