LLM providers give you account-level limits. TokenFence gives you per-workflow limits. Set a dollar cap, pick what happens when it's hit (kill or downgrade model), add two lines of code. Works with OpenAI, Anthropic, and any provider.
I built TokenFence after a coding agent hit a retry loop overnight and kept calling GPT-4o until I noticed the bill.
The problem: there's no native way to say "this workflow should cost no more than $2." Account-level limits exist, but nothing per-agent or per-workflow.
TokenFence wraps your LLM calls with a hard dollar cap. When it's hit, you choose: kill the run or auto-downgrade to a cheaper model to finish within budget. Two lines of code. Works with OpenAI, Anthropic, any provider.
We have ~380 npm installs and ~300 PyPI installs per week — all organic, from developers who found it after getting burned. This is the first time we've told anyone it exists.
Would love honest feedback on:
- Is $49/mo right for teams? Too high, too low?
- What assertion types would make this useful in CI?
- Anyone running this in production?
GitHub: https://github.com/u4ma-kev/toke...
If this solves a real problem for you, an upvote helps us reach more developers dealing with the same thing.
Report
No reviews yetBe the first to leave a review for TokenFence