Independent reporting on artificial intelligence.


The Frontier Wire

Comparisons

The 9 best AI guardrails tools in 2026, compared by where they enforce

AI guardrails now come as gateways, cloud APIs, Python frameworks and small safety models. They differ less in what they detect than in where they sit and what traffic they can see. Nine tools, compared against published criteria, with the gaps each one leaves.

TL;DR

  • AI guardrails are runtime checks on prompts, responses, tool arguments and tool results. The tools differ mainly in placement: inside the application, attached to one cloud’s models, or at a gateway that sees every model and tool call.
  • No detector is complete. OWASP says it is “unclear if there are fool-proof methods of prevention for prompt injection,” so the useful question is how many checkpoints a tool covers and how easily detectors can be layered.
  • Bifrost ranks first: one open-source gateway applies guardrail rules to both LLM and MCP tool traffic, combines built-in detectors with twelve external services including Bedrock Guardrails, Azure Content Safety and Model Armor, and redacts in-line.
  • Amazon Bedrock Guardrails, Azure AI Content Safety and Google Model Armor are the strongest managed detectors. NeMo Guardrails, Guardrails AI and Meta’s Llama Guard family lead in open source. Kong and Cloudflare add guardrails to an existing gateway.

AI guardrails are runtime controls that inspect the text, images and tool calls flowing into and out of a language model, then block, redact or flag anything that breaks a policy. The best AI guardrails tools in 2026 fall into four groups: AI gateways that enforce checks on every request, managed cloud detection services, open-source frameworks and safety models, and existing API gateways with guardrail plugins. This comparison ranks nine of them against published criteria, with each capability taken from the vendor’s own documentation, model card or repository, read in October 2026. None of the tools were deployed or attacked for this piece, so detection accuracy is reported only where a vendor or paper publishes it.

What AI guardrails are

An AI guardrail is a check that runs outside the model and decides whether a prompt, a response or an action may proceed. It complements a model’s safety training rather than replacing it: training shapes what the model tends to say, while a guardrail enforces what an application allows, regardless of which model is behind it.

The need comes from the way language models read input. OWASP’s Top 10 for LLM Applications 2025 lists prompt injection first and defines it as user prompts that “alter the LLM’s behavior or output in unintended ways.” It separates direct injection, typed by a user, from indirect injection, which arrives inside “external sources, such as websites or files.” Indirect injection was formalised by Greshake and colleagues in 2023, and it is the reason agent guardrails must inspect tool results, not only user prompts.

Guardrails also cover risks that have nothing to do with attackers:

  • Sensitive data: personal data, credentials or source code in prompts sent to a third-party model (OWASP LLM02).
  • Harmful output: hate, violence, sexual content, self-harm and dangerous advice.
  • Off-policy content: topics the business does not want an assistant to discuss, or competitor names in marketing copy.
  • Ungrounded answers: responses that contradict the retrieved documents in a retrieval-augmented system.
  • Unsafe actions: tool calls an agent should not make, or arguments that carry secrets out.

The US National Institute of Standards and Technology lists the same families of risk in its Generative AI Profile, NIST AI 600-1, published in July 2024 as a companion to the AI Risk Management Framework. Guardrails are one of the few controls in that profile that act on every request at runtime. For the attack side in more depth, the Frontier Wire has a dedicated explainer on prompt injection.

Where guardrails sit in an AI system

AI guardrails can run inside the application, beside a specific model API, at a shared gateway, or on the employee’s machine. Placement decides coverage: a check embedded in one service protects that service only, while a check at a gateway applies to every application and agent that routes through it, whichever model each one calls.

A chat application needs two checkpoints, one on the prompt and one on the response. An agent needs four, as Figure 1 shows: the model can propose a tool call, the tool runs with real credentials, and the tool’s result goes back into the model’s context, where it can carry injected instructions.

An agent request passes an input guardrail before the model, an output guardrail after it, and separate argument and result checks around each tool call

Figure 1: An agent has four checkpoints, not two: tool arguments and tool results need their own checks.

The common placements, and what each one sees:

PlacementExamples in this listSeesMisses
In the applicationNeMo Guardrails, Guardrails AI, LlamaFirewallWhatever the code wraps, including agent reasoningEvery application not instrumented
Beside one model APIBedrock Guardrails on Bedrock callsCalls to that providerOther providers, unless called separately
Standalone detection APIApplyGuardrail, Azure Content Safety, Model ArmorWhatever the caller sendsNothing is checked unless the caller sends it
AI gatewayBifrost, Kong, CloudflareEvery model call routed through it; tool calls if the gateway routes MCPTraffic that bypasses the gateway
EndpointBifrost EdgeAI apps on employee machinesUnmanaged devices

Gateways have become the default enforcement point for teams running several applications, for the same reason they took over authentication and rate limiting for ordinary APIs. The Frontier Wire’s comparison of AI gateways and API gateways explains what changes when the payload is tokens rather than JSON, and the ranking of AI gateways covers the routing side.

Types of guardrail detectors

Guardrail detectors come in three kinds: deterministic rules such as regular expressions and secret scanners, small classifier models trained for one job such as Llama Guard or Prompt Guard, and an LLM acting as a judge against a natural-language policy. They trade cost and latency against flexibility, so production systems usually chain them.

  • Deterministic rules match patterns: card numbers, API key formats, banned words. They are fast, explainable and reliable for exact patterns, and blind to anything phrased differently.
  • Classifier models are small models fine-tuned to label content. Meta’s Llama Guard paper describes the approach: a model trained on a safety taxonomy classifies both prompts and responses. Cloud services such as Bedrock Guardrails and Model Armor are, from the caller’s side, managed classifiers with configurable thresholds.
  • LLM judges send content and a written policy to a general model and ask for a decision. They handle policies no classifier was trained on (“do not give tax advice for a specific jurisdiction”) at the price of a full model call per check.

Content passes regex and secrets rules first, then small classifier models such as Llama Guard or Prompt Guard, then an LLM judge, with each stage able to block

Figure 2: Ordering detectors by cost keeps most blocked requests away from the slowest and most expensive check.

Figure 2 is the pattern most mature deployments converge on. A tool that can only run one kind of detector forces a choice between speed and coverage; a tool that can chain several, and apply different chains to different traffic, avoids it.

How the tools were chosen

Candidates were open-source projects and commercial products with public documentation of runtime guardrails for LLM traffic in October 2026. Each had to document at least input and output checks in enough detail to verify. Evaluation platforms and red-teaming scanners were left out; they test a system before release rather than enforcing policy on live traffic.

The criteria come before the ranking so readers can weight them differently.

CriterionWhat was checkedWhy it matters
Checkpoint coveragePrompt, response, tool arguments, tool resultsAgents fail at the tool boundary (OWASP LLM01, indirect injection)
Provider independenceWorks with any model or only one cloud’sMost teams run more than one provider
Detector rangeRules, classifiers, LLM judge, third-party servicesLayering is the main defense against misses
RemediationBlock, redact, mask, flag, log-onlyRedaction keeps a request useful; log-only allows tuning
Policy targetingCan rules differ by team, key, model or toolOne policy for every workload over-blocks
Streaming behaviorWhat happens to streamed output under a block-capable checkStreaming is the default for chat and coding agents
Deployment and licenceSelf-hosted, managed, open sourceData residency and who sees the content

Checkpoint coverage and provider independence were weighted highest, because they decide whether a policy actually applies to all the traffic it is meant to govern. Bifrost’s first place rests on those two criteria.

AI guardrails tools at a glance

Rank and toolTypeCheckpointsDetectorsDeployment and licence
1. BifrostAI gatewayPrompt, response, MCP tool arguments and resultsRegex, secrets, LLM judge, 12 external servicesSelf-hosted; Apache 2.0 core, guardrails in enterprise tier
2. Amazon Bedrock GuardrailsManaged servicePrompt, response; any text via ApplyGuardrailContent, topics, words, PII, grounding, Automated ReasoningAWS managed, per text unit
3. Azure AI Content SafetyManaged APIPrompt, documents, response; agent tool responses (preview)Harm categories, Prompt Shields, groundedness, protected materialAzure managed
4. Google Model ArmorManaged servicePrompt, response, PDFs, imagesInjection and jailbreak, safety categories, SDP, malicious URLsGoogle Cloud managed, works with any model
5. NVIDIA NeMo GuardrailsOpen-source frameworkInput, retrieval, dialog, execution, output railsBuilt-in rails, Colang flows, custom actionsPython library or container; Apache 2.0
6. Guardrails AIOpen-source frameworkInput and output guardsHub validators, structured outputPython library or REST server; Apache 2.0
7. Meta Llama Guard 4 and LlamaFirewallSafety models and agent frameworkPrompt, response, agent reasoning, generated codeClassifier models, AlignmentCheck, CodeShieldSelf-hosted; Llama licences and MIT
8. Kong AI GatewayAPI gateway pluginsPrompt, responseRegex and semantic guards, PII sanitizer, cloud service pluginsSelf-hosted or Konnect; several plugins enterprise
9. Cloudflare AI GatewayManaged AI gatewayPrompt, responseLlama Guard 3 8B, Prompt Guard 2Cloudflare managed, Workers AI usage

Gateway-layer guardrails

A gateway enforces guardrails on traffic it already routes, so applications do not each need their own integration and policy changes take effect without redeploying code. Bifrost is the only entry in this list whose gateway applies the same rule engine to model calls and to MCP tool calls, which is why it receives the longest write-up.

1. Bifrost

Bifrost is an open-source AI gateway written in Go under Apache 2.0 and built by Maxim AI. It exposes 25+ providers and 10,000+ models through one OpenAI-compatible API, and Bifrost’s published benchmark reports 11 µs of added overhead per request at 5,000 RPS on an AWS t3.xlarge (benchmark documentation). Its guardrails run inside that request path.

Rules and profiles. The guardrail layer splits policy into two objects, as its documentation describes. A rule is a CEL (Common Expression Language) expression that decides when a check runs, using fields such as model, provider, virtual key, team, user or, for tool traffic, MCP client and tool name. A profile is a configured detector. One rule can link several profiles in a set order, and one profile can serve many rules. Each rule has an input, output or both setting, a sampling rate from 0 to 100 percent, and a timeout. Figure 3 shows the relationship.

Model and MCP tool traffic enters the Bifrost AI gateway, where CEL rules select profiles for built-in detectors or external services such as Bedrock Guardrails and Model Armor

Figure 3: Rules decide when a check runs; profiles decide which detector runs it, so one detector can serve many rules.

Tool calls as a first-class target. Every rule targets either llm or mcp. For MCP rules, the documentation states, input means inspecting tool arguments “before the MCP tool executes” and output means inspecting the result “after the tool returns,” with a block at either point stopping the call. That covers all four checkpoints in Figure 1 from one policy store. A Bifrost blog post on MCP guardrails walks through the configuration, and the Frontier Wire’s review of MCP security tools places it among scanners and registries.

Detectors. Three detectors are built in: Prompt Guardrails, an LLM judge that returns ALLOW or BLOCK with a reason for a natural-language policy; custom regex with a PII template; and secrets detection based on the 222 default rules of Gitleaks v8.30.1. Twelve external services plug in as profiles: Microsoft Presidio, Azure AI Language PII, AWS Bedrock Guardrails, Azure Content Safety, Google Model Armor, CrowdStrike AIDR, Gray Swan Cygnal, Patronus AI, Check Point’s AI Agent Security, Repello Argus, Singulr AI and A10 Guardrails.

In practice, entries 2 to 4 of this list can run behind Bifrost rather than instead of it; Bifrost’s write-ups on screening text and images with Bedrock Guardrails and redacting data with Model Armor show the pattern.

Redaction and streaming. The redaction documentation defines three modes: runtime rewrites the live request or response, logs_only leaves traffic untouched but redacts Bifrost’s logs and trace exports, and runtime_reversible uses placeholders that authorised users can reveal in logs. For streamed output, detect-only rules do not delay delivery; if any matched rule can block, Bifrost holds the stream until evaluation finishes, then replays it.

Endpoints. Bifrost Edge, in early access, routes AI traffic from desktop apps, browser AI and coding agents on employee machines through the gateway. Its security documentation states that existing guardrail profiles apply to that traffic “with no additional configuration.” That extends the gateway’s policy to tools such as Claude Desktop that would otherwise never pass through it.

Bifrost’s own overview of what it ships and what it integrates and its guardrails resource page list the full set.

Enterprise tier. Guardrails, redaction and Bifrost Edge are part of Bifrost Enterprise; routing, virtual keys, budgets and the MCP gateway are in the open-source core.

Best for: teams that want one policy, enforced at one layer, across several model providers and the MCP tools their agents call.

Managed cloud guardrail services

The three large clouds each sell a managed detection service. All three can be called directly by an application, and all three can sit behind a gateway. They are strongest on classifier-based detection with tuned thresholds and on compliance paperwork; they leave enforcement placement to the customer.

2. Amazon Bedrock Guardrails

Amazon Bedrock Guardrails is the broadest managed policy set in the list. A guardrail combines up to six safeguards:

  • Content filters for hate, insults, sexual content, violence, misconduct and prompt attacks, each with its own strength, on text and images.
  • Denied topics defined in plain language.
  • Word filters, including a managed profanity list.
  • Sensitive information filters that block or mask PII entities and custom regex patterns.
  • Contextual grounding checks that flag responses not supported by a reference source, for retrieval-augmented systems.
  • Automated Reasoning checks that validate responses against a set of logical rules.

According to AWS, the Standard tier extends harmful-content detection to code elements, including comments, variable names and string literals. Guardrails attach to Bedrock model calls by ID and version, and the ApplyGuardrail API evaluates any text “without invoking the foundation models,” marked as INPUT or OUTPUT. That makes it usable with non-AWS models.

Pricing on the Bedrock pricing page is per text unit of up to 1,000 characters: $0.15 per 1,000 text units for content filters and denied topics, $0.10 for sensitive information and grounding checks, with word filters and regex-based sensitive information filters free. Image content filtering costs $0.00075 per image.

Limits. Enforcement is automatic only for Bedrock calls; other providers need code or a gateway that calls ApplyGuardrail. There is no notion of an MCP tool boundary in the service itself.

Best for: AWS-centred teams that want the widest managed policy set, including grounding and Automated Reasoning checks.

3. Azure AI Content Safety

Azure AI Content Safety is Microsoft’s detection API, used by Azure AI Foundry and callable on its own. Its text and image analysis scores sexual content, violence, hate and self-harm at multiple severity levels, and custom categories let teams train or define their own.

Its distinguishing feature for LLM security is Prompt Shields, which detects two attack types: user prompt attacks that try to bypass system instructions, and document attacks, “hidden instructions embedded in document content (documents, emails, web pages).” For agents, Microsoft states that Prompt Shields can also scan document attacks “at the tool response intervention point for supported tools,” currently in preview. Other APIs cover groundedness detection (preview), protected material in generated text, and task adherence, which detects tool use by an agent that is “misaligned, unintended, or premature.”

Limits. Protected material, groundedness and standard custom categories work in English only; the other models were trained and tested on eight languages. Microsoft notes the service cannot be used to detect illegal child exploitation images. Like Bedrock, it detects; enforcement depends on where it is called.

Best for: teams on Azure, and anyone who wants a dedicated indirect-injection detector for documents and tool responses.

4. Google Model Armor

Google Model Armor screens prompts and responses and, according to Google, works “whether you are deploying AI in Google Cloud or other cloud providers.” Its filters cover prompt injection and jailbreaks; hate speech, harassment, sexually explicit and dangerous content; child sexual abuse material; Sensitive Data Protection for PII and intellectual property, with de-identification; and malicious URLs. It also extracts and scans text inside PDFs and inspects images.

Configuration lives in templates, with separate input and output templates recommended, and organization-wide floor settings set a minimum policy. Each template can run in inspect-only mode, which logs violations to Cloud Logging without blocking, or inspect-and-block. Google’s documentation is unusually direct about thresholds: it recommends “Medium and above” for most categories and warns that “Low and above” produces a high volume of false positives. Model Armor integrates with Apigee, Gemini Enterprise, Google Cloud MCP servers and LangChain, and is billed by tokens, either standalone or through Security Command Center.

Limits. Regional endpoints inside a VPC need a Private Service Connect endpoint. Policy targeting by user or application depends on which template the caller or integration chooses.

Best for: teams that want a provider-neutral managed detector with document and URL scanning and a clear log-only rollout path.

Open-source guardrail frameworks and models

Open-source guardrails run on infrastructure the team controls, so prompts never leave it for inspection. They range from programmable frameworks to small safety models. All of them put enforcement inside the application, which gives deep access to agent state at the cost of instrumenting each service.

5. NVIDIA NeMo Guardrails

NeMo Guardrails is an Apache 2.0 Python library, at version 0.24.1, “for adding programmable guardrails to LLM-based applications.” It organises checks as rails at five stages: input, retrieval, dialog, execution and output. Retrieval rails inspect retrieved chunks before they reach the prompt, and execution rails wrap actions the application takes, which gives tool calls and RAG content a documented checkpoint of their own.

Policies are written in YAML and Colang, NVIDIA’s language for conversational flows, and extended with Python custom actions that can call external APIs or safety models. The same configuration runs in the library during development and in the NeMo Guardrails microservice, a container deployed on Kubernetes with Helm, in production.

Limits. Colang is a language to learn, and dialog rails add model calls to each turn. Coverage extends only to applications built on or proxied through the library.

Best for: teams building conversational agents that need flow-level control, such as keeping an assistant on a scripted path, alongside content checks.

6. Guardrails AI

Guardrails AI is an Apache 2.0 Python framework that runs “Input/Output Guards” around model calls. Guards are composed from validators published on Guardrails Hub, such as regex matching, toxic language or competitor mentions, each with an on-fail action that can raise an exception, fix the output or re-ask the model. The same framework enforces structured output: a Guard built from a Pydantic model makes the LLM return data in that shape, using function calling where the model supports it. A guardrails start command runs the guards as a standalone Flask REST service.

Limits. Validator quality varies, since the Hub mixes rule-based and model-based checks from different authors. There is no built-in concept of agent tool calls; teams wire guards around them in code.

Best for: Python teams that want composable validators and schema enforcement in the same library.

7. Meta Llama Guard 4 and LlamaFirewall

Meta publishes guardrail components rather than a product. Llama Guard 4 is a 12-billion-parameter, natively multimodal safety classifier that “can be run on a single GPU” and labels prompts and responses against a hazard taxonomy (Llama Guard 3’s has 14 categories, from violent crimes to code interpreter abuse). Meta says it is optimised for English text and is not designed for image-only classification. Prompt Guard models classify injection and jailbreak attempts.

LlamaFirewall, described in a 2025 paper and published in the PurpleLlama repository, assembles these into an agent guardrail: PromptGuard 2 for direct injection, AlignmentCheck, which audits an agent’s chain of thought for goal hijacking and indirect injection, regex and custom scanners, and CodeShield, a static analyser for generated code using Semgrep and regex rules across eight languages. Evaluations and CodeShield are MIT-licensed; the models use Llama community licences.

Limits. Teams host and scale the models themselves. AlignmentCheck needs access to the agent’s reasoning trace, which hosted agents do not always expose.

Best for: teams that self-host models and want open safety classifiers, especially for coding agents where generated code needs checking.

Gateways with guardrail plugins

Two established gateways add guardrails as features. They suit teams that already route model traffic through them and want basic policy without another component.

8. Kong AI Gateway

Kong AI Gateway adds AI plugins to Kong’s API gateway. The AI Prompt Guard plugin applies allow and deny lists of regular expressions to user messages. The AI Semantic Prompt Guard plugin matches prompts by similarity to example prompts and returns a 403 on a deny match. AI PII Sanitizer redacts personal data before it reaches the upstream provider, AI Semantic Response Guard checks responses, and separate plugins call AWS Bedrock Guardrails, Azure Content Safety and GCP Model Armor.

Limits. The semantic guard, PII sanitizer and AWS Guardrails plugins are documented as available only in AI Gateway Enterprise. Guardrails are configured per plugin rather than as a shared rule set, and MCP tool results are not a documented guardrail target.

Best for: organizations already running Kong for APIs that want guardrails in the same control plane.

9. Cloudflare AI Gateway Guardrails

Cloudflare AI Gateway includes Guardrails that inspect prompts and responses for any provider routed through it. Per the usage documentation, it uses Llama Guard 3 8B on Workers AI for hazard categories S1 to S13 and Prompt Guard 2 (86M) for prompt injection, with category S14, code interpreter abuse, not evaluated. Each category can be set to flag, ignore or block, separately for prompts and responses, from the dashboard or API.

Limits. The detector set is fixed to those models, with no PII redaction or custom policy in Guardrails itself, and evaluations incur Workers AI usage. Traffic must route through Cloudflare.

Best for: teams already on Cloudflare that want baseline content moderation switched on in minutes.

Choosing an AI guardrails tool

Choose by placement first, then by detectors. If several applications or agents call several providers, enforce at a gateway and plug managed or open-source detectors into it. If one application on one cloud needs checks, that cloud’s service is the shortest path. Frameworks fit where policy depends on application state.

A practical sequence for most teams:

  1. Route traffic through one enforcement point. Without it, each team implements its own checks and the weakest one sets the real policy. The Frontier Wire’s guide to open-source AI gateways covers self-hosted options, and its review of on-premise gateways covers air-gapped deployments where cloud detectors are not an option.
  2. Start with cheap deterministic checks. Secrets and PII patterns catch the most damaging leaks with no model call.
  3. Add a classifier for injection and harmful content. Prompt Shields, Model Armor, Bedrock’s prompt attack filter or Prompt Guard 2.
  4. Run new rules in log-only mode first. Model Armor’s inspect-only mode and Bifrost’s logs_only redaction exist for this.
  5. Treat tool results as untrusted input. Apply the same checks to tool outputs as to user prompts, and pair them with least-privilege tool access.

Bifrost’s guide to implementing guardrails at the gateway layer and its article on guardrails in agent workflows expand on steps 1 and 5. Coding agents are a special case: they send source code and secrets to models by design, which the comparison of gateways for Claude Code, Codex and Cursor addresses.

What guardrails cannot do

Guardrails reduce risk on the traffic they see; they do not make a model safe. Every detector in this list is probabilistic or pattern-bound, and every placement has traffic it never sees. Three limits apply to all nine tools.

Misses are certain. OWASP’s guidance on prompt injection states plainly that “it is unclear if there are fool-proof methods of prevention.” Its recommended mitigations put filtering third, after constraining model behavior and validating output formats, and add least-privilege access, “human approval for high-risk actions,” segregation of untrusted content and adversarial testing. A guardrail is one layer of that list.

False positives have a cost. Google’s Model Armor documentation warns that the most sensitive threshold “can cause a high volume of false positives.” Blocking legitimate requests pushes users toward unsanctioned tools, which is a security problem of its own. Tuning thresholds per workload, which requires per-rule targeting, is the remedy.

Latency adds up. Every model-based check is another inference call. Streamed responses are the sharpest case: a check that can block the output must see the whole response first, so the user waits for the full generation. Sampling a percentage of traffic, running detect-only checks asynchronously and ordering detectors by cost keep the overhead bounded. The AI security resource page from Bifrost and the Frontier Wire’s explainer on what running a gateway costs cover the operational side.

The verdict

The best AI guardrails tool is the one that applies a policy to all of the traffic it is meant to govern, and lets a team layer detectors as threats change. On those criteria Bifrost ranks first: its rules cover prompts, responses and MCP tool calls in one engine, target policies by team, key, model or tool, and plug in the managed detectors that rank second to fourth here. Amazon Bedrock Guardrails has the widest managed policy set, Azure AI Content Safety the most specific indirect-injection detection, and Google Model Armor the clearest provider-neutral rollout path. NeMo Guardrails, Guardrails AI and Meta’s Llama Guard family are the strongest options for teams that want every check in their own code. Kong and Cloudflare suit teams already committed to those platforms.

What would change this ranking is published, comparable detection data. No vendor here reports precision and recall on a shared benchmark, so detection quality remains a question each team has to test on its own traffic before trusting any AI guardrails product.

Sources

  1. OWASP Top 10 for LLM Applications 2025: LLM01 Prompt Injection
  2. NIST AI 600-1: AI RMF Generative AI Profile (July 2024)
  3. Greshake et al., Not what you've signed up for: indirect prompt injection (2023)
  4. Inan et al., Llama Guard: LLM-based input-output safeguard (2023)
  5. Chennabasappa et al., LlamaFirewall: an open source guardrail system for secure AI agents (2025)
  6. Bifrost source repository (GitHub, Apache 2.0)
  7. Bifrost docs: guardrails overview
  8. Bifrost docs: guardrail redaction modes
  9. Bifrost docs: Prompt Guardrails
  10. Bifrost docs: secrets detection
  11. Bifrost docs: Bifrost Edge security and guardrails
  12. Bifrost docs: benchmarking
  13. Amazon Bedrock Guardrails user guide
  14. Amazon Bedrock Guardrails: ApplyGuardrail API
  15. Amazon Bedrock pricing
  16. Azure AI Content Safety overview
  17. Azure AI Content Safety: Prompt Shields
  18. Google Cloud: Model Armor overview
  19. NVIDIA NeMo Guardrails library documentation
  20. Meta: Llama Guard 4 model card and prompt format
  21. Meta PurpleLlama repository (Llama Guard, Prompt Guard, LlamaFirewall)
  22. Kong AI Gateway documentation
  23. Kong: AI Semantic Prompt Guard plugin
  24. Cloudflare AI Gateway: Guardrails usage considerations

Questions readers ask

What are guardrails in AI?

AI guardrails are runtime checks that inspect what goes into and comes out of a language model and block, redact or flag content that breaks a policy. Typical checks cover prompt injection, jailbreaks, personal data, secrets, harmful content and off-topic requests. They run outside the model, so they work with any model, and they complement the safety training the model already has.

How do I add guardrails to my AI agent?

Put checks at four points, not two. Inspect the user prompt before the model, the model output before the user, the arguments of each tool call before it executes, and each tool result before it goes back to the model. A gateway that routes both model and tool traffic can apply all four from one policy; frameworks such as NeMo Guardrails or LlamaFirewall do it inside the application code.

What are guardrails in AWS?

In AWS, guardrails usually means Amazon Bedrock Guardrails, a managed service that applies content filters, denied topics, word filters, sensitive-information filters, contextual grounding checks and Automated Reasoning checks to prompts and responses. It can be attached to Bedrock model calls or called on its own through the ApplyGuardrail API to screen text from any model, and it is priced per 1,000 text units.

Do AI guardrails stop prompt injection?

They reduce it but do not stop it. OWASP's 2025 entry on prompt injection says it is unclear whether fool-proof prevention exists, and recommends layering filtering with least-privilege tool access, human approval for high-risk actions and separation of untrusted content. Classifiers such as Prompt Shields, Prompt Guard 2 or Model Armor catch known patterns; novel attacks can still pass.

Are open-source guardrails good enough for production?

Often, for the checks they cover. NeMo Guardrails, Guardrails AI and Meta's Llama Guard and LlamaFirewall are used in production, run on infrastructure the team controls and keep data in-house. The trade-off is operational: the team hosts the safety models, tunes thresholds and wires the checks into every application, which is why many teams enforce them at a shared gateway instead.

More comparisons