PromptForge
AI Glossary

Agents & tools

Guardrails

Also known as: guardrail, safety filters

Definition

Guardrails are the constraints that keep an AI system inside acceptable behaviour — input validation, output filtering, topic restrictions, action limits and human approval gates.

Guardrails operate at several layers. Input guardrails screen prompts for injection attempts and disallowed requests. Output guardrails check responses before they reach a user or a downstream system. Action guardrails restrict what tools an agent may invoke and under what conditions.

Prompt-level instructions alone are not guardrails. They are advisory, and determined users route around them. Real guardrails are enforced in code outside the model: validating arguments, checking permissions, requiring approval for irreversible actions.

The design question worth asking for any autonomous system: what is the worst action it can take unsupervised, and is that acceptable?

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.