← Portfolio

agent-gate — Deterministic Safety Fence for AI Agents

Code: 02_ai-engineering-code/agent-gate/agent_gate/cli.py + README.md

Problem. Autonomous coding agents leak secrets, delete files, rewrite git history, and claim "done" without proof.

What I built. A portable, stdlib-only Python guardrail (no dependencies, drop into any repo), with 53 passing tests:

Design stance. Off by default; fail-closed; never pretends an unprovable proof is satisfied. Hardened from a real incident where a prior agent leaked secrets via git add -A and silently killed a background job.

Why it matters. Direct evidence I understand agent failure modes and build proof-based, deterministic safety around them — squarely an AI-native infrastructure concern.

Talk track (screen-share)

This one came from getting burned: an agent leaked secrets with git add dash A and claimed it was done without ever running the thing. So I built a fence. Before a dangerous action runs, it gets classified; commits get scanned for secrets and forbidden files; and done-check refuses a completion claim unless the required proofs are actually on record. It's stdlib-only Python, fifty-three passing tests, and it wires into Claude Code as a pre-tool hook. It fails closed and it never pretends an unprovable proof passed. If you care about deploying agents safely, this is how I think about it.

GG · Applied AI Engineering portfolio · synced to youdontneedmy.help design