01
What AI agent guardrails actually are
A guardrail is not the model being polite. It is an external control that sits around the model and constrains its behavior regardless of what the model decides to output. The distinction matters because the risk with an agent is not that it is unintelligent, it is that it is obedient and connected to tools. The OWASP Top 10 for LLM Applications names this failure mode Excessive Agency, which it defines as an LLM-based system taking damaging actions in response to unexpected, ambiguous, or manipulated outputs, whether the trigger is a hallucination or a prompt injection. OWASP traces it to three root causes: excessive functionality, meaning the agent can call tools it never needs; excessive permissions, meaning those tools have more access than the task requires; and excessive autonomy, meaning high-impact actions run without verification or approval. Guardrails are the controls you place against each of those causes. They are deterministic or probabilistic checks, not vibes, and they run whether or not the model cooperates. A guardrail an agent can talk its way around is not a guardrail, which is exactly why the good ones live outside the prompt.
02
The types of guardrails: input, output, and everything the agent tries to do
Most guardrail systems organize around where in the flow the check fires. NVIDIA's NeMo Guardrails, one of the most widely used open toolkits, defines five categories directly. Input rails are applied to the user's input and can reject it or alter it before it reaches the model. Dialog rails shape how the model is prompted and decide whether an action runs, whether the model answers, or whether a predefined response is used. Retrieval rails screen the chunks pulled in a RAG flow and can reject or edit them before they become context. Execution rails govern the inputs and outputs of the custom actions and tools the model calls. Output rails are applied to what the model generates and can reject or alter the response before it reaches the user. That five-part split, input, dialog, retrieval, execution, output, is a clean mental model even if you never use NeMo, because it maps to every point where an agent can go wrong: what it reads, how it is steered, what it retrieves, what it does, and what it says.
03
The frameworks that implement guardrails, and how they differ
You rarely build guardrails from scratch. The OpenAI Agents SDK implements input guardrails and output guardrails that run a check function and set a tripwire; when a tripwire is triggered the SDK raises an exception and halts the agent, and input guardrails can run in parallel with the agent for latency or block before it starts to save tokens and prevent tool calls. Guardrails AI is a Python framework built around Input and Output Guards composed from reusable validators pulled from its Hub, each validator detecting and mitigating a specific class of risk. Amazon Bedrock Guardrails ships configurable policies as a managed service: content filters across categories such as hate, insults, sexual, violence, misconduct, and prompt attack; denied topics; word filters; sensitive information filters that block or mask PII such as SSNs and addresses; contextual grounding checks that catch hallucinations against a source; and automated reasoning checks that validate a response against logical rules. Azure offers comparable content-safety and prompt-shield controls in its AI platform. Orchestration tools like n8n do not ship a guardrail engine so much as let you wire validation and approval steps as explicit nodes around an agent before its action node fires. The shapes differ, rails, validators, filters, tripwires, but the job is the same: intercept before harm.
04
A framework for AI agent guardrails that actually holds
If you want a framework rather than a feature list, build it against the three OWASP root causes plus the content layer, and apply it in this order. First, constrain functionality: give the agent only the tools the job requires and avoid open-ended capabilities like raw shell or arbitrary HTTP; every tool you remove is a class of failure you deleted. Second, constrain permissions: run the agent under its own identity with least-privilege scopes, so an agent with no delete right cannot delete no matter what the model outputs, and enforce authorization in the downstream system rather than trusting the model to restrain itself. Third, screen content: put input and output guardrails on the model boundary to catch prompt injection, PII leakage, toxic or off-policy responses, and ungrounded claims. Fourth, and the layer most teams skip, constrain autonomy: require human approval before high-impact, hard-to-reverse actions execute. The first three shrink the blast radius; the fourth decides the calls that judgment, not a filter, has to own. A framework that stops at the first three ships fast and still lets a confident wrong action through.
05
What happens when an AI agent has no guardrails
The cost of skipping guardrails is not theoretical, and it is not only a security-team problem. In Moffatt v. Air Canada, decided by British Columbia's Civil Resolution Tribunal in 2024, an airline's website chatbot told a grieving customer he could book a full-fare ticket and claim a bereavement discount retroactively, a policy the airline did not actually offer. When the customer tried to claim it, Air Canada refused, and argued in the tribunal that it could not be held liable for information provided by its own chatbot. The tribunal rejected that, found negligent misrepresentation, and ordered the airline to pay the customer. The dollar figure was small, about 812 Canadian dollars, but the precedent is not: a company is responsible for what its agent says and does, even when the agent invents the answer. An output guardrail that grounded the chatbot's response in the real policy, or a retrieval rail that fed it the correct document, would have caught this before it reached the customer. Every customer-facing agent without that check is one confident hallucination away from a commitment you are legally on the hook for.
06
Guardrails versus human-in-the-loop approval: where each one stops
Guardrails and approval are often used as if they were the same control, and they are not. A guardrail is an automated check for a class of problem defined in advance: is there PII in this output, is this topic denied, is this claim grounded, does this input look like an injection. It is fast, it is cheap, and it scales to every call, which is exactly why it works for machine-scale, pattern-shaped failures. What it cannot do is decide whether one specific, legitimate-looking action is the right business call. A content filter has no opinion on whether this particular 40 percent discount should be approved, whether this outbound email to a churning account should go, or whether this CRM field should be overwritten. That is a judgment about consequence, and OWASP's own top mitigation for Excessive Agency is explicit about it: use human-in-the-loop control to require a human to approve high-impact actions before they are taken. Regulation lands in the same place. Article 14 of the EU AI Act requires that a human overseeing a high-risk system can intervene, disregard, override, or reverse its output. Guardrails reduce how often a human has to look. Approval decides what happens when they do.
07
Guardrails belong across the whole stack, not just the model
Here is the gap most guardrail conversations miss. NeMo, Guardrails AI, Bedrock, and the OpenAI SDK all sit at the model boundary, which is the right place to screen what the model reads and says. But a working GTM agent does not stop at the model. It writes to Salesforce, opens a Jira ticket, sends a Gmail follow-up, and posts a Slack update, and none of those actions passes back through the model's input or output rails. An output guardrail that a response is non-toxic tells you nothing about whether the CRM write it triggers is correct, or whether the email it drafted should actually be sent to that customer. This is Excessive Agency at the tool layer, and the mitigation OWASP recommends is the same one that content filters cannot provide: enforce authorization in the downstream system, and require human approval on the high-impact action itself. In practice that means the guardrail for the action has to live where the action fires, not only where the tokens are generated. Model-level guardrails and action-level approval are two different jobs, and shipping one while calling it the other is how teams end up surprised.
08
Putting guardrails and approval into one place your team actually uses
The practical move for a revenue team is to keep model-level guardrails where they belong, on the LLM boundary, and add a single approval layer over every action an agent drafts, rather than a separate gate bolted onto each tool. That is the shape we build at Mindlyft. After a customer call, ASTRA drafts the full outcome set, the Salesforce updates, the Jira ticket, the follow-up email, the Slack nudge, and every high-consequence item waits in one review queue where the rep approves, edits, or rejects it before anything ships, with each decision and its source logged for audit. Content-level guardrails still do their job inside the model, and the queue covers the tool actions those guardrails were never able to see. It is guardrails for the words and approval for the deeds, in one interface a CSM or SE will actually use, instead of a dashboard nobody opens. Mindlyft is GTM engineering on subscription: the first workflow is engineered free, then it is 5,995 dollars a month, at mindlyft.in.
Sources behind this piece
- [01]OWASP Top 10 for LLM Applications, LLM06:2025 Excessive Agency
- [02]NVIDIA NeMo Guardrails (open-source toolkit)
- [03]Guardrails AI, documentation (Input/Output Guards and validators)
- [04]Amazon Bedrock Guardrails, AWS documentation
- [05]OpenAI Agents SDK, Guardrails (input/output guardrails and tripwires)
- [06]Moffatt v. Air Canada, 2024 BCCRT 149 (Civil Resolution Tribunal of British Columbia)
- [07]EU AI Act, Article 14 (Human oversight)
FAQ
What are AI agent guardrails?
AI agent guardrails are automated controls placed around an AI agent that constrain what it can read, generate, and do, so that a manipulated, ambiguous, or hallucinated model output cannot become a damaging action. They run outside the prompt, so the agent cannot talk its way past them, and they target the three root causes OWASP calls Excessive Agency: too much functionality, too many permissions, and too much autonomy.
What are the types of AI agent guardrails?
The common taxonomy, used by NVIDIA NeMo Guardrails, is five types: input rails that screen or alter the user input, dialog rails that steer how the model is prompted and whether an action runs, retrieval rails that screen the documents pulled in a RAG flow, execution rails that govern the tools and actions the model calls, and output rails that screen or alter the model's response. Many stacks simplify this to input guardrails, output guardrails, and action or execution guardrails.
What is an AI agent guardrails framework?
A guardrails framework is the layered set of controls you apply in order rather than a single check. A practical one has four layers: constrain functionality so the agent only has the tools it needs, constrain permissions so those tools run at least privilege, screen content with input and output guardrails on the model boundary, and gate high-impact actions behind human approval. The first three shrink the blast radius; the fourth owns the consequential calls a filter cannot judge. Open frameworks like NeMo Guardrails and Guardrails AI, and platform features like Amazon Bedrock Guardrails and the OpenAI Agents SDK, implement the content layers.
What happens if an AI agent has no guardrails?
Without guardrails, an agent will act on whatever it outputs, including hallucinations and manipulated responses, and the organization is on the hook for the result. In Moffatt v. Air Canada (2024), a tribunal held the airline liable for a refund policy its chatbot invented and ordered it to pay the customer, rejecting the argument that the company was not responsible for its own agent. An output or retrieval guardrail grounding the response in the real policy would have prevented it.
What is the difference between AI guardrails and human-in-the-loop approval?
Guardrails are automated checks for classes of problems defined in advance, such as PII, denied topics, ungrounded claims, or prompt injection, and they scale to every call cheaply. Human-in-the-loop approval is a person deciding whether one specific high-consequence action should execute, a judgment a content filter cannot make. OWASP's top mitigation for Excessive Agency and Article 14 of the EU AI Act both require human approval or override for high-impact actions. Guardrails reduce how often a human must look; approval decides what happens when they do.
Which frameworks provide AI agent guardrails?
Widely used options include NVIDIA NeMo Guardrails and Guardrails AI, both open-source, plus platform-native features such as Amazon Bedrock Guardrails (content filters, denied topics, PII masking, contextual grounding, automated reasoning checks) and the OpenAI Agents SDK (input and output guardrails with tripwires). Azure provides comparable content-safety and prompt-shield controls. These cover the model boundary; gating the agent's downstream actions across tools like a CRM, ticketing, or email still requires an approval layer where those actions fire.
Want the GTM engineer without the headcount?
Apply for a subscription slot and get unlimited GTM engineering requests handled at a fixed monthly rate.
Apply for a slot