---
title: Guardrail
description: 'A rule, model, filter, policy check, or enforcement mechanism intended to constrain inputs, outputs, or actions of an AI system.'
canonical_url: 'https://darkfactory.dev/glossary/guardrail'
markdown_url: 'https://darkfactory.dev/glossary/guardrail.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Guardrail


## Definition

A guardrail is a control intended to keep an AI system's inputs, outputs, or actions within an acceptable range. It might be a rule, classifier, policy check, permission boundary, approval step, rate limit, sandbox, or rollback mechanism.

The word is broad enough to hide important differences. An advisory guardrail warns. A detective guardrail records or flags. A preventive guardrail blocks. A containment control limits damage after failure, and a recovery control helps reverse it. A useful system description says which job the control performs and what can bypass it.

Guardrails are strongest when they are enforced outside the model at the point of effect. A prompt that asks the model not to exceed a spending limit is guidance. A payment service that rejects transactions above the limit is an enforcement boundary.

## Distinguish it from nearby terms

Policy states what should be allowed. A guardrail implements, checks, or supports that policy. A security boundary prevents unauthorized effects even when another component misbehaves. Not every guardrail qualifies as one.

## Check your understanding

An output filter flags prohibited text but still sends it to a downstream tool. It is a detector, not a blocker. Calling it a guardrail without naming that limitation overstates the protection.

## Related terms

- [MCP gateway](https://darkfactory.dev/glossary/mcp-gateway)

## Related factory areas

- [Security, privacy & software supply chain](https://darkfactory.dev/factory/security)

## Evidence and further reading

- [OpenAI: A Practical Guide to Building Agents](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/)
- [OWASP GenAI Security Glossary](https://genai.owasp.org/glossary/)
- [ActPlane: OS-Level Policy Enforcement](https://arxiv.org/abs/2606.25189)
