iamapsrajput/agent-budget-protocol — explained in plain English
Analysis updated 2026-05-18
Read the RFC to design a per run spending cap for an internal AI agent platform.
Give feedback on the open questions before the protocol is finalized.
Plan a LiteLLM pre call hook that reserves and true ups cost per agent run.
Compare this run scoped approach against existing per user or per month budget limits.
| iamapsrajput/agent-budget-protocol | 0xkinno/neuralvault | 0xlocker/d17-contracts | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | — | TypeScript | Solidity |
| Setup difficulty | moderate | hard | hard |
| Complexity | 3/5 | 4/5 | 5/5 |
| Audience | ops devops | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
This is a design document, not runnable code yet, so there is no install step.
Agent Budget Protocol is a draft proposal, not a finished tool you can install and run today. It describes a plan for how to stop AI agents from accidentally spending huge amounts of money on API calls, and it is currently open for public feedback rather than a released piece of software. The problem it addresses is specific. AI agents often work in loops, and each step in that loop resends everything that came before it, so the amount charged per call keeps growing faster the longer the agent runs. Most services that control API spending track budgets by account, by user, or by a whole month at a time. That means a single AI agent that goes wrong and keeps running on its own could burn through an entire month's allowed spending in about an hour, long before any of those existing limits would notice and step in. The author argues that the right unit to control is a single agent run, and says no common service currently enforces a spending limit at that level. The proposal describes a budget system that would sit between an agent and the AI provider it calls. Before each request goes out, it would set aside the estimated cost, send the request, then true up the reservation once the real cost is known and release anything left over. This would let a limit be attached to one specific run, not just to a user or an account. If a model's price is not known in advance, the plan is to block the call rather than let it through for free. The system would also return machine readable information so an agent could automatically switch to a cheaper model when its budget is running low, instead of simply failing. This project does not compete with LLM routing tools like LiteLLM, OpenRouter, or Portkey. It grew out of the author's earlier project, an LLM router called ModelMuxer, and the first planned real implementation is a hook that plugs into LiteLLM. The whole proposal is released under the Apache 2.0 license so any gateway or framework can build it without restriction.
A draft proposal for a system that enforces spending limits on a single AI agent run, instead of only on a monthly account or user budget.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.