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.
AIBrake is registered in x402scan marketplace, callable via agentcash, runs in Hermes Agent & every MCP-capable IDE.
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.
Catches stale retries, same-tool loops, and unproductive cycles in real time.
Prevents unnecessary model escalation and caps premium-model burn.
Works with Codex CLI, Claude Code, Cursor, Cline, Hermes Agent. Tool appears automatically. agentskills.io-compatible SKILL.md ships in the repo.
Built for the x402 economy. Granular auth, metering, and continuels ready.
Tool call, request, or model upgrade.
For a real-time guardrail evaluation.
With risk score and reasoning.
And continues safely.
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.
sum of projected_savings across 17,978 catches (~107% of spend)
simulated agent spend across the week
100 partners × 7 days · 10 archetypes
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.
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.
37 of 37 loop-region steps caught
37 of 37 catches correct (0 false positives across 88 progress steps)
of $6.12 potential — caught loops earlier than expected
40 microseconds — invisible at runtime
Synthetic v1. Per-Odyssey results and reproduction in ODYSSEY_RESULTS.md.
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.
openai / @anthropic-ai/sdk directly. One import "aibrake/auto" patches every call.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
Self-host free. Hosted x402 endpoint at $0.005 per call. No signup, no API key, no commitment.
npx aibrake mcp — run locallyBest for individuals + Node.js stacks.
POST /x402/v1/check callLive on x402scan.
/v1/check-deepShip-when-needed feature.
Email hello@aibrake.dev.
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.
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.
Hashes and counts only. No raw prompts, no source-file contents, no API keys. Full contract in SECURITY.md.
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.
Provider-agnostic. The guard never calls a model — it judges your next call. Send any provider/model name and it works.
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.
4 lines in MCP config or one paid x402 call. No signup, no waitlist, no API key.