TL;DR
- Agent Anomaly Detection in Private Preview on Gemini Enterprise Agent Platform flags 87% of executed goal-hijack attacks across four public benchmarks, but only 4 of 18 poisoned-memory attacks
- The underlying model itself resisted about half the harmful instructions; Agent Anomaly Detection caught most of what executed, with false-alarm rates of 2–16% depending on the agent's tools
- Detection works by reading agent traces and logs asynchronously without latency, strongest on direct prompt injection and tool misuse, weakest on instructions planted in long-term memory
- Tested benchmarks
- 5 public agent-security
- Detection rate
- 87%
- False alarm rate
- 2–16% on benign sessions
What happened
Google announced Agent Anomaly Detection in Private Preview on the Gemini Enterprise Agent Platform in September 2026. The tool reads agent traces and logs asynchronously without adding latency and flags sessions where an agent acts outside its intended boundaries. To test the feature, Google ran it against five published, non-Google-written agent-security benchmarks: AgentDojo (NeurIPS 2024), InjecAgent (ACL 2024 Findings), Agent Security Bench (ICLR 2025), AgentDyn (2026), and AgentHarm (ICLR 2025). Agent Anomaly Detection had not been trained on or tuned for these benchmarks.
How the test worked
Each benchmark case ran through an agent built with the Agent Development Kit using gemini-2.5-flash on the benchmark's simulated apps. The agent sent its traces and logs to Agent Anomaly Detection as a production agent would. The benchmark's own Python check then read the final state of the apps—such as whether money left an account—and labeled the outcome. Since deterministic code decides the label, not a model, injected instructions cannot mislead the grader and Agent Anomaly Detection cannot cheat the benchmark. Each agent first completed at least 300 benign sessions so Agent Anomaly Detection could learn its normal behavior.
The researchers scored 1,774 sessions total. They tracked whether harmful instructions were never read by the agent, resisted by the agent despite being read, or carried out. In four benchmarks, the harmful instruction hides in data a tool returns (indirect prompt injection). In AgentHarm, the user sends the harmful request directly.
What Agent Anomaly Detection caught
When the agent executed a harmful instruction, Agent Anomaly Detection flagged 87% of them. Across benchmarks, the detection rate on carried-out attacks ranged from 81% on AgentHarm to 99% on AgentDyn. By benchmark: 85% on AgentDojo, 87% on InjecAgent. Detection held steady across individual apps; in 8 of 11 apps, it flagged at least 95% of executed harmful instructions. The worst performer was AgentDojo's Slack app at 63%, where many harmful instructions asked for single small actions like a page visit that resemble normal browsing.
Agent Anomaly Detection also flagged many refused requests. When the agent rejected a harmful instruction that the user sent directly (as in AgentHarm), the tool flagged 55% of those sessions because the harmful request sat in the user's message which it reads. When the agent refused an instruction hidden in tool output, it flagged only 11% to 25%, because the instruction was deep inside a tool result.
Where detection fell short
False alarms occurred on ordinary office work at rates of 2% to 4% on the three injection benchmarks. On AgentHarm, the rate was 16%. The benign tasks in AgentHarm are similar to the harmful ones—both post to social media, run terminal commands, and download files—so high-impact tools in normal use resembled misuse more closely.
Detection weakened in five areas. Agent Anomaly Detection flagged only 11% to 25% of instructions the agent resisted, since resisted instructions change little in behavior. It missed more single small actions like page visits. It raised more false alarms for agents whose everyday work uses high-impact tools. For new agents, some detection methods need several hundred sessions of history; on AgentDyn with about 220 benign sessions it flagged 33% of carried-out attacks, improving to 99% with 360 sessions. Poisoned memory was the clearest gap: the tool caught only 4 of 18 sessions where harmful instructions planted in the agent's long-term memory caused the agent to act.
Roadmap and limitations
Google is working on detecting refused attempts at lower severity to show probing attempts, catching small actions that reach untrusted destinations, distinguishing normal use of high-impact tools from misuse, faster coverage for new agents, and more reliable detection of poisoned-memory attacks. The study used one agent model and simulated apps. The benchmarks' benign tasks are likely simpler than production traffic, so real-world false-alarm rates may differ. Agent Anomaly Detection returned no result for about 6% of sessions sent; counting those as misses lowers reported rates by 1 to 2 percentage points.
Recommendations for securing agents
Google recommends defense in depth: use controls to stop harmful actions before they run, and Agent Anomaly Detection to find what gets through. Protect agents by sending complete telemetry through ADK tracing and logging, screening untrusted content with prompt-injection filters, blocking risky tool calls with Semantic Governance Policy (in Preview), and requiring approval for high-impact actions like payments, outbound email, and data sharing. Limit each agent to only the tools and permissions its task needs. Use Security Command Center to review and triage anomalous sessions, routing Critical and High findings to incident teams. Agent Anomaly Detection does not block actions; it reports them for post-execution review.
Source
Google Developers Bloghttps://developers.googleblog.com/how-agent-anomaly-detection-scores-on-benchmarks-we-didnt-write/AI-assisted, verified against the source. This post was drafted with AI from the primary source linked above and checked automatically against it. For anything you depend on, read the original.
- #agentsecurity
- #promptinjection
- #aisafety
- #anomalydetection
- #agentdevelopment
