Google's new watchdog catches AI agents stuck in costly loops
Google's Agent Anomaly Detection, in private preview, flags AI agents that waste computing budget: runaway long answers, endless re-summarising and loops with no result. A cheap check screens every session, then Gemini reads the suspicious ones. In Google's own simulated test it caught 76% of abusive sessions, up from 29%, but only for agents built with its ADK toolkit.
Google published the post on December 3. Agent Anomaly Detection is in private preview on the Gemini Enterprise Agent Platform. Its first detector, Token Misuse, looks for three patterns: token spikes (demands for excessively long output), recursive meta-summaries (reworking the agent's last answer again and again) and infinite loops (endless variations with no deliverable).
A cheap statistical pass screens all sessions. Sessions with signs of abuse get a deeper review in which Gemini reads the whole session. It analyses traces and logs from agents built with ADK, runs about two minutes behind the agent, adds no delay and never blocks it. Each finding comes with a severity, a probability score, a plain-language explanation and suggested fixes.
In a seven-hour simulated test across six agents, recall on runaway-token abuse rose from 29% to 76% and precision from 94% to 98%, with no false positives on honest heavy users. Those numbers come from Google's simulated traffic.
Limits: the detector was tuned on legal document-review workflows, so agents that write code or run data pipelines may look different. Google doesn't say when it will reach general availability or what it will cost.
New to this? The key idea
AI services bill by the amount of text the model reads and writes, so an agent stuck in a loop is like a taxi meter running while the car circles the block. Anomaly detection learns what normal looks like and raises a flag when a session drifts far from it, before the bill arrives.
Use it at work
Use it for: Platform and SRE teams running agents in production who want an early warning for runaway spend before the invoice shows it.
Try it: Request private preview access on the Gemini Enterprise Agent Platform. The Token Misuse detector needs ADK 2.1.0 or later and is on by default once set up. For long-running loops, the post suggests an ADK callback that checks for findings through the API and stops the session before its next turn.
Before you roll it out: Preview only, no general availability date, pricing not stated. It reads traces and logs from ADK agents; where that data is processed is not stated. Detection trails the session by about two minutes, so it won't stop the first bad turn.
Summaries are written by AI from the linked source. Always check the original.