AI agent glossary
Guardrails
Checks and limits placed around an AI system to keep its inputs, actions, and outputs within safe and acceptable bounds.
Guardrails are the controls that sit around the model rather than inside it. They can validate inputs before the model sees them, restrict which tools the agent can call, block certain actions, and check outputs before they reach users or other systems.
Some guardrails are simple code: a spending cap, an allowlist of domains, a regular expression that blocks credit card numbers from leaving the system. Others use a second model to classify content as on-topic, safe, or policy-compliant.
The most dependable guardrails are deterministic and enforced outside the model, because instructions in a prompt can be ignored or overridden. Use prompts to guide behavior and code to enforce rules that must hold.
Learn more in the course
Related terms
Go from definitions to doing
Learn to use and build AI agents in 65 practical lessons.