TealMonitor v2 addresses OWASP ASI-06 (Excessive Resource Consumption) — the risk that AI agents consume unbounded compute, token, or API resources through runaway loops, prompt injection, or misconfiguration.
Installation
Quick Start
Class Signature
Cost Limits
Governance-owned limits enforced below the application layer:Reasoning-Token Budgets
For models with hidden reasoning tokens (o1, o3), enforce budgets on reasoning compute:Cost Anomaly Detection
TealMonitor v2 builds a spending baseline and detects anomalies in real-time:Anomaly Dimensions
Per-Agent Attribution
Track costs per agent with team/department grouping:Recording Actual Costs
After a request completes, record the actual cost for accurate tracking:CostDecision
Integration with TealEngine
Related Documentation
- TealEngine v1.3 — Engine integration
- TealTemporal — Rate limiting complements cost limits
- TealDrift — Cost velocity as drift signal
- TealReliability — Retry budgets prevent cost explosion

