← Back to the A-Z glossary
AI glossary · P1

Guardrail

A guardrail is a safety rule that limits what an AI or an agent is allowed to do.

Security 4 min read Updated 2026-05-22
— Definition

Guardrail, in plain words

A guardrail is a safety rule that limits what an AI or an agent is allowed to do.

Make the limits concrete: refuse, ask for approval, mask, log.

A concrete example

An agent can draft an email but has to ask for confirmation before sending it.

Why it matters

The more access an agent has, the more explicit limits matter.

You'll see it in agents that can send, publish, edit, delete, or access sensitive data.

Don't mix it up with

Human-in-the-loop: Human-in-the-loop means a person validates a step before an agent runs a sensitive action.

Prompt injection: A prompt injection tries to hijack the instructions of a model or an agent.

Common mistakes

  • Putting the guardrails only in the prompt.
  • Not blocking irreversible actions.
  • Not logging what was done.

Quick checklist

  • First I check whether the word names a concept, a tool, a risk, or a metric.
  • I tie it to a concrete case: An agent can draft an email but has to ask for confirmation before sending it.
  • I keep the main trap in mind: Putting the guardrails only in the prompt.

Quick questions

What is Guardrail in AI?

A guardrail is a safety rule that limits what an AI or an agent is allowed to do.

Where will I run into Guardrail?

You'll see it in agents that can send, publish, edit, delete, or access sensitive data.

Which word should I read next?

Start with Human-in-the-loop, Prompt injection, Tool use / Function calling.

Want to keep going in order?

Head back to the full glossary, search a word, then open only the pages that deserve more than a short definition.

Open the AI glossary