DEV Community

t49qnsx7qt-kpanks
t49qnsx7qt-kpanks

Posted on

session-level budgets for ai agents

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.

agentbudget caps the session. 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. fiscalgate checks budget before any transaction commits — if the agent tries to pay an invoice that would exceed its monthly cap, the payment fails before it leaves the wallet. merkleaudit logs the denial so auditors can see the cap worked.

session-level caps are table stakes now. if you're deploying agents that spend money (api calls, cloud resources, vendor payments), you need a hard stop before the spending spirals.

the difference between agentbudget and fiscalgate is scope. agentbudget focuses on api costs within a session. fiscalgate focuses on cross-session payment policy — monthly budgets, vendor whitelists, multi-agent reputation (agent fico).

both are necessary. api costs need session caps. payments need policy layers. if you're building agent infrastructure, budget enforcement isn't optional anymore.

Top comments (0)