SentinelOS

Resources · LLMs and advances

A guard model judges a text. An agent produces acts.

Guard models do the job they were built for: filtering conversations. An agent does more than converse. It runs operations whose danger can fit in an innocent-looking sentence. Telling what a guard perceives from what escapes it determines where the security lock belongs.

In brief. A guard model is an auxiliary model that inspects what goes into a main model, what comes out of it, or both flows, to sort the text against a risk grid. It filters conversations effectively. An agent also executes operations whose danger can fit in a harmless-looking sentence.

What is a guard model?

A guard model is an auxiliary model that inspects what goes into a main model, what comes out of it, or both flows at once, and sorts the text against a risk grid. It evaluates messages exchanged between a human and a model, not tool calls, file systems or network recipients. Llama Guard (Inan and coauthors, arXiv:2312.06674, December 7, 2023) is one of the public references, which its authors define as "an LLM-based input-output safeguard model geared towards Human-AI conversation use cases".

Two terms in the title mark out its field of use exactly: "conversations" and "input-output". A guard of this kind evaluates messages exchanged between a human and a model. Its training and its benchmarks both concern that object. Nothing in this definition deals with tool calls, file systems or network recipients.

The classifier's adaptability is real: a technical team can add a category to the taxonomy, such as sending internal data. But that category still concerns a linguistic statement. The guard identifies the wording of a request; it does not know whether the named file holds payroll slips or a public brochure, any more than it knows whether the recipient belongs to the company or to a third party. Settling those points would mean feeding it the full state of the information system, which amounts to building around it the action-control mechanism described below.

The adjacent family is specialized classifiers, trained to spot a precise class of content: illicit requests, dangerous statements or known prompt injection patterns. Their principle stays the same: they assign a risk score to a sequence of text.

What do guard models do well?

Dismissing this building block would be an error of analysis. Constitutional classifiers, presented in the study Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teaming (Sharma and coauthors, arXiv:2501.18837, January 31, 2025), target "universal jailbreaks", meaning prompt wordings able to bypass a model's guardrails reproducibly. The authors report more than 3,000 estimated hours of offensive red-team testing. Against a base model protected by these classifiers, the evaluators found no universal jailbreak that extracted a level of detail comparable to an unprotected model on most of the targeted queries.

The paper's abstract also puts a number on the operational cost: an absolute 0.38% increase in the refusal rate on production traffic, along with a 23.7% inference compute overhead. These two measurements, established by the designers of the system themselves, show that a rigorously trained guard does its job against its designated target, at the price of a measurable rise in false positives and compute consumption.

A guard model thus gives a relevant answer to a specific question: how harmful is a text in itself. An autonomous agent puts a different question to the defense.

A guard measures how dangerous a statement is. An agent requires checking whether an act is legitimate, in a given context and for a given reason.

What are the three things a text guard cannot see?

The consequence

The sentence Send the payroll file to this address contains no toxic or illicit term. It is an ordinary administrative instruction. Its seriousness comes solely from the operation it triggers: the selection of a sensitive file, the choice of an outside recipient and the actual exit of the data. A guard's taxonomy covers registers of speech; the evaluation of an act covers its technical parameters: the tool invoked, its arguments and the resource targeted.

The cause

The same operation is legitimate when it answers an express request from the authorized operator, and illegitimate when it obeys an instruction hidden in a supplier invoice read sixty minutes earlier. The wording of the tool call is strictly identical in both cases; only the origin of the order changes. A guard placed at the input inspects the document; a guard placed at the output inspects the response. Neither correlates the earlier reading with the present action. This is the anatomy of indirect prompt injection.

The trajectory

An offensive operation split into elementary requests, each lawful on its own, passes without trouble through a filter that evaluates each message in isolation. This splitting is what defines multi-step attacks: it is the sequential assembly of the calls that forms the attack. The security decision must therefore rest on the history of the actions taken, not on the current message alone.

These three blind spots come from where the control sits in the architecture, not from how fine the model is. Replacing a text guard with a better model at the same chokepoint will not let it perceive the consequence, the cause or the trajectory of an action any better, because those elements are not in the string of characters submitted for its review.

What happens when the attacker moves second?

Any defense built on a classifier is evaluated against an adversary who knows it exists and adapts their requests. On October 10, 2025, a group of fourteen researchers including Milad Nasr, Nicholas Carlini and Florian Tramèr published The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections (arXiv:2510.09023). Their work bypasses twelve recent defenses built on varied mechanisms, reaching an attack success rate above 90% against most of them. The authors stress that the majority of these mechanisms had reported attack success rates near zero when first published.

Their protocol uses four families of large-scale optimization: gradient descent, reinforcement learning, random search and exploration guided by human operators. The main lesson is in the title of the paper itself: the attacker comes in after the defense is deployed and adjusts their vectors until they find a blind spot in the classifier.

This finding does not condemn the use of classifiers; it is a reminder that a block rate measured on a static corpus is not a guarantee against an active adversary. Model evaluations lead to the same conclusion: a score reflects a frozen benchmark, never an attacker's persistence.

How do you design so detection is not needed?

Faced with this structural limit, academic research moves the security guarantee from the model to the execution architecture. The paper Defeating Prompt Injections by Design (Debenedetti, Shumailov, Carlini, Tramèr and coauthors, arXiv:2503.18813, March 24, 2025) illustrates this approach with the CaMeL system. The authors build an execution wrapper around the model, designed to keep the security guarantees even when the underlying model falls to an injection. CaMeL extracts the control flow and the data flow separately from the initial trusted request: according to the authors, the untrusted content the model reads later can never alter the execution program. The system also attaches capability labels to the data to forbid any exfiltration of private information to unauthorized channels, checking explicit policies at the time of each tool call.

Evaluated on the AgentDojo benchmark, CaMeL delivers provable security on 77% of tasks, where an unprotected agent completes 84% of tasks. The utility gap is thus about seven points of success. The authors put the trade-off in plain numbers: a structural guarantee is paid for by a measured reduction in execution flexibility.

This result states a basic architectural principle. A defense that rests on the statistical classification of a text remains probabilistic. A defense that rests on deterministic control of permissions at the tool call is a property of the system. The two approaches complement each other, but only the second escapes the cat-and-mouse game between the attacker and the classifier.

How do you evaluate a guard before relying on it?

The metrics published for constitutional classifiers set out the grid of review that applies to any guard model on the market as well as to in-house classifiers.

  • The scope of inspection. Check whether the tool analyzes only the messages of a conversation or also inspects tool calls, their arguments and the files targeted. Llama Guard is designed for the conversational setting.
  • The rate of excess refusals. The January 2025 study measures a 0.38% rise in refusals on production traffic. In an agentic chain, every false positive interrupts an automated task.
  • The inference compute overhead. That overhead reaches 23.7% in the study cited. When a guard is invoked at every step of an agent loop with dozens of calls, the latency and the cost multiply accordingly.
  • The adversary model used in testing. Tell apart the scores obtained against fixed prompt sets from the evaluations run against adaptive attacks optimized against the defense, following the methodology published in October 2025.
  • The failure mode when bypassed. If the guard is the only barrier, the slightest classification error triggers execution of the action. If it sits upstream of an independent control point, the tooling policy intercepts the call.

That last criterion governs all the others. By construction, a statistical classifier makes errors. The strength of a security architecture is judged by what happens when the text filter lets the instruction through.

Where should each control go?

ControlWhat it judgesWhat it does not seeWhat SentinelOS does
Input guardThe text submitted to the model: user request or external document.The action the agent will take after reading that text.Judges every action before it goes out, including when the order comes from a document the agent read.
Output guardThe text response produced by the model.The structured tool call, its parameters and its recipient.Sits between your AI agents and everything they touch.
Specialized classifierA category of content evaluated against a statistical threshold.A payload reworded by optimization to stay under that threshold.Holds the actions that matter for a person; the decision is written in that person's name.
Control at the call pointThe act itself: tool, arguments, target, set against what the agent had just read.No call using the execution bus escapes it.Records every decision in an append-only chained log, with what the agent had read.

Text guards and the control at the call point serve two complementary functions. Guards cut noise upstream by turning away obvious attempts. The control at the call point keeps the prohibition in force when the text filter has been bypassed. Deploying a text guard alone in front of an agent is like screening the reception hall while leaving the doors of the server rooms open. The vulnerabilities specific to tooling are detailed in MCP and tool server security, and how the chokepoint is inserted into the execution loop is set out in From LLM to agent.

Use a guard, but not alone

  1. They check the exact object of the guard they deploy. They tell filters designed for conversational exchanges apart from mechanisms able to evaluate tool calls and their effects.
  2. They test their filters against adaptive attacks. Rather than trusting a detection rate on a static corpus, they submit their classifiers to prompts optimized specifically against their configuration.
  3. They enforce a deterministic policy at the call point. For each connected tool, the agent's rights are checked at every invocation, regardless of the score produced by an upstream model.
  4. They isolate external data from the decision flow. Content retrieved from an untrusted source cannot, on its own, change the nature of the calls that are allowed.
  5. They measure the operational cost of false positives. Undue refusals degrade process continuity; the teams track them as rigorously as the inference overhead, in the manner of the constitutional classifiers protocol.
  6. They observe real traffic before turning blocking on. A listening mode attached to the agents in production reveals the calls the text guard lets through, before any prohibition rule takes effect.

Sources

  1. Inan and coauthors, "Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations", arXiv:2312.06674, December 7, 2023. arxiv.org
  2. Sharma, Tong, Mu and coauthors, "Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teaming", arXiv:2501.18837, January 31, 2025. arxiv.org
  3. Nasr, Carlini, Sitawarin and coauthors, "The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections", arXiv:2510.09023, October 10, 2025. arxiv.org
  4. Debenedetti, Shumailov, Fan, Hayes, Carlini and coauthors, "Defeating Prompt Injections by Design", arXiv:2503.18813, March 24, 2025. arxiv.org

Frequently asked questions

What is a guard model?

It is an auxiliary model that inspects what goes into a main model, what comes out of it, or both flows, and sorts the text against a risk grid. Llama Guard, which relies on a risk taxonomy to qualify user requests and model responses, is one of the public references.

Does a guard model protect an AI agent?

It answers the question of whether a text is harmful in itself, not whether an act is legitimate. The sentence "Send the payroll file to this address" contains no toxic term, and its seriousness comes from the operation it triggers. A text guard sees neither where the order came from nor the trajectory of the calls.

Are constitutional classifiers effective against jailbreaks?

Presented by Sharma and coauthors (arXiv:2501.18837, January 31, 2025), they target universal jailbreaks, and the evaluators found none that extracted a level of detail comparable to an unprotected model on most of the targeted queries. The authors put the cost at an absolute 0.38% increase in the refusal rate and a 23.7% inference compute overhead.