---
title: "Guardrail"
description: "A runtime control that inspects or mediates a model's or agent's inputs, outputs or tool calls and blocks, rewrites or escalates what breaks a policy, logging each decision as evidence."
canonical: https://aigovernanceengineer.com/glossary/guardrail
author: "Jorge García Aibar"
license: "CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)"
doi: https://doi.org/10.5281/zenodo.22956197
version: "0.5.0"
updated: 2026-09-25
---

# Guardrail

A runtime control that inspects or mediates a model's or agent's inputs, outputs or tool calls and blocks, rewrites or escalates what breaks a policy, logging each decision as evidence. Guardrails are deterministic code or classifiers in the call path, unlike a guardian agent, which is itself an AI system.

- Developed in: [ch. 05, Pattern: Runtime Guardrail](https://aigovernanceengineer.com/bok/patterns#pattern-runtime-guardrail); [ch. 23, Runtime guardrails for tool calls](https://aigovernanceengineer.com/bok/governing-agents#runtime-guardrails-for-tool-calls)
- Chapters: [ch. 04, The Stack](https://aigovernanceengineer.com/bok/the-stack) · [ch. 05, Patterns](https://aigovernanceengineer.com/bok/patterns) · [ch. 23, AI Agents](https://aigovernanceengineer.com/bok/governing-agents)
- Contrast with: [Guardian agent](https://aigovernanceengineer.com/glossary/guardian-agent)
- In the glossary chapter: https://aigovernanceengineer.com/bok/glossary#t-guardrail

## Sources

Defined by this Body of Knowledge: the section it is developed in is the source.
