AI Agent News/stories/google-adds-token-misuse-detector-to-agent-anomaly-detection.md

Infrastructure

Google adds Token Misuse detector to Agent Anomaly Detection

Google has added a Token Misuse detector to Agent Anomaly Detection, now in Private Preview on the Gemini Enterprise Agent Platform. It flags sessions that waste tokens based on how they behave rather than on how many tokens they use.

Source: developers.googleblog.com/catch-token-misuse-with-agent-anomaly-detection

Agents opened to external users can generate output nobody reads or run without ever stopping, and every token still counts against quota and budget without raising an error. Google says a per-session token cap is a poor fix because it also flags heavy but legitimate work, such as a lawyer drafting a memo over many turns. The company describes three common abuse patterns: token spikes that demand extremely long output, recursive meta-summaries that rework the last answer instead of the source documents, and endless loops of variations that never finish.

The detector works in two stages on traces and logs from ADK agents. A cheap statistical pass screens all sessions, and only those showing early signs of abuse are read in full by an LLM. Analysis runs about two minutes behind the agent, so it adds no latency and does not block execution.

In simulated legal document-review tests across six agents, including 106 runaway-token abuse sessions, recall rose from 29% to 76% and precision rose from 94% to 98%. Google reports no false positives on honest power-user sessions. The company notes it tuned the detector on this workflow and that code-generation or data-pipeline agents may show different token growth. The detector is enabled by default for teams using ADK 2.1.0 or later.

Why it matters if you build agents

Teams can use findings to add targeted guardrails, such as capping single-turn output length or follow-up turns that add no new source documents, instead of a flat session token cap. For long-running loops, an ADK callback can check for findings through the API and stop a session before its next turn. Because detection lags the session by about two minutes, plan for some waste to occur before a finding appears.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe