PolicyProof
InnaBerezhna/policyproof
Gateway de confiança para agentes de IA: valida decisões contra estado verificado
Ver no GitHubWorkbench de confiabilidade para agentes de IA de atendimento ao cliente em escala empresarial. O agente propõe ações, mas um gateway determinístico autoriza apenas aquelas permitidas pelo histórico do cliente, garantindo que decisões irreversíveis (reembolsos, cancelamentos) nunca escapem do controle da política de negócio.
Instalação
npx convez-ai InnaBerezhna/policyproof1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Validação de reembolsos e cancelamentos automáticos em atendimento ao cliente
- Proteção contra comportamentos instáveis de modelos LLM em operações críticas
- Teste de robustez de agentes de IA sob pressão e prompt injection
Veredito

Implementação sólida de confiabilidade para agentes em produção, focada em guardrails determinísticos que deixam o modelo 'wobble' sem consequências. Essencial para quem constrói agentes para operações críticas onde falhas geram dano material ao cliente.
README
A tradução para o português deste README ainda está na fila.
PolicyProof
A reliability workbench for enterprise customer-service AI agents. The agent proposes an action; a deterministic gateway decides whether it is allowed, computing the decision from the customer's record rather than from anything the model said. So the model can wobble under pressure and still never push an unauthorized refund or cancellation to a customer, at any number of retries.
About this demo. I built PolicyProof with Claude Code as a demonstration for the Product Manager, Agent Development role at Sierra. It shows how I think about enterprise agent reliability. It is not a product: a short build, scoped on purpose, and left unpolished wherever polish would not have changed the point. What it does claim, it does for real. It builds, the deterministic core has tests, and the trusted-state guarantee below holds. Read it as a thinking artifact, not a launch.
The one idea
At scale, an enterprise agent is "90 percent magical, 10 percent haywire." PolicyProof measures that 10 percent for a real policy and shows that the irreversible action (a refund, a cancellation) cannot execute unless the customer's record allows it.
The move is a trust boundary. The agent proposes an action, but the proposal carries no facts: only an action type, the member id from the session, and an unverified reason. A gateway then recomputes every fact that gates the decision from trusted state (the system of record), ignores whatever the model asserted, and defaults to blocking unless the record proves an exception holds. So the model's behavior can degrade across repeated runs while the number of forbidden actions that actually execute stays at zero.
The result reads as a business consequence, not a metric: "Across 20 runs, the agent proposed refunds before checking the record. The gateway blocked every risky proposal, so 0 reached a customer."
Run it
You need an OpenAI API key for the beats that call a live model (the launch run, the red-team, and the live "try it yourself"). The gateway, the policy decisions, and the test suite all run without one.
cp .env.example .env
# then edit .env:
# POLICYPROOF_AGENT_API_KEY=sk-proj-...
# POLICYPROOF_AGENT_MODEL=gpt-4o # optional; this is the default
docker compose up --build
# open http://localhost:8137
Without Docker:
export POLICYPROOF_AGENT_API_KEY=sk-proj-...
PORT=8137 go run ./cmd/server
# open http://localhost:8137
A full launch run makes up to 20 model calls, one per pressured refund request. The browser never sees the API key: the server holds it and hands the page only a short run token. If the normal pressure run produces no risky proposals, the UI offers a visibly stronger prompt-injection suite rather than quietly changing the test. The optional live appendix accepts a pasted key for one extra red-team run, held in memory for that run only.
What it shows
Run the guided story, then open the manual case builder and change the record. The same engine returns a different decision, because the decision is computed, not hardcoded:
- a refund with no exception on the record is blocked
- a next-period charge the member never used is allowed, because eligibility is read from the record, not assumed
- a member who used the plan after the charge is blocked again, because the exception is a real conjunction of facts
- a medical claim with no verified evidence is escalated to a human, never auto-refunded
- a message that signals distress is escalated, with no automated refund
Load the second policy pack (a labelled synthetic smoke test) and the same engine runs a different policy with no code change. That is the point: a policy is data you author, not code you write.
How it works
internal/pack: the Policy Pack schema. Every clause is classified (Invariant, Judgment, or Hybrid) and mapped to the trusted fields it depends on, each tagged with a provenance. The engine lints a pack before running it, so no Invariant can gate on an untrusted field.internal/trusted: the authoritative record the gateway reads from. The model never writes here.internal/gateway: the authorization layer. It computes the decision purely from trusted state plus the pack.internal/run: the k-repeat runner, the pass^k curve, and the three deterministic outcomes (allowed action, correct block, correct escalation).internal/safety: a duty-of-care labeler that reads the member's message. Its output can only ever escalate a case, never authorize one.internal/live: the OpenAI adapter for the configured agent and the optional pasted-key appendix.internal/webandcmd/server: the one-screen workbench (Go, Fiber, HTMX, a server-rendered SVG chart), with the templates, stylesheet, and packs embedded in the binary.
The deterministic core runs without an API key:
go test ./...
The strongest test runs the real WeightWatchers pack through the real engine and asserts the decision for each record.
The two decisions behind it
Trusted state is the only authority. An LLM is non-deterministic and can be talked into proposing the wrong action with fabricated facts. So the model proposes, but the gateway recomputes every gating fact (dates, period boundaries, prior usage, refund amount) from the system of record and ignores anything the model supplied. Identity comes from the session, not from a model-supplied id. Prompt injection can change what the agent proposes; it cannot change what the gateway authorizes.
A policy pack is a classified, field-mapped artifact. Each clause is tagged Invariant, Judgment, or Hybrid and mapped to the named state fields it depends on, each with a provenance (system of record, event log, or verified flag). Authoring a new policy means classifying clauses and mapping fields, not writing engine code. The lint enforces the first decision at authoring time: a pack that tries to gate an irreversible action on a poisonable field fails before it can run.
Scope, and what it does not do
It is a demo, so the boundaries are deliberate and worth stating plainly:
- The predicate language is simple: equality checks over named fields. A production policy would need ranges, dates, and amounts, or would compute those upstream into the record.
- There is no judge LLM in the decision path, by design. The only model is the agent under test; the gateway is plain, deterministic code. The safety labeler is keyword-based, and a production version would put a trained classifier behind the same seam.
- The guarantee is "no model claim causes an unauthorized action." It is not "every decision is business-correct." Two things can still produce a wrong decision: a wrong fact already in the record, or a rule authored incorrectly. The lint catches provenance mistakes, not logic mistakes. Getting the rules right is the human work this demo is really about.
- One customer (WeightWatchers) is modeled end to end. The second pack is a synthetic smoke test, not customer evidence.
Sources and honesty
WeightWatchers is a real, public customer of the agent platform this targets. PolicyProof uses only the public cancellation page for timing and the public Membership Agreement for refund rules, with synthetic member data. It uses no private operating rules. The second pack is a labelled synthetic smoke test.