failproofai README

README проекта с github.com/FailproofAI/failproofai. Одним файлом markdown: README.md.

failproof ai

FailproofAI%2Ffailproofai | Trendshift FailproofAI%2Ffailproofai | Trendshift

npm CI Supply Chain Discord Reddit Docs License

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.

Failproof AI in action


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.

Claude Code OpenAI Codex GitHub Copilot Cursor Agent OpenCode Pi
Hermes OpenClaw Factory Droid Devin CLI Antigravity CLI Goose

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
  1. 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.
  2. 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.
  3. 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.
  4. 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:

Failproof translates all of it:

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:

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:


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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Start
Quickstart Install, connect a harness, see the first run
Concepts How the hook system works
Supported harnesses All 12, and what each one can enforce
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
Enforce
Write a policy From an insight, from a sentence, or in code
Decision-model policies Jev judges calls against what the user asked
Configuration Config scopes, merge rules and policy parameters
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.

failproofai (FailproofAI/failproofai)

Ищем в базе…

Что это такое?Failproof AI — это слой наблюдаемости и контроля, который встраивается в harness'ы для AI-агентов (CLI для кодинга, чат-шлюзы, самостоятельно размещённые ассистенты), записывает каждый запуск и блокирует опасные вызовы инструментов до их выполнения.
Это CLI-утилита или облачный дашборд?В первую очередь это локальный CLI/npm-пакет, который подключается к вашему агентному harness'у и применяет политики без какой-либо дополнительной задержки; он также поднимает локальный веб-дашборд на localhost:8020, а для команд, гоняющих агентов на целом парке машин, существует отдельный облачный продукт 'Failproof AI Observability'.
Как его запустить?Запустите команду установки, чтобы подключить хуки к вашему harness'у (пока политики не включены), а затем отдельно добавьте набор политик. В CI или контейнерах без терминала failproofai config вместо вопросов автоматически применяет настройки по умолчанию.
Какие кодинг-агенты и harness'ы поддерживаются?Двенадцать harness'ов двух типов: десять CLI для кодинга (например, Claude Code и Codex) плюс два чат/ассистент-шлюза (Hermes и OpenClaw) — у всех общий API политик и общая история сессий.
Блокировки работают одинаково во всех harness'ах?Блокировка вызова инструмента до его запуска проверена на всех двенадцати harness'ах, но гейт-проверки в конце хода работают только на восьми. Агентам, работающим вне этих двенадцати harness'ов, для трассировки нужен Python SDK, а принудительный контроль там требует самостоятельного встраивания хуков в рантайм.
Данные моих запусков уходят с моей машины?Нет — локальный дашборд читает историю запусков, уже сохранённую на вашей машине, без аккаунта и регистрации, и ничто не покидает компьютер, если вы сами не подключите облачный продукт Observability.
На каких условиях распространяется лицензия?Это MIT с Commons Clause: бесплатно для внутреннего и личного использования, но для коммерческой перепродажи самого failproofai нужно отдельное соглашение.
Что блокирует встроенная политика, которая работает даже до того, как я что-то настрою?block-failproofai-commands — единственная политика, которая включена всегда и которую нельзя отключить или поставить на паузу; сделано это специально, чтобы агент не смог через неё выключить все остальные политики.
Как написать свою политику?Положите файл в папку .failproofai/policies/ — он подхватится автоматически без всяких флагов; закоммитьте его, и остальная команда получит его при следующем pull. Политики возвращают allow(), deny(message) или instruct(message), чтобы разрешить, заблокировать или перенаправить агента.
Какие рискованные действия она ловит сразу, из коробки?Среди 40 встроенных политик: блокировка чтения файлов с секретами .env, повышения привилегий через sudo, рекурсивного rm -rf, непроверенных изменений terraform/kubectl, force-push в main, а также предупреждения при деструктивном SQL или повторяющихся циклах вызовов инструментов.
Что облачный Observability даёт по сравнению с бесплатным локальным дашбордом?Он собирает запуски всех агентов со всех harness'ов всей команды: графики параллельного выполнения суб-агентов, задержки p50/p95/p99, учёт расходов по каждой модели, SQL-запросы по вашим трассировкам, запланированные аудиты и оповещения в Slack, на почту или в webhooks; самостоятельное размещение в своём кластере доступно на тарифе Enterprise.
Какие есть похожие проекты?overmind, opik, evenfire, harness-sdk, Tracely-ai, mission-control, Raven, agenttrail
Автор
FailproofAI
Размер
102.3 MB
Звёзды
9.8K
Возраст
7 мес
Коммиты · 90 дней