

AI Agent Cost Management: From Token Tracking to Spend Optimization
Find out what your AI agents really spend, who is spending it, and how to stop runaway runs before they hit the bill.
Gartner predicts that over 40% of agentic AI projects will be canceled by the end of 2027, citing escalating costs, unclear business value and weak risk controls. The projects that survive will deliver autonomy at a cost the business can justify, and much of the waste is invisible. We asked an agent the same question twice, with the same model. One run answered in a single call. The other took 24 calls and 38 times the tokens to reach the same answer, and nothing in the logs looked wrong. Could you tell which of your agent runs look like the second one, and who is paying for them?
Cost Governance for AI Agents is a hands-on session where AI and platform engineers learn to govern the cost of their AI agents, combining agency with efficiency. You will follow along on a working multi-agent workflow: measure what each run costs, attribute the tokens, and add budgets and guardrails that act before each model call. You leave with the code and a checklist to apply the same steps to your own agents.
Why now
98% of FinOps teams now manage AI spend, up from 31% two years ago (State of FinOps 2026). The Linux Foundation launched the Tokenomics Foundation in August 2026, and the FOCUS billing standard is adding native token tracking. Standards are forming quickly, but most engineering teams still cannot answer a basic question: what did that agent run cost, and where did the tokens go? Agents make this harder than ordinary LLM apps, because dozens of individually cheap steps add up, and a single retry loop can multiply the bill. As more businesses become agent-native, the ones that get the most value out of every token will be the ones that can afford to innovate at scale.
What you'll build
Cost tracking for a multi-agent workflow that reports the full cost of every run, including cached and reasoning tokens
A breakdown of spend by agent, task and user segment
A per-run budget that is checked before every model call, so a run never goes over
A guardrail that catches a looping agent and sends it a correction before stopping it
Format
One 2-hour live online session: about 1 hour 30 minutes of content, live demos and follow-along labs, then 30 minutes of Q&A. Labs run against any OpenAI-compatible API, or in a no-cost simulate mode with no API keys. You keep the workshop repo to finish or extend afterwards.
Part 1: Measure and attribute (45 min)
Why per-call pricing misleads, and how to measure cost across a whole agent run, using the agent cost formula to build a run's cost bottom-up from its calls and retries
Capturing token usage, including cached and reasoning tokens, with OpenTelemetry tracing
Breaking spend down by agent, task and user segment, using showback practices from cloud FinOps, and how today's LLM gateways and observability tools handle run-level traces across agents, user segments and budgets
Lab: find the most expensive runs in the workshop agent
Part 2: Govern (45 min)
Budgets checked before every call, and where gateway limits stop working for agents
Steering a looping agent with a correction instead of killing the run
Context trimming, cache-friendly prompts and model downgrades: when each one actually saves money
Lab: add a budget and a guardrail, first with an LLM gateway's built-in limits, then with TokenOps (open source), and compare the effort, cost and results
By the end of this session you will be able to:
Measure the full cost of an agent run, not just the price of each call
Attribute tokens to the agent, task and user segment that spent them
Enforce a per-run budget that stops an agent before the call that would exceed it
Detect a looping agent and redirect it instead of killing the run
Choose which cost controls fit your own agents, using a checklist you take home
Who should attend
AI and platform engineers running agents in production
Engineering leads who own an AI budget and need to explain where it goes
FinOps practitioners moving into AI spend
You'll need
Working Python and a terminal + IDE
Basic familiarity with calling an LLM API
Helpful but not required: Knowledge of OpenTelemetry, FinOps experience, knowledge of a multi-agent framework such as LangGraph.