Uber’s weekly Agent request volume grew 9.4× from February to August 2026, and weekly active users grew 7×, yet overall AI spending remained relatively stable from April onward. What mattered was not a one-off model price cut, but Uber’s deliberate, piece-by-piece changes to model selection, context, MCP tool calls, execution paths, and cost feedback. It was more a cost-engineering system designed to run continuously than a single fix.
On August 27, 2026, Uber Engineering published Running a Software Factory Efficiently at Uber Scale, outlining this cost-control approach in detail.
This retrospective had an uncomfortable backdrop. Axios reported that Uber’s CTO had disclosed in April that the company had already exhausted its planned 2026 AI budget ahead of schedule. By August, the figures Uber had published were:
- Weekly active users of Agent products grew 7× from February;
- Weekly Agent request volume grew 9.4×;
- Overall AI spending remained relatively stable from April onward;
- With the model held constant, cost per 1,000 requests fell nearly 34% from its peak;
- Cost per session fell 52% from its June peak.
By the same period, Uber had accumulated more than 3,600 Agent Skills internally, executing more than 30,000 Skill runs per day, with more than 70% of Pull Requests attributed to local or cloud Agents.
Here, “attributed to Agents” does not mean that 70% of code went straight into production without human involvement. Uber’s description of Managed Agents still includes human review and escalation of exceptions. This framing is closer to “Agents participated in these changes” than “Agents were solely responsible for them.”
Break Down Agent Costs First
Uber used six multiplying variables to describe total Agent spending:
总支出
= 用户数
× 每个用户的会话数
× 每次会话的轮次
× 每轮模型请求数
× 每次请求的 Token 数
× 每 Token 价格
This formula reflects the real cost of an Agent more closely than looking at the Token unit price alone.
A typical chat maps one input turn to one model call. An Agent also plans tasks, searches code, spawns sub-Agents, calls tools, polls jobs, handles failures, and carries existing context into subsequent requests. A user may submit a single task while many turns are already running in the background.
Uber wanted the first two variables to keep growing because they represent adoption and depth of use. Optimization focused on the extra turns, requests, and context an Agent generates to complete a task, along with the model pricing used for each category of work.
| Cost variable | Common amplification factors | Uber’s controls |
|---|---|---|
| Turns per session | Incorrect search paths, retries after failures | Context Graph, Skill, Managed Agent |
| Model requests per turn | Polling, conversational tool calls | Code Mode, script batching |
| Tokens per request | Full history, tool schemas, raw results | Compaction, caching, Tool Search, CLI |
| Price per Token | The same model tier for every task | Benchmark-driven model selection |
These variables multiply, so several small changes along the execution path can add up to a significant change in total cost.
Shift from Cost per Token to Cost per Outcome
Uber organizes its metrics into four tiers.
| Tier | Primary metrics |
|---|---|
| Portfolio-wide | Total cost, user count, and each tool or Agent’s share of total cost |
| Individual tool | Cost per user, cost per 1,000 requests, cost per session, cost per active hour, cache hit rate |
| Model | Share of requests, share of spend, cost per 1,000 requests, cost per million Tokens |
| Managed Agent | Cost per merged PR, review, alert, or cleanup task, plus Revert Rate, F1, MTTR |
Uber also breaks cost changes into user growth, usage frequency, input Tokens, and output Tokens, instead of using a vague “people have just been using it more lately” to explain everything.
Successful outcomes are a better denominator than Tokens when evaluating a model’s value. A cheaper model that fails often and triggers retries may not have a lower total cost per successful task; a pricier model that reliably completes high-risk work may be the better value.
Accordingly, when selecting models, Uber considers task-completion cost, output quality, and reliability rather than comparing public price lists.
Use Real-Task Benchmarks to Select Models
For Managed Agents, Uber uses the same model-selection process:
- Build a Benchmark from Agents’ real-world work;
- Run the same tasks against different models through a unified Harness;
- Compare quality, reliability, and cost per completed task;
- Choose a configuration on the Pareto Frontier, and keep retesting it.
The evaluation set for uReview, Uber’s code-review Agent, comes from real PRs with known defects and is stratified by difficulty. Its metrics include Precision, Recall, F1, review cost, latency, timeout rate, and noise. Uber says switching models improved F1 while significantly reducing the cost of reviewing each PR.
In interactive Agents, the default model for sub-Agents is also one of the configurations with the biggest impact on cost. The main Agent interprets the goal, breaks down the task, and checks the results; sub-Agents usually perform clearly scoped work with well-defined inputs. Uber therefore defaults sub-Agents to a less capable but cheaper model, while keeping the option for a human to override it.
One distinction matters: Uber already selects models by workload, but finer-grained dynamic model routing is still only a future plan. The latter is not a system the article describes as already in place.
A Large Context Window Does Not Mean You Should Fill It
Every Agent request resends the conversation history, project context, and tool results. The larger the context, the higher the repeated cost of every subsequent turn.
Uber set two defaults for its interactive Harness:
- Trigger automatic compaction at 400,000 Tokens, even if the model supports 1 million Tokens;
- Use Medium Reasoning Effort by default, and increase it only when needed.
These defaults leave headroom within a session. One million Tokens is the usable ceiling, not the normal operating range.
For my own Agent Runtime, I would monitor at least the number of session turns, context size, tool calls, number of sub-Agents, retries, execution time, and cost per task. Once a threshold is reached, it also has to decide whether to compact the context, downgrade the model, pause, or hand off to a human; terminating the task outright only turns wasted Tokens into a failed task.
Prompt Cache TTLs Should Follow Session Cadence
Agents repeatedly send system prompts, project instructions, conversation history, and tool definitions. Prompt Cache can reduce read costs for repeated prefixes, but cache writes carry a premium, so the TTL should not simply follow a default.
Uber found that engineers often left the terminal for more than 5 minutes and returned to a session whose cache had expired, forcing the full prefix to be rebuilt. The company therefore changed interactive sessions from a 5-minute TTL to a 1-hour TTL, while keeping a 5-minute TTL for short-lived sub-Agents.
Uber’s original post also listed the cache price differences among providers at the time: a cache-hit read cost about 0.1× the standard input price, a 5-minute write cost about 1.25×, and a 1-hour write cost about 2×. Those figures vary by provider, but the decision method is reusable: first examine the distribution of gaps between adjacent turns, then choose the TTL.
Long-running human–AI interactions usually suit longer cache lifetimes, while short tasks and batch jobs may not justify paying the higher cost of long-duration writes.
MCP Costs Go Beyond Tool Execution
Uber’s unified MCP Gateway connects more than 1,000 internal and third-party MCP Servers, centralizing authentication and policy enforcement.
The initial problem was that the direct integration path preloaded a large number of tool schemas into each session. Uber measured that installing more than 100 tools added roughly 50K to 70K Tokens to the initial prompt. Those definitions were then resent with the context on later turns, even though most of the tools were never called.
Uber later adopted two paths:
- CLI dynamic resolution: The model calls a unified CLI; at execution time, the CLI finds and invokes the tool through the Gateway, so MCP schemas do not stay resident in the model context;
- Tool Search: Search the tool catalog first, and load only the definitions needed for the current task.
It is important to distinguish a capability being available from its schema remaining resident. MCP continues to handle connections and invocations, while the Harness, CLI, or Gateway decides which tools the model sees at any given moment.
This also echoes the progressive-loading approach in Skills Over MCP: the model first sees a small amount of metadata, then loads the full instructions and resources once the task matches.
Move Deterministic Loops Out of Model Context
Submitting a query, retrieving a task ID, polling for status, downloading the result, and filtering the data do not require the model to think through each step again. If every step consumes a model turn, polling responses keep entering the context, and later requests carry them again.
Uber uses Code Mode to have the model generate scripts, while subprocesses handle polling, batching, and result trimming; only a summary is returned to the model.
Uber tested traditional tool calls against Code Mode on five identical SQL queries:
| Query | Traditional tool calls | Code Mode | Savings |
|---|---|---|---|
SELECT 1, 1 row | 903 Tokens | 402 Tokens | 55% |
COUNT(*), 1 row | 954 Tokens | 403 Tokens | 58% |
GROUP BY LIMIT 20 | 1,600 Tokens | 457 Tokens | 71% |
SHOW COLUMNS, 175 rows | 2,200 Tokens | 900 Tokens | 59% |
| Wide-table query, 50 rows | 1,431,594 Tokens | 900 Tokens | Nearly 100% |
The first few queries returned small results, yet savings still exceeded 50%. This shows that the benefit goes beyond reducing large result payloads: it also comes from eliminating schema initialization, multi-turn polling, and repeated reasoning about each step. In batch workflows, Uber measured savings above 90%.
The boundary is straightforward: pagination, polling, retries, format conversion, and aggregation suit ordinary code; understanding goals, judging anomalies, and evaluating results still belong to the model.
Good Context Also Reduces Costs
In large codebases, Agents spend much of their time finding information rather than generating code. Without reliable entry points for questions such as which team owns a service, where a data table is used, or how failures were handled previously, Agents search more files, launch more sub-Agents, and repeatedly send an ever-growing context.
Uber’s AI Context Graph contains about 24 million nodes and 80 million edges and integrates data from more than 30 internal systems, including services, teams, incidents, PRs, architecture documentation, deployments, and datasets.
Uber tested the same question using the same model:
- With the Context Graph, it found the correct answer in 38 seconds;
- Without the Graph, it ran for 20 minutes, launched two sub-Agents, hit three errors, and reached the wrong conclusion.
Most teams do not need to start with a knowledge graph containing tens of millions of nodes. Turning repository indexes, service dependencies, code owners, data-table consumers, Runbooks, architecture decisions, and validation commands into queryable entry points for Agents could eliminate a large amount of unproductive searching.
Put Costs in Front of Engineers
Uber put a real-time cost counter in the terminal status bar. It shows the cumulative cost of the current Harness and of all of the user’s Harnesses, and alerts the user at 50%, 80%, and 100% of the expected cost. Interactive Harnesses share one budget tier, while Managed Agents use a separate tier. Raising the allowance requires manager approval, but approval and configuration propagation remain lightweight.
A month-end bill can tell a team how much it spent, but not where the cost occurred. Uber’s Session Analysis Dashboard directly analyzes Traces from local and remote sessions, identifies 16 categories of cost anti-patterns, and shows their cost impact along with recommended fixes, for example:
- An overly capable model was used for a simple task;
- Large chunks of data returned by MCP remained in the context for too long;
- The Prompt Cache had expired by the time the session resumed;
- Large volumes of system instructions and tool definitions were preloaded before the user provided any input.
This brings cost governance into day-to-day development instead of leaving it solely in financial statements.
Managed Agents Make Unit Costs Easier to Calculate
At the end of the article, Uber identifies moving more software-development tasks to Managed Agents as the next direction.
Open-ended terminal sessions are flexible, but they give the platform little control over task inputs, context size, model selection, execution turns, and validation methods. Managed Agents can define goals, tools, models, completion criteria, quality metrics, and paths for human escalation up front, which also makes the cost per successful outcome easier to calculate.
Uber maintains a set of specialized Agents, each with its own Benchmark and model policy, rather than a single Agent that handles every task. For a platform team, optimizing these stable workflows is more manageable than correcting the terminal usage habits of thousands of engineers one by one.
If I scaled this approach down to a typical team, I would implement it in this order:
- Start by recording Traces: task type, model, input and output Tokens, caching, tool calls, retries, latency, cost, and outcome;
- Then add budget guardrails: limits on turns, context, concurrency, retries, time, and cost per task;
- Then govern execution paths: context compaction, on-demand tool loading, result summaries, and script batching;
- Finally, use Benchmarks built from real tasks to select models, and track the cost and quality of each successful task.
The order matters. Without Traces, it is hard to know what to optimize. Without outcome metrics, model routing can easily degenerate into simple price comparison.
The Value of This Approach
Uber’s data comes from its own codebase, team size, and vendor mix, so it cannot be treated as a promise of savings for other companies. Its greater value lies in breaking Agent costs down from a single API bill into measurable runtime problems.
Users and tasks can keep growing. What needs to shrink is fruitless searching, repeated context, idle tool schemas, model-driven polling, ineffective retries, and model calls that do not match task difficulty.
Only when every charge can be traced back to a specific session, and every session back to a specific outcome, does cost governance have an actionable lever. Model capability is only one condition for scaling Agents; the Runtime must also be able to explain why a task ended up costing what it did.