Set a cost budget and read every run's usage
Set a cost budget on a Borago Board project, read the tokens, cache reads, model, time and estimated cost of every run, and see the queue pause at the limit.
Borago Board runs every task on your own API key, so the provider bills you directly. The board records what each run used and estimates what it cost, and a cost budget stops the queue before a project spends more than you meant. This tutorial sets a small budget, runs two tasks, reads their usage, and watches the queue pause at the limit.
You will build
A project with a budget, two tasks whose usage you can read line by line, and a queue that pauses at the limit.
You need
- The desktop app with a project on a hosted provider, see Choosing an AI provider. A self-hosted model costs nothing per run and has no budget.
Steps
1. Set the budget
Press Edit project and open the AI Auth tab. On the card of the provider the project uses, find Cost budget (USD, this machine). It shows No limit when empty. Type a small amount, such as 1, and press Save changes.
What happens. The budget belongs to one provider on one project on this computer. Each provider has its own, because each bills separately. It never syncs, so another computer running the project keeps its own budget and spend. Blank or 0 means no limit. Changing the amount resets the spend for that provider. Saving the same amount again does not.
2. Run two tasks
Press Add task in Planning and add two small tasks, one at a time:
List the ten largest files in this repository, excluding the .git folder,
with their sizes, and say in one sentence what each one is for.
Read the README and list any setup step it describes that no longer matches
the repository. Do not change any files.
Drag both cards to To Do. The queue runs them one after the other.
3. Read a task's usage
Open the first finished task and find Token usage above the comments. The collapsed line shows tokens in and out, the estimated cost, the number of runs and the total run time. Press it to expand.
What happens. The expanded block shows Total run time, then the cache totals, read and created, then one line per run with its date and time, tokens in and out, cache reads, cost, duration and the model that served it. The model is the one the provider reported, not the one the picker asked for. The last 50 runs are listed, and the totals cover every run.
4. Read the history line
Expand History in the same task. Each run adds a line starting with Tokens.
What happens. That line adds the web searches and page fetches the provider reported. Searches on Claude, OpenAI and Gemini carry their own charge and are included in the estimate. Fetches cost tokens only.
5. See the project's spend
Close the task. A dollar figure sits in the top bar with the project controls. Press it to open Cost and budget, followed by the project's name.
What happens. Total is what every recorded run has cost on every device, closed tasks included, broken down by service and model. Budget is this machine's spend against each provider's budget. Only the Budget figures can pause the queue. Chat turns, task reviews and flows count towards the spend too.
6. Watch the queue pause
Keep adding small tasks until the spend reaches the budget. Changing the budget now would set the spend back to zero.
What happens. Before starting a task, the queue checks the budget of that task's provider. When it has been reached, the task stays in To Do and the queue starts nothing more. The To Do column shows Auto-run paused - cost budget with a sentence naming the provider, the budget and the spend so far. A notification is raised once, and the top bar figure turns red. There is no Resume button for this hold. You can still start a task yourself with Run with and the provider's name in its dialog, since the budget gates only the queue.
7. Let the queue go on
Press Edit project and open AI Auth. Under the budget, the card reads Spent with the amount against the budget, beside Reset spend. Press Reset spend.
What happens. The spend goes back to zero and the queue starts again at once. Typing a higher budget and saving also sets the spend to zero, and the queue then starts the next time something wakes it, such as a card moved to To Do. Nothing resets on its own, so waiting does not lift this hold.
Check it worked
Both tasks show a cost and a model in Token usage, and the pause cleared after the reset.
Read the estimate as an estimate
The cost is worked out from the provider's published list price for the model that served the run, counting input, output, cache reads, cache writes and metered searches. The provider's invoice is the truth. Compare it with the price pages of Anthropic, OpenAI, Google and xAI.
Three ways to spend less
- A cheaper model for small tasks. In the task form, set Model override to a cheaper model of the same provider, instead of Inherit - project default. AI service beside it can move one task to another provider.
- Size tasks for the model. There is no session resume. Every task starts from nothing and pays to read the code again, so ten small tasks pay that ten times, while a failed run is thrown away and run again from the start. The chat sizes its proposals with both in mind.
- A self-hosted model. A run on your own hardware has no price, only time. See Run tasks on a local model with Ollama.
Related: Cost and usage, The queue and its holds, Choosing an AI provider, Plan a feature with chat, then run the cards