Agents Guardrail Concepts › What a guardrail is, and what it can't be
01 · part 1, conceptsconcept

What a guardrail is, and what it can't be

A guardrail is a check that can refuse.

The definition, and why it’s narrow on purpose

Not a policy document, a system prompt, a warning printed beneath an answer, or a dashboard somebody reviews on Tuesday. A guardrail is code that runs while a request is in flight and can stop it. If it can’t stop anything, it’s monitoring: valuable, and a different job that step 12 comes back to.

a check that can refuse everything else is monitoring, which is a different job a request in flight the check decides now from what it sees refused and somebody is told no allowed through the work begins both arrows are the same check working correctly
A request reaches a check, and leaves by one of two arrows. Read it left to right.
Nothing in this drawing is measured. Part 3 prices it.
  • The pink arrow is a refusal; the green one is the work beginning.
  • Both are the check working correctly, which is the whole problem.

Three consequences, and they’re the whole difficulty

because it…the consequence
decides nowit runs while the request is in flight. It can’t wait for the incident review, for a person, or for the next model. What it knows then is all it will ever know
decides from what it can seea check at the door sees a request. It doesn’t see which tools the agent will reach for, what it will retrieve, or what it will say: those haven’t happened
refuses real peopleevery refusal lands on somebody. At volume it’s not a rounding error, and it’s the line most often left off the comparison

The third gets left out because the people paying it aren’t in the room. A check that refuses a harmful request prevents an incident; the same check firing on a request that was fine refuses someone who wanted something reasonable. They’re the same event seen from two sides, and no amount of care makes one happen without risking the other.

The instinct this volume is written against

Faced with those three, the natural move is more checks. If one check is narrow, use six. If a check at the door can be evaded, add one at the exit too.

Part 3 measures what that buys. On all three streams, every check at every stage it’s allowed catches exactly what the winner catches, and costs 1.7x to 2.2x as much. Not a little more safety for a little more money: the same catches, for more money.

What this volume doesn’t cover

How to build a classifier that resists evasion is a real field, and it isn’t this one. Every check here is a fixed instrument with a known blind spot, because the question is where to point the checks you have, not how to build a better one.

Try it. In the labs folder, run:
python3 lab.py ordinary

Part 1 runs the traffic with no guardrails: every harmful request gets through, at $40.00 each.