Framework

Policy vs Guardrail vs Gateway

Three escalating layers of enforcement for agent behavior. Only the third one actually stops bad behavior.

How it works

  1. 1Policy: a written rule — "spend no more than $100 per day." Easy to write, easy to bypass.
  2. 2Guardrail: a prompt or check the agent runs to self-audit its own behavior. Better, but still soft.
  3. 3Gateway: hard enforcement at the infrastructure layer — credit card limits, CI checks, and GitHub actions that make the wrong move literally impossible.
  4. 4Prompt injection can bypass a policy. It cannot bypass a credit card that runs out of funds.
  5. 5Build gateways first. Then write policies that describe what your gateways already enforce.

Hear it on the podcast

Your Next Co-Founder Should Be AIListen to the episode

More from this episode

Get the next framework first

One email a week with the frameworks, tools, and founder stories from the podcast. Free.

More frameworks for AI & Automation