Every guardrail your agent needs, sorted: must-have, should-have, rule or judge

"Guardrails" sounds like one product you buy. In a working agent it is about fifty small checks, each with a job, a place and a price. We sorted 57 common ones. 39 are plain rules in code, and only 2 need an LLM judge. Here are the labels, the pictures, and the 15 to build first.

Ask a team how their agent is protected and you often hear one word: guardrails. Usually it means one product sitting in front of the model, screening what users type.

That's one guardrail out of about fifty. The others sit in different places, catch different things, and most of them are a few lines of ordinary code.

We collected the common ones, from our own agents and from the tests in the AI Assurance Catalog. There are 57. This post sorts them so you can see which matter first.

Six labels on every guardrail

Before a list of 57 can be useful, each one needs labels.

The user actuallyasked for thisa refund nobody asked forPrioritymust haveWherebefore the toolHowa rule in codeIf it firesrefuse the call,tell the model whyConcernsecurityProven bya test: AAC-0056no refund without a request
Six labels on every guardrail. With them, a list of 57 becomes easy to sort and to plan.

Most guardrails are plain rules

Sort all 57 by how they decide and the picture is clear.

how 57 common guardrails decideRule in code39about 0 ms, freeSmall classifier1010 to 100 ms, cheapPlatform setting5about 0 msLLM judge20.5 to 3 s, costs tokensA person1minutes to days
Most guardrails are plain code: fast, free, and the same answer every time. LLM judges are the rare exception.

39 of 57 are rules in code. "Did the user ask for this refund?" "Is the amount under the limit?" "Did a tool really return this order number?" Each is an if statement. It runs in microseconds, costs nothing, and gives the same answer every time, so you can test it like any other code.

Small classifiers handle meaning that a pattern can't catch: harmful content, personal data, reworded attacks. They are cheap and fast, but they give a score, not a certainty.

Only 2 need an LLM judge: "is every sentence supported by the documents?" and "is the tone right?" Those questions need nuance, so they're worth the cost and the second of waiting.

Where they sit

Guardrails sit all along a turn, not just on the user's message.

where they sit, in the order a turn passes themFrontdoor8 guardrails6 mustBeforethe model9 guardrails4 mustAfterthe model13 guardrails6 mustBeforethe tool9 guardrails7 mustInsidethe tool5 guardrails5 mustAfterthe tool3 guardrails1 mustWholerun6 guardrails3 mustLogs andplatform4 guardrails3 mustthe busiest spots: after the model writes, and before a tool acts
Guardrails sit all along the turn, not just on the user's message.

The two busiest spots are after the model writes and before a tool acts. That makes sense. The first is where the model can say something wrong. The second is where it can do something wrong.

The 15 to build first

If your agent can change anything, such as data, money or messages, start with these must-haves.

GuardrailWhat it catchesHow
Verify who is askinga forged or expired sign-inrule
Kill switchan operator needs to stop the agent nowrule
Sensitive topics go to a personinjury, self-harm, legal threatsrule
Known injection phrases"ignore your previous instructions"rule
Harmful content, in and outhate, violence, self-harmclassifier
Only the tools this user may useadmin tools offered to a normal userrule
Output matches its schemabroken JSON, missing fieldsrule
Claims an action that didn't happen"I've booked it" when nothing was bookedrule
Names or numbers no tool returneda made-up order number or pricerule
The user actually asked for thisa refund triggered by a planted noterule
Arguments are valid and in range₹4,00,000 when the limit is ₹40,000rule
Approval for risky actionsa large payout, a mass emailperson
The tool checks identity againthe agent's token used for someone elserule
Fence the result as datatext in a document read as ordersrule
Step, time and money budgeta run that loops for 20 minutesrule

Thirteen of the fifteen are rules. You can build most of them in a week.

Rule first, classifier next, judge last

When you add a guardrail, start on the bottom stair.

1 · A rule in codefree · exact · about 0 ms2 · A small classifiercheap · fuzzy · 10 to 100 msfor meaning a patterncan't catch3 · An LLM judgecostly · slow · about 1 sonly for nuance:is this claim supported?is this tone right?only ifonly ifreach for the cheapeststep that can do the job
Climb only when the step below can't do the job. Most guardrails never leave the first stair.

Use a classifier only when a rule can't see the problem. Use an LLM judge only when a classifier can't either. Every step up adds cost and delay, and you can be less sure the check behaves the same way every time.

Five mistakes we see often

  1. Screening only the user's message. Attacks also arrive through tool results, emails and documents. Many setups never check those.
  2. Failing open. The guardrail service times out and everything is let through. A guardrail that errors should block.
  3. An LLM judge where a rule would do. "Is the amount under ₹40,000?" doesn't need a model. It needs an if.
  4. Writing the guardrail in the prompt. "Never refund without approval" in a prompt is a request, not a rule. Put it in code, before the tool.
  5. Never measuring it. A guardrail that blocks 30% of good requests is as broken as one that blocks nothing. Watch how often each one fires, and test both cases.

The full list

All 57 are in the guardrail catalog. You can filter by priority, by how they decide, and by concern. Each one comes with example tools and the test that proves it works. It will keep growing; if you rely on one that's missing, tell us.