EN
AI glossary

What Are AI Guardrails?

Term3 min readUpdated July 7, 2026

In short

AI guardrails are the rules, filters and checks you put around an AI system so it stays inside safe, allowed and predictable behaviour. A language model on its own will attempt almost anything you ask, so guardrails are how you constrain it: validating and filtering what goes in, checking and formatting what comes out, and limiting which tools and actions it is allowed to take. Good guardrails are what let you put an agent in front of real users or real systems without it leaking data, running a dangerous command, or confidently returning nonsense. They are the safety and quality layer that turns a capable-but-unpredictable model into a system you can trust in production.

The three places guardrails sit

Guardrails apply at the input, at the output, and around actions. On the input you validate and sanitise what the user or another system sends. On the output you check the response for policy, format and correctness before it is used. Around actions you restrict which tools the agent can call and require approval for anything risky.

  • Input guardrails: validate, sanitise and block unsafe or off-topic requests before the model sees them.
  • Output guardrails: check responses for policy, format and factual grounding before they reach a user or system.
  • Action guardrails: limit which tools an agent can use and require approval for high-risk steps.

Why agents need guardrails most

A chatbot that only returns text is fairly low-risk. An agent that can run code, call APIs, edit files or spend money is not, because a single bad decision can have real consequences. Guardrails - allow-lists of tools, human approval on destructive actions, sandboxed execution, output validation - are what make agentic systems safe enough to trust. They are the difference between "the agent tried something reckless" and "the agent was stopped before it could".

Guardrails and quality, not just safety

Guardrails do not only prevent harm; they raise quality. Validating that output matches a required JSON shape, checking an answer is grounded in retrieved sources, and rejecting responses that fail a rule all make the system more reliable, not just safer. In practice guardrails and evaluation go together: you define what "good and safe" means, then enforce it automatically on every run.

Frequently asked questions

Next step

Ready to put AI to work as a real workflow?

Start with the foundations course, keep your progress locally and sync everything to your free account whenever you like.