
- Reading
- 6 min
- Tables
- 1
The Agent Anomaly Detection tool analyzes session behavior to distinguish users abusing the agent from power users doing honest heavy work, without relying on a fixed token limit.
Google announced on Thursday (the 3rd) the Token Misuse detector within Agent Anomaly Detection, a tool that analyzes agent session behavior to separate token waste from legitimate, intensive work.
Every token an AI agent generates goes on the bill, even the ones nobody reads. When an agent is opened up to external users, it's only a matter of time before someone tests its limits: asking for a report that's impossible to read, keeping the agent spinning in a loop, or reusing its own previous response as input for the next one. None of this triggers an error, so these sessions show up as normal traffic on the dashboard.
To separate this waste from the honest, heavy work that an agent's best users do, Google announced on Thursday (the 3rd) the Token Misuse detector, a new component of Agent Anomaly Detection. The tool entered Private Preview on the Gemini Enterprise Agent Platform, according to a post signed by Kevin Islas, senior software engineer at the company, on the Google Developers Blog.
Why a token limit doesn't solve it
The most obvious way to contain token spending is a cap per user or per session. The problem, according to the post, is that this cap also punishes those who are doing things right. A lawyer drafting a complex memo across several turns can consume as many tokens as someone deliberately abusing the agent. The same goes for a team running due diligence on a large stack of documents.
Expert views
What people are saying about it.
Using OpenCode, I built an open-source Chrome extension that shows how many tokens a selected piece of text will consume across different AI models.
Back in Las Vegas, I'm following an AI agenda that spreads across AWS programming and gatherings around the city. On a short trip, making the most of this concentration of people requires knowing which questions to bring.
The difference isn't in how much the agent wrote, but in why. That's the post's central argument:
A token count tells you how much the agent wrote, not how useful or impactful the output was.
Kevin Islas, Senior Software Engineer at Google
Instead of counting tokens, the detector analyzes how the session behaves: whether it has a real goal, whether each turn returns to the original source, and whether it ends when the deliverable is ready.
The three abuse patterns
Google's team mapped three recurring behaviors in the abusive sessions analyzed:
- Token spike: the user requests an output larger than anyone could possibly read, such as a prompt asking for a document of more than 30,000 words with no summary or abbreviation.
- Recursive meta-summarization: each turn reprocesses the agent's own last response instead of going back to the source material, endlessly alternating between summarizing and expanding the same content.
- Infinite loop: the user asks for variation after variation and never lets the agent finish. There's no deliverable, just more text generation.
An honest power user session is different: it has a plan, returns to the sources on every turn, and wraps up once the work is done. That's exactly the distinction a fixed token limit fails to capture.
How the two-stage pipeline works
Running a language model over every session to detect waste would consume tokens of its own, which would cancel out the gain. That's why the Token Misuse detector analyzes traces and logs from the Agent Development Kit (ADK) in two stages.
The first is a cheap statistical filter that runs over all traffic; one of its checks, token usage escalation, observes how the count grows across calls to the model. Sessions showing signs of abuse advance to the second stage, where Gemini reads the entire session and decides whether it's abuse or legitimate heavy work.
All of this processing runs in the background, about two minutes behind the agent's execution, according to Google. That means the detector doesn't add latency or block real-time execution; it reacts after the fact.
When a session is flagged, the result includes severity, an estimated probability, a plain-language explanation, and remediation recommendations. In the example cited in the post, the detector identified a user making a legal-review agent reprocess its own responses in a loop, and recommended blocking recursive meta-operations and limiting follow-up turns that don't bring new material.
What the A/B test showed
Google tested the detector on simulated legal document review sessions, split into three levels: everyday use, power-user heavy work, and abuse. According to the post, including power-user sessions in the test was decisive: without them, a simple token threshold would seem to work well, because the abusive sessions would simply be the ones with more tokens. With real traffic, that same threshold would end up flagging the best customers too.
The test ran for seven hours across six simulated agents, including 106 abuse sessions with runaway token use ("runaway-token"). Comparing the existing detectors alone against the pipeline with the Token Misuse detector enabled, the results were:
| Metric | Without the detector | With the detector |
|---|---|---|
| Recall on token abuse | 29% | 76% |
| Precision | 94% | 98% |
| False positives on power users | - | zero |
Precision and recall across the other five anomaly scenarios already covered by Agent Anomaly Detection remained stable. Google also notes that the detector was tuned and tested on a document review workflow: token growth in a code-generation agent or a data pipeline has a different profile, and behavior may vary.
What changes for those building agents
For those who build agents with the ADK and expose them to external users, the Token Misuse detector tackles a problem most people solve today with a workaround: a fixed max_tokens per session, which inevitably ends up throttling the wrong user at some point. Replacing that limit with a behavioral signal, read after the fact, is a real change in approach, not just one more metric on the dashboard.
The trade-off is the roughly two-minute window between the session happening and the finding arriving. For an infinite loop that never ends on its own, that's enough: the post recommends using an ADK callback to check findings via API and stop the session before the next turn. For a token spike that already happened in a single giant turn, the detector is more useful for auditing and adjusting guardrails than for real-time blocking.
It's worth noting the feature's maturity limits: it's in Private Preview, requires the Gemini Enterprise Agent Platform with ADK version 2.1.0 or higher, and was validated specifically on a legal document review workflow. Those running code-generation agents or data pipelines, where the token growth pattern is different, don't yet have equivalent evidence that the same precision holds.
How to get started
The Token Misuse detector comes enabled by default within Agent Anomaly Detection for those who already have access to the Private Preview on the Gemini Enterprise Agent Platform. The official documentation covers the prerequisites, the process for getting preview access, and the one-click configuration.
Google's own recommendation, upon receiving the first findings, is not to go back to a fixed token cap per session. Instead, apply the specific suggestions the detector generates, such as limiting output size in a single turn or cutting follow-up turns that don't bring a new source document.
Translated from the Brazilian Portuguese original · Read the original
Molmo 3 arrives with native 3D understanding for open vision models
Ai2 released Molmo 3 on December 3, 2026, an open-weight vision-language model that estimates distance, surface orientation, and points to objects in 3D. For those building agents and multimodal RAG systems, this means spatial understanding without relying on a closed API.






