trending
Omri Arnon

2mo ago

tokencap - Track token usage and enforce budgets across your AI agents

tokencap tracks token usage and enforces budgets across your AI agents - per agent, per user, or any scope you choose. Two ways to add it: Direct SDK: tokencap.wrap(anthropic.Anthropic(), limit=50_000) Any framework: tokencap.patch(limit=50_000) WARN, DEGRADE, BLOCK, or WEBHOOK when budgets are hit. SQLite out of the box, Redis for multi-agent enforcement. Zero required dependencies. pip install tokencap