
tokencap
Track token usage and enforce budgets across your AI agents
What it does
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
Does the same job
all alternatives →- TTTokencap – Token budget enforcement across your AI agentsApr 2026 · github.com · ▲7
I built this after hitting the same wall repeatedly — no good way to enforce token budgets in application code. Provider caps are account-level and tell you what happened, not what is happening. Two ways to add it: # Direct client wrapper client = tokencap.wrap(anthropic.Anthropic(), limit=50_000) # LangChain, CrewAI, AutoGen, etc. tokencap.patch(limit=50_000) Four actions at configurable thresholds: WARN, DEGRADE (transparent model swap), BLOCK, and WEBHOOK. SQLite out of the box, Redis for multi-agent setups. One design decision worth mentioning: tokencap tracks tokens, not dollars. Token…

- AAAgentGuard – Auto-kill AI agents before they burn through your budget2025 · github.com · ▲47
Your AI agent hits an infinite loop and racks up $2000 in API charges overnight. This happens weekly to AI developers. AgentGuard monitors API calls in real-time and automatically kills your process when it hits your budget limit. How it works: Add 2 lines to any AI project: const agentGuard = require('agent-guard'); await agentGuard.init({ limit: 50 }); // $50 budget // Your existing code runs unchanged const response = await openai.chat.completions.create({...}); // AgentGuard tracks costs automatically When your code hits $50 in API costs, AgentGuard stops…
Frugal Tokens – explore costs and usage across coding agents18d ago · demo.frugaltokens.com · ▲37I wanted to share a project I’ve been working on called Frugal Tokens. I originally built it because I was curious to see how much all of my sessions cost and how much cache misses affected that spend. I’d noticed people had widely different spend profiles and wanted to better understand what might contribute to that. As I’ve worked on this, the tool has grown to show more usage patterns across all of your sessions. It shows overall usage, estimated working time and overlapping sessions, and where your spend is coming from across models and cache misses. I also have a few session level…
More dev tools this month
the category →



The first open-source price index for GPU compute
Dev tools · 10d ago · getcomputable.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 2d ago · opentrailpaper.com

Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com
Launched alongside, March 2026
the whole month →

Switch from ChatGPT to Claude with import memory feature
AI · Mar 2026 · claude.com


