Gating agent tool calls against business rules in ~130ms, no model needed
Ok-Buyer-9421 · reddit · 2026-11-24
After a test agent kept issuing refunds the policy never allowed, the author built a pre-execution gate: before any refund or approval runs, the call and order facts are written to a small text record and checked against the company's rules as tests. Pattern-based checks with no model calls run in 130ms each, blocked exactly the calls a hand-written guard caught, and double as an audit trail. Implemented via plain function calling, with the gate sitting where an MCP proxy would. Open-sourced as Agentests (MIT).
More from coding & agent
- LangChain deep dive: how Jev differs from LLMs and fits inside agents — LangChain · 2026-11-24
- Power user trashes OpenAI's Codex app, says GPT-6.2 falls far short of GPT-5.6 Sol — lyraxana · 2026-11-24
- Garry Tan shares a startup self-prompt trick: ask yourself daily "are we dying?" — garrytan · 2026-11-24
- Orchestrating Claude with many models to make 150 animated videos, with a Gemini QA pass — nateliason · 2026-11-24
- Mistral makes Vibe Pro free for a month in Europe after promo sells out in an hour — MistralAI · 2026-11-24
- Skip the screenshot: annotate design notes directly for your coding agent — aaraalto · 2026-11-24