Skip to content

Budgets

A budget is a dollar limit on what the team, one person or one agent spends in a UTC day or in a week from Monday 00:00 UTC. GET /v1/budgets lists every budget on your team, each with its scope, as the team, a person’s login or an agent’s name, its period, its limit, when the period started and when it starts again. bin/agentsctl budget list prints each budget in words. POST /v1/budgets sets one and DELETE /v1/budgets/<id> removes one, as bin/agentsctl budget set and budget remove do. An agent sets or lowers a budget with its set_budget tool, as below, and can’t read budgets yet.

While a budget is spent, it holds new turns for the agents it covers. A message, a task, a routine or another agent’s message waits, and its line names the budget, such as “Waiting. scout’s weekly budget of $5.00 is spent. ada or an admin can raise it.” A turn names the agent’s budget first, then the person’s, then the team’s. Raising or removing the budget, or the next period starting, lets the turn go within a few seconds. A routine skips its firings while one is held, so a raise lets one go. A room passes over a held agent for that round. When a person’s or an agent’s budget is spent, the turns it covers that are already running stop, and so do the agent’s helpers, with one notice such as “scout was stopped. scout’s weekly budget of $5.00 is spent. An admin can raise it. Messages it had not read yet wait until then.” Messages the agent had not read yet are kept, each with a line saying it waits on the budget, and run in the order they were sent once it is raised. A team budget only holds new turns and stops nothing already running. Pipeline stages and the ship loop’s fix turns are never held or stopped.

Admins set, raise, lower and remove any budget. The person a budget covers may set one where none is or lower it, and raise or remove it only while no admin has set it. An agent’s budget works the same way for the person whose computer the agent runs on, or else for its owner, and an agent with neither is for admins alone. A budget an admin set stays one only an admin can raise or remove, even after the person lowers it. A refusal names who may, such as “Only an admin can raise scout’s budget, since an admin set it.”

With its set_budget tool an agent makes a budget or lowers one as the person its turn is for, where they may, and asks them before each call. An agent never raises a budget, and the budget keeps the agent’s name beside the person’s.

The Usage page lists every budget under its figures, each with its limit, a bar of what it has spent where you may see that, and Spent once it has reached its limit, with when new turns go again. To set one, ask an agent, such as “set a $5 weekly budget on scout”, and say yes when it asks.

An agent can’t read budgets yet. Its read_budgets tool waits for the isolation work that keeps an agent from posting a forged tool call into another session on its machine, so for now people read budgets on the Usage page or with bin/agentsctl budget list.

Everyone on the team sees every budget and its limit. What a budget has spent shows only to team admins, to the person a person budget covers, and to the owner of the agent an agent budget covers. Everyone else reads the line without it.

A budget sums the team’s spend ledger from the start of its period. The ledger began on the day the change that added it reached the server, and holds nothing from before, so a budget counts only from that day. The dollars are what the tokens would cost at API prices, as on What agents cost. Agents run on a subscription, so this is not a bill.