Once upon a time, the biggest technology line item was the cloud bill. Then came AI agents, which don't just inflate a bill—they breed one. If you are responsible for the P&L on this stuff, the math is probably keeping you up at night. April 2026 was a wake-up call for Uber. While the engineering team was happily shipping code—about 11% of its backend updates were generated by AI with zero human intervention—the CTO, Praveen Neppalli Naga, revealed that the firm’s entire annual AI budget was gone by April. The API cost per engineer per month had sailed past the $500 mark, touching up to $2,000. Adoption of Claude Code skyrocketed from 32% to 84% among its 5,000 engineers between December 2025 and March 2026. The figures were reported by Bloomberg. Sam Altman of OpenAI told CNBC in June 2026 that fears about cost are now the second-most common issue he hears from customers. In just a few months, it went from never being mentioned to being a primary headache. Some enterprises reportedly told him they had already burned through their entire 2026 AI budget. This is the new economics of Agentic AI. The problem isn’t that the models lack intelligence; it’s that the meters are missing. As Kong’s research indicates, as many as 9 in 10 organizations are adopting AI agents, but only a tiny fraction can answer the most basic questions: What does it cost to serve one customer? Which teams are margin-positive? Who is burning tokens without burning value? The five-day plan below is a framework for fixing that. It’s meant for leadership who are tired of getting a bill that looks like the national debt of a small country, with zero attribution to the teams generating it. We’re going to walk through getting from zero to a functional metering system in a week—focusing on workflow changes just as much as the tech.
Why you can't just tell the engineers to tone it down
There’s often a visceral reaction when the first scary AI invoice lands: Just turn it off. That doesn't work. If you cut access, the developers will just use a personal ChatGPT subscription and paste the output—and the code—into your infrastructure anyway. It’s a shadow IT nightmare. Besides, the demand for these agents isn't frivolous. A single simple agent task burns far more tokens than a single chat message. We are talking about a fan-out architecture—the agent plans, selects tools, executes, verifies, and loops back to fix what verification caught. One run against a codebase might burn the token-equivalent of hundreds of prompts. Wait, there's good news. Architectural choices made at design time determine a large portion of these costs. That suggests there is a lot of controllable waste in the system, if you can only see it.
Day 1: The audit and the hard questions
Your first task on Monday is to figure out what you are actually running. Don't try to measure yet; just find out where the leaks are likely to be. Ask your engineers: What agents are you using, and can you see the bill? Most will say I have no idea. Walk through the deployments. You probably have a LangGraph agent in one department, a CrewAI workflow in another, and a bunch of individual engineers using a custom implementation. You also have providers—OpenAI, Anthropic, Google, and likely a fine-tuned open-source model running somewhere on expensive GPUs. You should leave the building on day one with an answer to the question: If I ask our finance team for last month’s AI spend broken down by team, do they laugh at me or hand me a spreadsheet? Additionally, you need to define your goals. You might want to see costs (Showback), you might want to transfer costs to business units (Chargeback), or you might be building a product to bill external customers. Your metering objective determines your tooling complexity. This is where I’ve seen many enterprises hit a false stop. They buy the prettiest dashboard and think they are done. But the dashboard usually meters tokens. And tokens are not the whole story. Do not fall into the trap of metering input and output tokens only. You have non-LLM costs: tool calls that feed a database, infrastructure costs for compute time, and the cost of embedding. Pick a metering unit that aligns with value. For internal use, Task Completion is often more aligned with business value than a token count. For operations, one developer on Reddit noted they specifically needed cost per workflow: per Slack channel, not cost per model run.
Day 2: Buy or build? Don't even think about building
The build-vs-buy argument for metering is over. If you are here, you work to make money, not to write a telemetry tool. The documentation for Agensor, an open-source agent-metering SDK, puts it in blunt terms: building this yourself takes three to four weeks minimum, and then you have to maintain it forever. Additionally, the landscape has matured. If you are a smaller shop looking for speed, an SDK wrapper like Agensor will wrap your existing OpenAI or Anthropic clients and handle credit enforcement without added latency. It allows users to sell access to an agent run and capture tokens, tool calls, and LLM interactions. For those trying to avoid SDK changes entirely, OpenLIT is an OpenTelemetry-native platform. It auto-instruments more than 90 LLMs and agent frameworks with zero code changes. It’s robust and self-hostable, which is a boon if your data governance folks are nervous about sending prompts to a SaaS vendor. If you are a heavy Kong user—lucky you—Kong Konnect’s Metering and Billing unit acquired OpenMeter in 2025 and is now unifying metering across APIs, LLMs, and MCP servers. They support prepaid credits, which lets your platform team buy usage upfront. For those deeply entrenched in LangChain, LangSmith automatically records token usage and costs at the trace level, providing aggregated project stats. It’s the easiest way to get cost visibility at three levels: individual trace, project, and dashboard. Here’s the kicker many vendors don't tell you: The market is bifurcating. There is instrumentation (seeing the cost) and enforcement (stopping the run because it costs too much). Many players do one or the other well. Agensor does enforcement—it throws a BudgetExhaustedError that stops the agent mid-execution. LangSmith does visibility—it will show you the storm coming but won't hold an umbrella for you.
Day 3: Instrumentation, enforcement, and the Context Tax
You are now in the deep water. You need to attach the meter to the pipes. If you’re using a wrapper like Agensor, the installation is surprisingly clean. You wrap your Anthropic or OpenAI client once, define how to identify the user, and billing is automatic on every request. However, if you are using OpenTelemetry (OpenLIT), the magic phrase is openlit.init(). That single call handles the telemetry, assuming your codebase isn't hiding behind a legacy monolith. But here’s where the Context Tax becomes your enemy. This is a hidden cost that kills attempts at cost control. An agentic task is a series of chained calls. Let’s say you ask an agent to fix this bug. It will read the relevant files (a massive prompt), decide on a fix (output tokens), rewrite the code (more output tokens), and then run tests (more input tokens). Because of this fan-out, a simple task burns 5 to 30 times the tokens of a simple question. One CEO I spoke with likened it to having a hired consultant who is paid per word think on your behalf. To defend against this, you need two-tier caching. Prompt caching should be a default setup—it can reduce costs by up to 80% in heavy multi-turn workloads. Audit your prompts for context inflation. Are you sending an entire wiki page to the model when two paragraphs would do? Once you have visibility, set up budget enforcement. Microsoft’s ADR-0012 model suggests two tiers. A soft cap that fires an alert to the engineering manager when a team hits 70% of its budget, and a hard cap that pulls the plug and returns a 402 Payment Required error. The critical detail is that enforcement must be post-action, not predictive. Relying on a model to predict when it will go over budget is a fool’s errand—agent behavior is too non-deterministic.
[SPONSORED]
AI INFRASTRUCTURE AUDIT
Is your tech stack bleeding resources? Let our engineers evaluate your architecture.
Day 4: Governance and getting the CTO to stop sweating
You have the data flowing. Now you need the rules. LangChain’s governance framework—Govern, Decide, Protect, Observe, Assure—is a useful template. It starts with establishing identity and ownership. If you can't identify who is running the task, you can't bill them. You then need to decide what happens when a request is too risky or too expensive—do you escalate to a stronger model, or fail over to a cheaper one? Many enterprises get stuck in the Audit phase. They want a perfect lineage of every decision the agent made. That is expensive. For internal cost management, focus on the finance question: Did we make money on this workflow? rather than the audit question: Why did the agent choose this path? The metrics on your dashboards should answer the Why behind the spikes. Cost per task is the North Star metric. If that number is rising, your quality might be dropping, or your prompts are inflating. Watch Cost per workflow carefully. If you have an AI assistant that costs $2.00 per conversation, but your customer support ticket worth $5.00 is resolved in one conversation, you are winning. If it takes five conversations, you're losing money on every interaction, no matter how efficient the agent feels. Yes, and there is a fair chance you will need to communicate these numbers to a skeptical CFO. Prepare for the Uber question. When Uber tried to tie the $2,000-per-engineer spend to new features, they couldn't do it cleanly. The COO even admitted that there is no clear line between AI usage and new product features. Don't let your finance team suffer this anxiety. Chargeback to the business unit, not the engineering platform. If Sales wants an AI SDR, the cost belongs to the Sales P&L. This is the only way to make demand elastic and rational.
Day 5: Optimization and the Cheap-First cascade
You’ve metered it, attributed it, and capped it. Now we make it cheaper. The single highest-leverage cost intervention is model routing. Production workloads are not uniform. Most of your calls are simple, repetitive tasks; a minority are complex reasoning tasks. If you route all of them to the flagship model, you are bleeding money. BCG research on cost governance suggests lightweight models and high-performance models can differ by 5 to 25 times in per-token price. By implementing a cheap-first cascade—trying a smaller distilled model first and escalating only when it fails a quality check—many enterprises see spend drop by 60% to 80% on mixed workloads. This is exactly what the open-source community is moving toward. On Hacker News, cost routing is becoming standard operating procedure. Write a playbook for routing: - If the task is a template (e.g., Summarize this email), use a small model (e.g., GPT-5-nano or a Llama 3.3 70B). Do not call the flagship. - If the task requires multi-step logic, escalate mid-run. - If you are using a coding agent, keep the context window tight. Do not let the agent repeatedly search the entire codebase if the files are already identified. Finally, don't forget the Retirement process. You need to kill the agents that are nothing but a novelty—the Slack bots that summarize a channel every morning. If the dashboard shows a high cost per workflow with zero user retention, shut it down. One anonymous case study floating around the industry involved a firm rolling out Claude access without usage limits; it burned a massive $50 million in a single month before anyone noticed. That isn't a technology failure; it’s a management failure to sunset a feature.
The 60-Day Horizon
You won't survive the Token Winter if you treat this as a one-week project. Week one gives you the rails. The next month gives you the muscle. Keep a strict pricing policy: - As of August 2026, Anthropic has silently shrunk its cache TTL (availability) to five minutes, which hurts your cost calculations. Meta’s Muse Spark 1.1 prices input tokens at $1.25 per million versus Anthropic’s higher tier. Keep your routing logic flexible; the market is shifting monthly. - API costs will fluctuate. AWS Bedrock customers have learned that standard tools have a 24-48 hour delay. A misconfigured agent can burn through your margin overnight while your budget alert is still sleeping. The goal is not to starve the agents; it’s to make every token work for a purpose. If you cannot state the value of the output relative to the input cost, you shouldn’t be paying for the input. The trend is clear: from Meta’s aggressive per-token pricing to GitHub’s shift away from flat-rate copilot plans, the industry is forcing you to meter. If you do not build the internal capacity to understand this, you will find yourself in a reactive mode, cutting off access in a panic exactly when your competitors are scaling up their efficiency. Start the audit on Monday. The only bad move is waiting another quarter for the billing cycle to tell you what went wrong.