session-level budgets for ai agents
Dev.to AI
•
Generative AI
Agentbudget is a python sdk that gives each agent session a hard dollar budget with real-time enforcement. it's a clean solve for runaway agent costs. the problem: you spin up an agent to summarize documents, it calls an llm api 14,000 times because of a loop bug, and you wake up to a $3,200 bill. you set a $10 limit, the agent spends $9.87, tries to make another call, and the sdk blocks it. session ends, agent stops, bill stays under $10. mnemopay does this at the payment layer instead of the api layer.