A lot of the current agent-security market can be summarized as: watch what the agent does, score how unusual it looks, and alert if the score crosses a threshold. This is useful. It's also worth being precise about what it is and isn't, because the two get conflated constantly in vendor pitches — including, if we're not careful, our own.
Behavioral scoring, LLM-as-judge content review, and anomaly detection share a common property: they're probabilistic. They output a confidence, a risk score, a "this looks unusual" flag. Over a large population of events, they're genuinely valuable — they catch the slow drift of an identity's behavior over weeks, they surface the 2am request that doesn't match any normal pattern, they get better as you feed them more labeled data. None of that makes them a guarantee for any single decision.
Where the gap actually bites
The failure mode isn't "the detector is bad." It's that detectors are evaluated — correctly — on aggregate metrics like precision and recall, and any nonzero false-negative rate means some fraction of genuinely bad actions will score as fine. For most actions, that's an acceptable, even excellent, tradeoff. For a small set of actions — deleting a production database, rotating a signing key, wiring money, exfiltrating a customer's data — a false negative isn't a statistic. It's an incident.
A 99.5% detection rate sounds excellent until you remember that "0.5%" is still a number of real, specific, catastrophic events — and you don't get to choose which half-percent of your agent's actions fall into it.
The honest fix: separate the layers, on purpose
The architecture that holds up under scrutiny isn't "better detection everywhere." It's drawing an explicit line between two categories of control, and being honest with customers — and with yourself — about which is which:
- Advisory layers (prompt-injection heuristics, behavioral/ITDR baseline scoring, LLM-based content judges): feed the decision, generate alerts, enrich the audit trail, get continuously retrained. They should never be the thing standing between an agent and a destructive action, because "unsure" from an advisory layer must never silently become "allow."
- Guarantee layers (interface contracts, taint/IFC enforcement, policy and capability scope, step-up approval for destructive actions): deterministic, fail-closed, independent of model output. These don't get a confidence score — they get a yes or a no, defined by policy set in advance, not inferred in the moment.
The test for whether something belongs in the guarantee layer is simple: if this control's answer depends on the output of a machine-learning model making a judgment call, it's advisory, no matter how accurate that model usually is. If the answer depends only on a policy bundle and the facts of the request — is this identity authorized, is this data tainted, does this action require step-up — it can be a guarantee.
Why vendors blur this line, and why it matters that you don't
"Our model catches 99% of attacks" is a better sales line than "here are the specific five categories of action we deterministically prevent, and here's the separate, improving, probabilistic system that handles everything else." The first sentence is also, functionally, a promise that the remaining 1% is someone else's problem the day it happens.
Detection, done well, makes the probabilistic layer better every week. Enforcement, done well, means the one week it's wrong doesn't matter for the actions that count. Both belong in a serious architecture. Only one of them should be called a guarantee.
Keep reading: how indirect prompt injection works and why every AI agent needs an identity.