Back to browse
I built a 0.07ms Python firewall to stop AI hallucinations

I built a 0.07ms Python firewall to stop AI hallucinations

by richardewing1·Mar 23, 2026·4 points·2 comments

AI Analysis

●●SolidSolve My ProblemSlick

Deterministic policy gates beat LLM guardrails when your agent tries to DROP TABLE.

Strengths
  • 0.07ms median latency with zero false negatives across 5000-payload red-team test.
  • Eight specific policy gates block rm -rf, subprocess, untrusted API calls, and destructive SQL.
Weaknesses
  • AI governance category is getting crowded—Guardrails AI, LaGuardia, and others already exist.
  • Pure Python may not suit high-throughput production where Go or Rust firewalls dominate.
Category
Target Audience

AI developers building agents with tool access

Similar To

Guardrails AI · LaGuardia · LLM Guard

Post Description

Hey HN,

I was building other AI products and kept hitting the same wall: agents hallucinate and constantly forget context. I ended up building a ledger just to track what they were actually doing.

Once that ledger was logging everything, I realized I could use it to enforce rules. Exogram is the result. It is a deterministic firewall that intercepts agent tool calls (like MCP) using pure Python logic gates. It catches bad schemas and destructive actions in 0.07ms. There is zero AI in the security loop.

I load-tested it yesterday and hit 137 RPS on a single container with zero dropped payloads.

Sandbox: https://exogram.ai/proving-ground Repo: https://github.com/Richard-Ewing/exogram-protocol-rfc

I just built the Proving Ground UI today to visualize the 0.07ms block in real time. Let me know if the split-screen demo makes sense, or if you manage to bypass the gates.

Richard

Similar Projects

Security●●●Banger

AvaKill – Deterministic safety firewall for AI agents (<1ms, no ML)

Deterministic <1ms policy kill switch for AI agent tool calls, zero ML.

Solve My ProblemBig BrainShip It
duroapp
333mo ago