Google has introduced a Token Misuse detector as part of its Agent Anomaly Detection suite, now available in Private Preview for the Gemini Enterprise Agent Platform. Designed to combat excessive token consumption that impacts budget and quota, the tool shifts away from simple token caps, which often penalize legitimate power users like attorneys or researchers, in favor of behavioral analysis.
According to the Google Open Source Blog, the detector employs a two-stage pipeline to distinguish between abusive sessions—such as endless loops or redundant output—and heavy, high-value work. A statistical first pass screens traffic for escalation patterns, followed by a deeper LLM-based evaluation that reviews session context. This background process operates with approximately two minutes of latency, ensuring no performance impact on active user sessions.
Token Misuse Detector Performance Metrics
Google conducted a seven-hour A/B test using 106 simulated runaway-token sessions to benchmark efficacy against previous detection methods.
| Metric | Baseline Detectors | With Token Misuse Detector |
|---|---|---|
| Recall (Runaway Abuse) | 29% | 76% |
| Precision | 94% | 98% |
| False Positives (Power Users) | High | 0% |
When a session is flagged, the platform provides a severity rating, a probability score, and a plain-language explanation of the behavior. Instead of hard token caps, Google recommends implementing guardrails such as limiting single-turn output length or restricting follow-up turns that lack new source material.
The feature is currently available for teams utilizing ADK 2.1.0 or later. Developers can integrate an ADK callback to query the detection API in real-time, allowing systems to terminate runaway sessions before further tokens are processed.