Translations: 简体中文 · 日本語 · 한국어 · Español · Português · Deutsch · Français · Русский · हिन्दी · Türkçe · Tiếng Việt · Italiano · العربية · עברית
Ship agents that never fail.
Your agent ran rm -rf on the wrong directory. It read .env into its context. It spent
forty minutes retrying the same broken call, then told you the task was done.
Failproof lives in your agent's runtime and hears every hook event it fires: the
session starting, every prompt, every tool call and its result, sub-agents spinning up,
context about to be compacted, the moment it tries to stop. It can act on any of
them: block the bad action before it executes, steer the agent mid-run, or send it
back to work when it quits too early. Then it learns from every failure, so your
agent's harness gets better with every run.
37% → 69% task success on failures a policy recognised. Same model, no fine-tuning
(FIRE study)
~0.7 ms p50 per policy check, from a Rust daemon in the hot path
12 agent harnesses, one policy API: Claude Code, Codex, Cursor, Hermes, OpenClaw and more
Open source and free to start. Install the CLI, connect Failproof Cloud, and your first
audit runs on your agents' real history.
Supported harnesses
Twelve harnesses in two classes: ten coding CLIs, and two chat and assistant
gateways (Hermes, OpenClaw).
Building your own agent, on any framework or none? Report its runs through the
Python SDK or the
TypeScript SDK,
which give you tracing, sessions, evaluations and audits. Enforcement there needs a hook in
your own runtime. Talk to us and we'll map it.
Get started: find where your agents fail, then stop it
npm install -g failproofai
failproofai config # hook your agents, connect to Failproof Cloud (free)
failproofai backfill --since 7d # bring in the last week of runs already on disk
- Connect.
failproofai config finds every agent on this machine, hooks into each
one, starts the background daemon, and signs you in to Failproof Cloud in your
browser. No account yet? Make one right there, on the free plan.
- Backfill. Your agents have been running for weeks, and that history is already on
this machine.
failproofai backfill --since 7d sends the last seven days
(for supported harnesses),
so you start with real evidence instead of an empty dashboard.
- Audit. The moment runs land, Cloud starts your first audit on its own. It reads
your sessions, clusters what went wrong into named failure modes, and turns each one
into an insight, with the sessions that prove it. The free plan includes audits
every month.
- Plug in policies built for your agents. Open an insight and hit prevent this →.
Failproof drafts a policy for that exact failure and tests it against your agents' own
past tool calls. You then roll it out to every machine, watching first or enforcing
straight away.
Setting up CI, a container, or letting an agent run the install? failproofai config
notices there's no one to ask and applies the defaults without prompting.
One policy, every harness
Every harness speaks its own dialect:
- Claude Code reads a JSON verdict, while Factory's droid only stops on exit code 2.
- Cursor forces another turn with a
followup_message.
- OpenCode and OpenClaw have no shell hooks at all, only in-process plugins, and Hermes
loads a native Python plugin.
- Even the shell tool has six names:
Bash, terminal, Execute, shell,
run_command, exec.
Failproof translates all of it:
- Every event maps onto one canonical set of 29 (
SessionStart, UserPromptSubmit,
PreToolUse, PostToolUse, SubagentStop, PreCompact, Stop, …).
- Every tool name and argument maps onto one canonical form.
- Every verdict is translated back into the exact shape that harness obeys.
So a policy written once against Bash blocks the same command in Claude Code, Codex,
Hermes and Goose. A "run the tests before you stop" gate sends the agent back to work on
every harness that has a turn-end hook.
Each contract is verified against that CLI and pinned, with what it was verified on, in
a capability matrix the test suite checks every claim against. Blocking before a tool runs is verified on all twelve harnesses; turn-end gates
on eight. The per-harness matrix
shows exactly which events each one honours.
Policies, written for your agents
A policy can listen to any of those events. Before a tool call, it can block the command
outright. When a prompt arrives, it can add context. When the agent tries to stop, it
can send it back to finish the job. Whatever it decides, the agent is told why. There
are two kinds of policy, and you can mix them:
- Code. Plain JavaScript, for anything you can check exactly: paths, commands,
arguments, limits. It's just code, so it can call your own model too.
- Decision model. Plain-English yes/no questions that Jev, our fast classifier,
answers about each call against what the user actually asked for. The
rm -rf build/
you asked for goes through; the rm -rf ~ that slipped into a plan doesn't. Use it
for the judgment calls no regex can make.
You don't have to write either. Failproof authors them for you. Open an insight in
Cloud and hit prevent this →, or describe the rule in a sentence. Failproof drafts
the policy, tests it against your agents' own past tool calls, and rolls it out to every
machine, observing first or enforcing straight away.
A few examples of what a policy can catch, and what it does about it:
| Example |
What it catches |
Does |
block-env-files |
Reads of .env and other secret files |
Blocks |
block-kubectl |
Unreviewed changes to live infrastructure |
Blocks |
warn-destructive-sql |
DROP, TRUNCATE, an unbounded DELETE |
Warns the agent and lets it decide |
warn-repeated-tool-calls |
The agent looping on the same failing call |
Warns the agent to change approach |
no-refunds-over-limit (yours) |
A support agent approving a refund it isn't allowed to |
Whatever you decide |
no-production-writes (yours) |
File writes and edits to production paths (the code below; shell commands aren't checked) |
Blocks |
Prefer to write one yourself? Save it in .failproofai/policies/ as, say,
no-production-writes-policies.mjs and it loads automatically
(naming rules). Commit
it, and every teammate whose agents run Failproof gets it on their next pull.
import { customPolicies, deny, allow } from "failproofai";
customPolicies.add({
name: "no-production-writes",
match: { events: ["PreToolUse"] },
fn: async (ctx) => {
if (!["Write", "Edit"].includes(ctx.toolName ?? "")) return allow();
if (ctx.toolInput?.file_path?.includes("production"))
return deny("Writes to production paths are blocked.");
return allow();
},
});
Every policy returns one of three decisions: allow(), deny(message), or
instruct(message). The last is the quiet superpower. Instead of crashing the agent
into a wall, it steers it ("run the tests before you stop", "use the staging database")
and the agent corrects course on its own.
→ Write a policy ·
Decision-model policies ·
More examples
Built for agents that run on their own
A check that costs nothing can run on every event, all the time. That's what lets you
hand an agent more autonomy, not less:
- Sub-millisecond, on every event.
failproofaid is a Rust daemon with a pre-warmed
policy worker behind an owner-only Unix socket. A check that used to cost ~700 ms now
takes ~0.7 ms at p50, so policies can watch every event of every session and the agent
never feels it. How we got there →
- Always on, even when you're not. It runs as a system service from boot, with no
login needed. Overnight jobs, cron runs and detached sessions get the same protection
as the one in your terminal.
- One daemon, always in sync. The same process ships every run to Cloud and keeps
your policies current, so a policy you approve reaches every machine without a
redeploy.
Failproof Cloud: a harness that improves itself
Generic guardrails are written for everyone's agent. Failproof Cloud is built for
yours, from your agent's own traces, whether you run one agent or a hundred.
Every run feeds a loop that makes the harness around your agent better:
- Trace. Every prompt, model call, tool call and result, live and replayable, with
parallel sub-agents on their own lanes, latency, cost and context windows, and SQL
over all of it.
- Audit. Audits read your sessions on a schedule and cluster what went wrong into
named failure modes: the loops, wrong tools and quiet give-ups that are specific to
your agent. Each one becomes an insight, backed by the sessions that prove it.
- Check. Turn an insight into an eval and every new session is scored for it, by
code, the decision model, an LLM judge or an agent. When the failure comes back,
alerts reach you on Slack, email or a signed webhook.
- Fix. Hit prevent this → and Failproof writes the policy for that exact
failure. It tests the policy against your agent's past tool calls, then rolls it out,
observing first or enforcing right away.
- Repeat. The next audit runs on traces where that failure can't happen any more,
and finds the next one.
The model never changes. The harness around it learns from every failure. It's the idea
behind our FIRE study, where
policies derived from an agent's failures took task success from 37% to 69% on the
failures they recognised. Same model, no fine-tuning.
"The audits are the part that changed how we operate. We now have fewer incidents,
less compute waste, and faster shipping."
— Pratheep Velicherla, CTO, Testsigma
Ask the failproof agent anything about your agent in plain English, or pull the same
data into your own tools through the MCP server,
Slack and the fp CLI.
Start with one agent on the free plan: 5,000 runs a month, no card. Self-hosting in your
own cluster is available on the Enterprise plan.
→ Start free ·
Pricing ·
Quickstart ·
Book a demo
Documentation
| Observe |
|
| Sessions |
Follow a run: models, tools, errors, latency |
| Read a trace |
What the execution graph is telling you |
| Audits |
Find failure patterns across many sessions |
| Evaluations |
Score every session with code, the decision model or an LLM judge |
| Instrument your own agent |
|
| Python SDK |
Report runs from an agent with no harness |
| TypeScript SDK |
The same events from a Node agent |
| Policy SDK |
allow / deny / instruct reference |
License
MIT with Commons Clause — free for internal and personal use; commercial resale of failproofai itself requires a separate agreement. See LICENSE for the full text.
Contributing
See CONTRIBUTING.md. New policies, edge cases, and translations all welcome.
Built with ❤️ by befailproof.ai in SF and Bengaluru.