Software factory / Start
See what your agents cost
The factory agents of your repository use models, and models cost money. You want to know what each agent costs this month, so you can turn off or limit the costly ones.
4 min read
The Spend section of the Agents tab adds up the cost of the factory runs of the repository, for this month and last month. You need write access to the repository.
1. Open the spend overview
- Open the repository, then Agents.
- In the sidebar, under Overview, click Spend. It is below Runs.
The address is /<owner>/<repo>/agents/spend. Only people with write access see Spend in the sidebar.

2. Read the numbers
The months are UTC months. The section shows:
- This month: the total cost, the number of runs and the tokens.
- Last month: the total cost, in one line, so you can compare.
- A bar chart: the cost of each day of this month.
- A table: one row for each agent, with its runs, tokens and cost this month. The agent that costs the most is first.
The section keeps this month and last month only. To turn off a costly agent, or to give it a cheaper model, see Factory settings.
3. See how close the owner is to the spend cap
The forge pays for some models, up to a monthly spend cap of the owner of the repository. When the owner reaches the cap, new runs on these models are skipped.
If you are an admin of the repository, the Spend section shows one more line:
Forge-paid models this month: $X of $Y
- X is what the forge paid for the models of the owner in this UTC month.
- Y is the monthly spend cap of the owner.
This is the same number as Spent this month in the factory settings. It counts all the repositories of the owner, and the PR chat and the architecture chat. So it can be more than the total of this section.
When X comes near Y, do one of these:
- Raise the cap. See Cap the monthly model spend.
- Add a model key, so that the agents use your own provider account. See Add a model key.
While billing is on for the owner, its plan pays for these models, and the cap of the site does not hold. Then Y is the cap that a site admin gave the account, or the lower cap of an organization. With no such cap, the line shows what billing leaves, and a link to the Billing page of the owner:
Forge-paid models this month: $X. Billing pays for forge-paid AI: $L left this period.
L is what the plan, the credits and the overage leave in this billing period. When L comes near $0, do one of these:
- Buy credits. See Buy credits.
- Turn on overage. See Turn on overage.
- Add a model key. See Add a model key.
See When billing is on.
Done
You see what the agents of your repository cost this month and last month, on which days, and which agent costs the most. As an admin, you also see how close the owner is to the monthly spend cap, or what billing leaves.
Which runs count
- A run counts once, on the UTC day that it ends.
- A run counts when it succeeded, failed or was cancelled.
- A skipped run does not count.
- The PR chat and the architecture chat are not factory runs. They do not count here, but they count toward the monthly spend cap.
What the cost of a run is
The cost is what the run recorded when it ended:
- The cost that the model provider reported for the run.
- If the provider reported no cost, the price of the forge, for a model that the forge pays for. The prices are in What counts.
Note
A run on your own model key costs $0 here when its provider reports no cost. Its tokens still count. For the real cost of these runs, read the bill of your provider.
From src, MCP or REST
The spend overview is on the web only. Your own agent can read the cost and the tokens of each run from the list of runs. See From src, MCP or REST.