Field notes
Google's agent anomaly detector: what the 87% actually measures
David Vinkenroye, Haystack4 min read
Agent Anomaly Detection reads agent traces after the fact and flags goal hijack and tool misuse. It never blocks anything, and the 87% headline figure covers less than it seems to.

Google's Agent Anomaly Detection (AAD) runs on the Gemini Enterprise Agent Platform and is still in Private Preview. It reads an agent's traces and logs asynchronously and learns a baseline for each agent. When a session falls outside that baseline, it sends an AGENT_SESSION_ANOMALY finding to Security Command Center. It adds no latency. It also blocks nothing.
Two posts this month explain it: a benchmark write-up and a hands-on guide. Read together they are fairly candid. The picture they give is smaller than the 87% in the headline.
What the 87% measures
Google ran five outside benchmarks: AgentDojo, InjecAgent, ASB, AgentDyn and AgentHarm. That came to 1,774 sessions, using an ADK agent on gemini-2.5-flash against simulated apps. The 87% is the detection rate only on harmful instructions the agent actually carried out. Across all harmful sessions, AAD flagged 45 to 62%. When the agent resisted a tool-output injection, AAD flagged just 11 to 25%.
Focusing on the attacks that succeeded is a fair choice. Still, the figure I would quote to a customer is 45 to 62%, and I would quote the fine print with it:
- Each agent first ran at least 300 benign sessions. On AgentDyn, detection was 33% at about 220 sessions and 99% at 360.
- About 6% of sessions returned no result at all.
- Memory poisoning: 4 of 18 sessions caught.
- AgentDojo's Slack app scored 63%. A single small action, such as a page visit, looks like normal browsing.
- False positives were 2 to 4% on office tasks. On AgentHarm they were 16%, because its benign tasks run terminal commands and download files.
- There is no benchmark evidence for cascading failures or identity and privilege abuse. Google says so itself.
Detection arrives after the damage
The guide says flagged sessions show up "usually within a few minutes". By then the refund has gone out, or the payroll rows have already come back in the reply.
So before switching AAD on, I would split the agent's tools into two groups. Anything irreversible, such as payments, outbound email or data sharing, goes behind synchronous controls. That means human approval, Model Armor on prompts and tool results, and Semantic Governance Policy (Preview), which denies tool calls that don't fit the user's request. AAD then watches the rest, and it catches the cases nobody wrote a rule for.
Tight tools first, detector second
The demo agent in the guide has a fetch_records(table, customer_id) tool with no table allowlist, so it can reach payroll. AAD flags the session as Tool misuse, High severity, 95% probability. The recommended fix is a table allowlist. That proves AAD can find a bad design. It says nothing about what AAD adds once the tools are already tight.
I would still choose tight limits. Fewer reachable actions give a cleaner baseline, and the 16% false-positive rate on AgentHarm shows the cost of leaving high-impact tools open. With limits in place, AAD's job is to catch the gaps in your rules. As the guide puts it, guardrails "only block what someone thought to write down".
The customer's first questions
In a regulated Swiss customer, the first meeting won't be about detection rates. Setup requires these variables:
GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=true
OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=EVENT_ONLY
They write prompt and response content to Cloud Logging, so expect questions about PII, retention and who can read the logs. A few more constraints:
- The logging bucket and the Observability dataset must be in the US or EU multi-region.
- Agents need ADK 1.2 or later, and 2.0 or later is preferred.
- An agent only appears after it has served traffic.
- Sessions that started before the agent showed as Active are not analysed.
- Findings can differ from run to run.
- It is Private Preview, so behaviour may change.
What I would set up on Monday
- Alert on Detected events (5-minute delta, threshold above 0) only while onboarding. After that, filter to High and Critical and give the alert a named owner in the incident rotation. An alert on every detection gets muted within a week.
- Add a metric-absence policy on Monitored agents, and track the share of no-result sessions so the 6% does not become a silent gap.
- Assume that a redeploy which changes tools or prompts may weaken the baseline. The posts don't confirm this, so keep the synchronous controls strict until the agent has a few hundred fresh sessions.
- Build a small labelled eval. Replay 20 or 30 of your own injection attempts against a staging agent once it has a baseline. Check the final app state with deterministic code, the way the benchmarks did, and record what AAD flags.
That small eval tells you what the 87% cannot: how AAD performs on your own agent, tools and customer data.
Sources
- 1How Agent Anomaly Detection scores on benchmarks we didn't write (opens in a new tab), Google Developers blog
- 2Securing Your Agents: A Hands-On Guide to Agent Anomaly Detection (opens in a new tab), Google Developers blog