Settings

Theme

I kept getting surprise API bills from my agents

agentbudget.dev

5 points by sahiljagtapyc 16 days ago · 1 comment

Reader

sahiljagtapycOP 16 days ago

AgentBudget — I got a $32 surprise bill from a runaway AI agent, so I built a real-time kill switch

A few weeks ago I left an AI agent running, walked away for 20 minutes, and came back to a bill I didn't expect. I searched for a tool that could just stop the agent when it hit a dollar limit. Nothing existed. So I built AgentBudget. It monkey-patches the OpenAI and Anthropic SDKs, tracks running cost per API call, and throws a BudgetExceeded exception the moment the agent crosses its limit. Under 2ms overhead. One import, one line. from agentbudget import BudgetManager budget = BudgetManager(max_cost="$5.00") That's it. Works with OpenAI, Anthropic, Gemini, Mistral, Cohere, LangChain, and CrewAI. Would love feedback from people building agents in production — especially around what the cloud dashboard should look like.

GitHub: github.com/sahiljagtap08/agentbudget

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection