How to track and control the cost of AI agents across teams
Tag every agent’s requests with its team so spend can be allocated, measure cost per task, and set limits that stop spending, not only alerts.
By Sycamore.
Key takeaways
- AI agents cost more and vary more from run to run than chat, because one task can trigger many model and tool calls, and a loop can multiply them.
- To allocate agent spend, give each agent its own key, project or workspace and attach the agent and owning team to every request, so the bill can be split without guesswork.
- Measure cost per task or per successful outcome as a distribution, alongside total spend, so a prompt or model change that doubles cost shows up the day it ships.
- Many cloud budgets only send alerts. Stopping a runaway agent takes a hard limit at the provider, a budget in a gateway in front of the models, or a cap on steps and spend inside each run.
- Make an agent’s budget part of its approval, with a named owner who answers for it, and review it when the agent’s scope, prompt or model changes.
To track and control the cost of AI agents across teams, give each agent its own key, project or workspace, and attach the agent and its owning team to every model request so spend can be allocated. Measure cost per task or per successful outcome, not only the monthly total. Then put limits where they actually stop spending, such as provider hard limits, budgets in a gateway in front of the models, and caps on the steps and spend of each run, because many cloud budgets only send alerts.
Why do AI agents cost more, and less predictably, than chat?
An agent turns one request into many model and tool calls, and the number varies from run to run. In Anthropic’s data, “agents typically use about 4× more tokens than chat interactions, and multi-agent systems use about 15× more tokens than chats.”1 Anthropic’s guidance on building agents makes the same trade explicit: agentic systems “often trade latency and cost for better task performance,” and their autonomy “means higher costs, and the potential for compounding errors.”2
The cost also has a failure mode that chat does not. The OWASP Top 10 for Agentic Applications describes “loop amplification,” where a planner “repeatedly calls costly APIs, causing DoS or bill spikes.”3 The Five Eyes guidance on agentic AI describes a related case, where an orchestration flaw makes agents “repeatedly replan and hand off ambiguous subtasks, increasing tool calls and message traffic until system resources are strained.”4 OWASP’s LLM Top 10 names the financial version of this risk “Denial of Wallet.”5
So agent costs need two kinds of control: allocation, so you know who is spending, and limits, so a single run cannot spend without bound.
How do you attribute agent spend to the team that caused it?
Attribution starts with identity. If several agents share one API key or cloud project with no tags or labels, the provider’s bill cannot tell them apart, and no later analysis can fully recover the split. The FinOps Foundation notes that it is “hard to trace which application, feature, or agent consumed model output” and that there is “no accepted method for multi-agent workloads.”6 The practical answer is to make attribution part of how agents are set up:
- Give each agent its own credential. One agent, one key or identity, separate for each environment. This is the same rule that makes agents auditable and revocable; see how to give AI agents identities and permissions.
- Group agents by team in the provider’s own structure. Anthropic’s API, for example, offers workspaces “to separate different projects, environments, or teams while maintaining centralized billing and administration.”7 Microsoft Foundry supports project-level chargeback, in preview, so spend can be allocated “back to the business unit, team, or workload that incurred it.” It covers models sold by Azure, including Azure OpenAI, and not models served through Azure Marketplace or Claude models.8
- Tag requests, or the resources they run through, where the platform supports it. On Amazon Bedrock you can attach tags to an application inference profile “to track costs when you submit on-demand model invocation requests.”9 On Google Cloud’s Vertex AI, now called Gemini Enterprise Agent Platform,10 request labels flow to billing so you can “break down your usage and billed charges by label.” They do so only for pay-as-you-go requests, and Provisioned Throughput requests ignore them.11
- Keep a register that maps each key, project and tag to an agent and an owner. Without it, a tag is a string nobody can act on. The register is the same one you need for governance; see how to find and inventory every AI agent in your company.
The FinOps Foundation also advises reporting through showback first, showing teams “their AI costs, broken down by project and workload, before charging them back.”6
What should you measure besides total spend?
Measure cost per unit of useful work, and watch how it moves. The FinOps Framework lists cost per token, total cost divided by tokens used, as a KPI.12 For agents that unit is too low-level on its own, because one task can take a single call or dozens. The FinOps Foundation recommends tracking “cost per inference, per user, and per successful outcome for each use case,” and reporting them “as distributions, since AI costs vary from run to run.”6
In practice, track these for each agent:
- Cost per task and per successful task, with the median and the high tail. A rising tail often means retries or loops.
- Tokens per minute at the application level. The FinOps Foundation advises monitoring this, “not only daily spend.”6 A per-minute view shows a runaway loop sooner than a daily total.
- Changes that move cost. The same guidance lists “agent loops, prompt changes that double token use, and model switches that change price” as things to watch for.6 Record each prompt, tool and model change against the agent so a cost jump can be traced to the change that caused it.
Which limits actually stop an agent from spending?
Many budget tools only alert. Check each control you rely on and know whether it stops spending, slows it, or only tells someone.
| Control | What it does when the limit is reached |
|---|---|
| Azure Cost Management budget | Sends notifications. “Resources aren’t affected, and your consumption isn’t stopped.” Budgets are evaluated every 24 hours.13 |
| Google Cloud alerts-only budget | Sends alerts. It “doesn’t automatically cap” usage or spending.14 |
| Google Cloud spend cap budget | Pauses new usage of one eligible service, such as the Gemini API or Gemini Enterprise Agent Platform, in one project for the rest of the budget period. Enforcement “isn’t instant,” and overages are billed.10 |
| OpenAI API spend alert | Notifies only. “Spend alerts do not enforce a cap.”15 |
| OpenAI API hard limit (organization, project), when turned on | Affected requests return a 429 error. Enforcement is not instantaneous.15 |
| Anthropic API workspace spend limit | Caps the workspace’s monthly spend; further requests return an HTTP 400 error.716 |
| Budget in a model gateway | Blocks requests from a key, user, team or agent session once its budget is spent, if the gateway enforces it.17 |
| Cap per run or session | OWASP recommends usage ceilings (cost, rate or token budgets) that revoke or throttle access when exceeded.3 In LiteLLM, per-session iteration and budget caps return a 429 once reached, for agent calls that carry a trace ID.17 |
Three points follow from the table.
Provider limits stop spending, but not instantly. Both OpenAI and Google say enforcement lags, so spend can run past the limit.1510 Set the hard limit with that margin in mind. Anthropic does not allow a spend limit on the Default Workspace, so do not run production agents there.7
A gateway gives you one place to set budgets across providers. If agents call models through a gateway, it can hold a budget per agent or team regardless of which provider serves the request. LiteLLM, an open-source gateway, documents personal, team, team member and agent budgets, including per-session caps on iterations and spend for agents.17 Check how your gateway enforces them: LiteLLM’s budgets are enforced against spend recorded in its database, so they do not apply in a deployment without one.17
Per-run caps contain the loop that causes the bill. OWASP recommends “Adaptive Tool Budgeting,” with “usage ceilings (cost, rate, or token budgets) with automatic revocation or throttling when exceeded,” and “quotas, progress caps, circuit breakers between planner and executor” to limit cascading failures.3 Its LLM Top 10 adds rate limits and quotas per caller, and monitoring for unusual consumption.5 The Five Eyes guidance recommends rate limits to “interrupt long-running tasks.”4 A run that hits its cap should stop and report, not retry.
How do you lower the cost of an agent without lowering quality?
Start with the levers that do not change the agent’s output.
- Prompt caching. Agents resend the same instructions, tool definitions and context on every step, and providers charge less for input they have cached. On Anthropic’s API, cache reads cost 0.1 times the base input price for most models, and less on some newer ones, while writing to the cache costs 1.25 times the base price for a five-minute cache.18 OpenAI discounts reused input “up to 95%,” and for GPT-5.6 and later models charges 1.25 times the standard input rate to write to the cache for the default 30-minute lifetime, or 2.5 times for the 12-hour option.19 Caching saves money when the same prefix is reused within the cache lifetime, so put stable content first in the prompt.
- Batch processing for work that can wait. OpenAI’s Batch API offers a “50% cost discount compared to synchronous APIs,” with each batch completed within a 24-hour window.20 Anthropic’s Message Batches API also offers a 50 percent discount, and Anthropic says the batch and caching discounts can stack.21 Overnight reconciliations, document backlogs and evaluations are good candidates.
- Model choice, tested on your own tasks. A smaller model can cut cost per call, but compare models on cost per successful outcome with the same evaluation set before switching. Retries and extra steps can cancel the saving.
Then look at the agent’s design. Cut context it does not use, stop it from calling tools whose results it ignores, and end runs that make no progress. The per-task metrics above show where the spend goes.
Who should own AI agent costs?
The agent’s owner should, with a budget agreed when the agent is approved. The FinOps Foundation recommends that organizations “set approved model lists, quotas, rate limits, and budget thresholds, and require review before deploying autonomous agents.”6 That fits the approval step most governance programs already have: the reviewer who approves an agent’s use case also approves its expected cost per task, its hard limit and the team it is charged to. See how to govern AI agents in production for the rest of that process.
Platform and FinOps teams own the plumbing: keys and projects per agent, tags, gateways, dashboards and default limits. Each agent’s owner answers for its spend, reviews it with the cost-per-task trend, and asks for a new review when the agent’s scope, prompt or model changes.
Where Sycamore fits
Sycamore Govern brings cost into the same control plane as approval and runtime policy. It monitors live agent requests, model and tool use, latency, tokens and spend, and lets teams set budgets and rate limits, route work efficiently, and block or pause behavior outside policy. Budgets, models and operating boundaries approved at intake become runtime policy. People can ask Govern where spend is rising, and it answers from role-appropriate evidence and links to the underlying record. Teams can start with cost management on its own and add registry, runtime controls or audit evidence later.
Frequently asked questions
Should we charge AI agent costs back to teams straight away?
Usually not at first. Showing each team its agent costs, broken down by project and workload, builds trust in the numbers before money moves between budgets. Move to chargeback once allocation covers most of the spend and teams agree the split is fair. Until then, keep the unallocated share visible so it shrinks over time instead of being spread across everyone.
How do we split the cost of an agent that several teams use?
Record the calling team on each request, in a tag, label or metadata field, and allocate by usage. Where that is not possible, agree a fixed split for the shared agent and revisit it each quarter. Keep the shared agent’s own spend visible as a line item, so its owner still sees the total and can act on it.
What budget should a new agent start with?
There is no standard figure. Run the agent in a pilot, record cost per task across real cases, and set the hard limit above the highest cost you saw so normal work is not blocked. Set alerts well below that limit. Revisit both once the agent has a few weeks of production history, and whenever its prompt, tools or model change.
How do we control the cost of agents that run inside a vendor’s platform?
Use the controls the vendor offers, and ask about them in the purchase review. Ask whether spend can be split by agent or team, whether limits stop usage or only alert, and how quickly they take effect. Where the vendor charges per seat or license rather than per use, the contract sets the limit, so track adoption instead. Either way, record the agent and its owner in your register so its cost appears next to the agents you build.
Sources
-
Anthropic, “How we built our multi-agent research system”, https://www.anthropic.com/engineering/multi-agent-research-system
-
Anthropic, “Building effective AI agents”, https://www.anthropic.com/engineering/building-effective-agents
-
OWASP GenAI Security Project, “OWASP Top 10 for Agentic Applications for 2026” (ASI02 Tool Misuse and Exploitation; ASI08 Cascading Failures), https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/
-
ASD’s ACSC, CISA, NSA, Canadian Centre for Cyber Security, NCSC-NZ and NCSC-UK, “Careful adoption of agentic AI services” (2026), https://www.ncsc.govt.nz/assets/guidance/Documents/Careful-adoption-of-agentic-AI-services_FINAL.pdf
-
OWASP GenAI Security Project, “LLM10:2025 Unbounded Consumption”, https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/
-
FinOps Foundation, “FinOps for AI Overview”, https://www.finops.org/wg/finops-for-ai-overview/
-
Anthropic, “Workspaces”, Claude Developer Platform docs, https://platform.claude.com/docs/en/manage-claude/workspaces
-
Microsoft Learn, “Plan and manage costs for Microsoft Foundry”, https://learn.microsoft.com/en-us/azure/foundry/concepts/manage-costs
-
AWS, “Set up a model invocation resource using inference profiles”, Amazon Bedrock User Guide, https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles.html
-
Google Cloud, “Manage spend cap budgets”, https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps
-
Google Cloud, “Custom metadata labels”, https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/add-labels-to-api-calls
-
FinOps Foundation, “FinOps for AI”, FinOps Framework technology categories, https://www.finops.org/framework/technology-categories/ai/
-
Microsoft Learn, “Tutorial: Create and manage budgets”, https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets
-
Google Cloud, “Create, edit, or delete budgets and budget alerts”, https://cloud.google.com/billing/docs/how-to/budgets
-
OpenAI, “Spend limits”, OpenAI API docs, https://developers.openai.com/api/docs/guides/spend-limits
-
Anthropic, “Rate limits”, Claude Developer Platform docs, https://platform.claude.com/docs/en/api/rate-limits
-
LiteLLM, “Budgets, Rate Limits”, LiteLLM docs, https://docs.litellm.ai/docs/proxy/users
-
Anthropic, “Prompt caching”, Claude Developer Platform docs, https://platform.claude.com/docs/en/build-with-claude/prompt-caching
-
OpenAI, “Prompt caching”, OpenAI API docs, https://developers.openai.com/api/docs/guides/prompt-caching
-
OpenAI, “Batch API”, OpenAI API docs, https://developers.openai.com/api/docs/guides/batch
-
Anthropic, “Batch processing”, Claude Developer Platform docs, https://platform.claude.com/docs/en/build-with-claude/batch-processing