SentinelOS

Resources · Agent security

An AI guardrail reads text. An agent produces actions.

An AI guardrail is a layer that examines what goes into a model or what comes out of it, and decides whether it passes. It stops well what it can recognize: forbidden content, a known attack formula. It does not see what the text triggers, nor the chain of actions an agent builds from documents it has read. Evaluations published in 2025 also show that attackers who adapt get around these filters. Here is what each layer sees, what the measurements say, and what a complete defense adds.

What is an AI guardrail?

A guardrail is a mechanism placed around a language model to control what it receives or what it produces. The term covers four layers that do not control the same thing: instructions, input and output filters, guard models and action controls. The first three read text, the fourth reads an action. For an assistant that only converses, the difference is small. For an agent that sends, changes or deletes, it decides everything, because the most harmless text can trigger the most serious action and a text filter does not look at it.

  • Instructions. The system prompt, where the developer writes the model's role and what it must refuse. The control is written in natural language and applied by the model itself.
  • Input and output filters. Rules, lists, regular expressions, format checks. They examine text before or after the model.
  • Guard models. Classifiers, themselves trained, that give a score or a verdict on a text: safe or not, attack or not. Llama Guard, Prompt Guard and Prompt Shields are examples.
  • Action controls. A check applied to a tool call, its parameters and its destination, before it runs.

The first three layers read text. The fourth reads an action. For an assistant that only converses, the difference is small: a refused text is damage avoided. For an agent that sends, changes or deletes, the difference decides everything, because the most harmless text can trigger the most serious action, and a text filter does not look at it.

A filter measures the form of a message. An agent is judged on its effects.

What does each tool read, and what does its own documentation say?

Four tools come up again and again in enterprise projects. The table does not compare them. For each, it reports what its vendor writes about its scope. The pages were consulted on November 6, 2026 and may change.

ToolWhat it examinesWhat its documentation specifies
Llama GuardThe requests and responses of a conversation, classified against a risk taxonomyPresented as "an LLM-based input-output safeguard model geared towards Human-AI conversation use cases". The taxonomy categories can be adapted to the use.
Llama Prompt Guard 2 (Meta)A single text, classified "benign" or "malicious"It judges the intent to override instructions, "regardless of whether the prompt is potentially harmful or the attack is likely to succeed". 512-token window; beyond that, the card recommends splitting inputs.
NeMo Guardrails (NVIDIA)Five families of programmable rules: input, dialog, retrieval (RAG), execution, outputExecution rails apply to tool inputs and outputs. A configuration with no rails configured "will essentially forward the requests to the LLM".
Prompt Shields (Azure AI Content Safety)User prompt attacks, and document attacks (instructions hidden in a document, an email, a web page)They "don't determine whether content is harmful, factually accurate, grounded in source material, compliant with policy, or aligned with the application's task". For agents, analysis of a tool's return is announced as a preview.

Three lessons come out of these pages. First, each tool announces a precise scope, and the vendors write it themselves. Second, a classification tool does its job only if the application acts on its verdict. Microsoft's documentation says so for the API: it "doesn't itself block or route content", and blocking, excluding a document or escalating to a person "requires application logic". Third, NeMo Guardrails shows that an execution layer already exists in the toolkits. Its strength depends on what the team writes into it.

How guard models work, including the published work on their robustness, is covered in guard models and their limits.

Why an instruction is not a guardrail

The instruction is the first layer everyone writes: "never reveal this", "refuse that". It counts, and the OWASP project lists it as the first measure against prompt injection. But OWASP also writes, in the same entry (LLM01:2025):

Given the stochastic influence at the heart of the way models work, it is unclear if there are fool-proof methods of prevention for prompt injection.

CERT-FR is plainer, in its bulletin of April 13, 2026 on agents on workstations:

While defensive prompt wording can help reduce risks, it can be bypassed through injection attacks.
CERT-FR, CERTFR-2026-ACT-016, April 13, 2026 · our translation

The reason is structural. An instruction and an attack text are two strings of words read by the same model, in the same window. NIST's CAISI describes the starting point: the architecture of current agents combines, in a single input, the developer's trusted instructions and the task's data. An instruction is therefore a request made to the model, not a rule enforced on it. The same bulletin asks that the actions and tools available to agents "must be limited to the strict minimum" (our translation).

Text or action, direct or indirect injection: what each layer sees

Two axes explain most of the blind spots.

One axis sets direct injection against indirect injection. In OWASP's definition, direct injection occurs when a user's input changes the model's behavior; indirect injection occurs when the model accepts data from external sources, such as websites or files. Input filters are designed for the direct case: the text the user types passes in front of them. In the second case, the order arrives in a document the agent has read, a ticket, a page, an attachment. The tools that cover this path do so at specific points of application. Prompt Shields offers document attacks, switched off by default in Foundry and enabled by configuration. NeMo Guardrails offers retrieval rails for passages coming from a RAG. The path exists, but it has to be wired in and tested. The full mechanism is in indirect prompt injection.

The other axis sets text against action. A filter sees a message. It does not see that this message, joined to the previous ones, makes the agent read a file and then send it. ANSSI, France's national cybersecurity agency, sets this as a requirement in its "Les essentiels" of October 30, 2026. It says to

Check that a chain of individually authorized actions does not produce an effect forbidden by business or security rules.
ANSSI, Les essentiels: Sécuriser un système IA agentique, principle 5 · our translation

This check applies to a sequence of actions, not to a sentence. The same mechanism is described in multi-step attacks: no single step is forbidden, the chain is.

The agencies do not, moreover, ask for filters to be given up. The joint guide from six agencies, Careful adoption of agentic AI services, recommends integrating prompt injection filters and semantic analysis, and states that strong input management controls can only "partially mitigate" common risks. The word that matters is "partially".

What do the published bypass evaluations show?

Four published studies, by researchers and by NIST, measure how well these defenses hold against an attacker who adapts. None contains an attack procedure, and none is reproduced here.

  1. January 17, 2025NIST's CAISI publishes its initial experiments in evaluating agent hijacking, with red teamers from the UK AI Security Institute. Against a recent model that had become markedly more resistant to known attacks, the success rate goes from 11% for the most effective baseline attack to 81% for the most effective new attack designed for that model.
  2. April 15, 2025William Hackett and four coauthors (Bypassing LLM Guardrails, arXiv:2504.11168, to be published at LLMSec 2025) test six protection systems, including Azure Prompt Shield and Meta's Prompt Guard. They show that two families of techniques, character injection and adversarial machine learning methods, evade detection while preserving the attack's utility, with up to 100% evasion in some cases. The result holds for the versions tested in 2025.
  3. July 28, 2025Andy Zou and sixteen coauthors (arXiv:2507.20526) run the largest public agent red-teaming competition: 22 agents, 44 scenarios, 1.8 million prompt injection attacks, more than 60,000 policy violations, including unauthorized data access and illicit financial actions. Nearly all agents violate policy on most behaviors within 10 to 100 queries, and robustness correlates little with model size or capability.
  4. October 10, 2025Milad Nasr and thirteen coauthors (The Attacker Moves Second, arXiv:2510.09023) bypass 12 recent defenses against jailbreaks and injections, with an attack success rate above 90% for most. Most of these defenses had originally reported rates near zero.

These four results do not say filters are useless. They say the measurement depends on the attacker: a detection rate obtained against a fixed set of attacks does not predict what an attacker who knows the defense will do. The authors of The Attacker Moves Second write it as an evaluation rule: defenses must be evaluated against adaptive attackers that change their strategy to counter the design of the defense. CAISI states the same lesson: evaluations must be adaptive. Reading a rate advertised by a vendor therefore means asking which attacks it was measured against, and whether they were written with knowledge of the defense.

The study by Zou and his coauthors adds a point for the choice of architecture. Since robustness tracks model size so little, the authors conclude that additional defenses are needed against malicious use. A bigger model is not a security layer.

What a complete defense adds to guardrails

Filters and guard models reduce the frequency of attacks that succeed. They do not bound what a successful attack can do. That bound comes from elsewhere, and the texts describe it with the same four elements.

LayerWhat it seesWhat it does not seeWhat SentinelOS does
InstructionsWhat the model accepts to read as a ruleAn order written in a document of the same formJudges every action before it leaves, whatever the instruction.
Filters and guard modelsThe text that goes in or outThe action that text triggers, and what caused itJudges every action before it leaves, including when the order comes from a document the agent read.
Agent rightsWhat it can touch, if they are limitedA dangerous use of rights that were nonetheless grantedSits between your AI agents and everything they touch.
Human approvalThe action that is held, if it isThe actions never heldWhat matters waits for a person; their decision is written in their name.
EvidenceWhat the log recordsWhat the agent had read before acting, if the log does not keep itWrites every decision in a chained log, never rewritten, with what the agent had read, and signs it with an Ed25519 receipt verifiable offline.

ANSSI makes this the plan of its October 30, 2026 document. It asks, where feasible, for "a deterministic filtering mechanism, independent of the agent, upstream of each tool or resource, with no possibility of bypass or modification by the agent"; for the default to be to refuse the action; for critical actions to go to human approval, keeping that mechanism "out of reach of the agentic system"; and for logs the agent cannot modify, to reconstruct "request → authorization → action → result" (all our translation). In 2025 OWASP recommends the same elements for prompt injection: least privilege, human approval of high-risk actions, segregation of external content, adversarial testing, treating the model as an untrusted user.

Microsoft's documentation already describes this split: the tool detects, the application decides. The action control is the part that decides, and it cannot depend on what the attacker writes. SentinelOS judges every action of your agents before it leaves and signs every decision.

The build order for a team deploying agents

  1. Cut rights before adding a filter. Every tool removed from an agent removes a family of actions that no attack can trigger. It is the cheapest and most durable measure.
  2. Keep the filters, know what they measure. A guard model is a layer of reduction. Ask the vendor which adaptive attacks its rate was measured against, then test yourself with the company's real content, French included: the Prompt Shields documentation states that its models are mainly trained and evaluated on English.
  3. Wire detection in where the order arrives. Documents, emails, web pages, tool returns: if the detection tool has an option for these paths, it is configured and tested, not assumed.
  4. Put the control on the action, outside the model. A deterministic policy at every tool call, which refuses by default, and which judges the chain of actions and not only each step.
  5. Hold for a person what matters. A small number of actions, shown with their cause, so that approval is a decision and not a reflex. See human oversight and automation bias.
  6. Write the evidence. So that the team, the auditor or the authority can reconstruct what the agent read, what was decided and by whom: tamper-evident logs and signed receipts.

Sources

  1. Inan et al., "Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations", arXiv:2312.06674, December 7, 2023. arxiv.org
  2. Meta, "Llama Prompt Guard 2 Model Card", PurpleLlama repository. github.com
  3. NVIDIA, "NeMo Guardrails", repository README. github.com
  4. Microsoft, "Prompt Shields in Azure AI Content Safety", Microsoft Learn. learn.microsoft.com
  5. Hackett et al., "Bypassing LLM Guardrails: An Empirical Analysis of Evasion Attacks against Prompt Injection and Jailbreak Detection Systems", arXiv:2504.11168, April 2025. arxiv.org
  6. Zou et al., "Security Challenges in AI Agent Deployment: Insights from a Large Scale Public Competition", arXiv:2507.20526, July 28, 2025. arxiv.org
  7. Nasr et al., "The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections", arXiv:2510.09023, October 10, 2025. arxiv.org
  8. NIST CAISI, "Technical Blog: Strengthening AI Agent Hijacking Evaluations", January 17, 2025. nist.gov
  9. OWASP GenAI Security Project, "LLM01:2025 Prompt Injection". genai.owasp.org
  10. ANSSI, "Les essentiels : Sécuriser un système IA agentique", V1.0 (10/26), October 30, 2026. messervices.cyber.gouv.fr
  11. CERT-FR, CERTFR-2026-ACT-016, April 13, 2026. cert.cyber.gouv.fr
  12. ACSC, CISA, NSA, Cyber Centre, NCSC-NZ, NCSC-UK, Careful adoption of agentic AI services, May 1, 2026. cyber.gc.ca

Frequently asked questions

What is an AI guardrail?

A guardrail is a mechanism placed around a language model to control what it receives or what it produces. Four layers go by that name: instructions, input and output filters, guard models and action controls. They do not control the same thing.

Is an instruction in the system prompt enough to protect an AI agent?

No. OWASP writes that it is unclear whether fool-proof methods of preventing prompt injection exist, and CERT-FR notes on April 13, 2026 that defensive prompt wording can be bypassed by injection attacks. The reason is structural: an instruction and an attack text are read by the same model, in the same window.

What is the difference between a text filter and an action control?

Input and output filters examine text before or after the model. An action control checks a tool call, its parameters and its destination before it runs. For an agent that sends, changes or deletes, that difference decides everything.