What is Guardrails?
Guardrails: Controls around an AI system that block or correct unsafe, off-topic, or wrong inputs and outputs, and limit what actions an agent may take.
Guardrails are the checks that sit around a model. Input guardrails screen what comes in: prompt injection attempts, off-topic requests, personal data that should be masked. Output guardrails check what goes out: schema validation, banned content, claims that are not supported by sources, amounts outside allowed ranges. Action guardrails limit what agents can do: permission scopes, spending caps, step limits, and approval requirements.
Guardrails can be simple code rules (reject any refund above a threshold), classifiers, or a second model that grades the first one's output. The most reliable ones are deterministic checks against real data, because they do not share the model's blind spots. A model asked to police itself in the same prompt is a weak guardrail.
Why it matters when you build or buy AI
Prompts are not security. A system prompt saying "never issue refunds over the limit" can be talked around; a code check that blocks the API call cannot. When you evaluate an AI build, ask which rules are enforced in code and which are just instructions to the model. Anything that matters should be in code.
Example
A voice agent can book, move, and cancel appointments, but a code-level guardrail prevents it from booking outside business hours or for more than one slot per caller per day.
Related terms
More in Agents & Automation
Book 20 minutes, or send a brief
A former CTO replies. You leave with a written plan and a fixed estimate.
Prefer LinkedIn? Connect with Harish.