Why Agentic Workloads Overwhelm Traditional AI Compute Platforms
Traditional short-request benchmarks systematically overestimate how AI compute platforms perform under real agentic coding workloads. This article explains why context growth, tool-call interruptions, prefill and decode imbalance, and retry-driven branching break conventional testing, then proposes a three-dimensional evaluation framework based on effective throughput, cost per token, and throughput per megawatt. It also outlines how to build reproducible benchmarks and lists common pitfalls to avoid.
1. Why Traditional Benchmarks Are Failing
For years, AI compute platforms were evaluated with short, single-turn request benchmarks: a few dozen to a few hundred input tokens, a few hundred output tokens, measuring time to first token and output tokens per second. That approach was sufficient in the chatbot era, but it becomes seriously misleading in agentic coding scenarios.
The reason is that the workload shape has changed. A real agentic coding task is not a single question-and-answer exchange but a long chain: the model reads the repository structure, retrieves relevant files, generates a patch, runs tests, reads errors, and revises. At every step, prior reasoning and tool results are fed back into the context, so context length grows monotonically rather than staying within a stable distribution.
This leads to three direct consequences:
- Attention computation and KV cache usage rise sharply with context length, making memory bandwidth—not raw compute—the primary bottleneck.
- Requests are no longer independent samples; they are strongly correlated with one another and cannot be approximated with a simple concurrency model.
- A large share of tokens are “re-reads” that repeatedly move historical context around, resulting in low effective information density.
Continuing to benchmark with short requests will systematically overestimate how a platform performs in real workloads.
2. Four Key Characteristics of Agentic Coding Workloads
2.1 Continuously Growing Context
Every time an agent completes a tool call, it appends the result to the context. Exploring a medium-sized repository can easily push the context to tens of thousands or even hundreds of thousands of tokens. At that point, reading the KV cache for a single forward pass far exceeds reading the weights, and platform performance is determined by memory capacity and bandwidth.
2.2 Structural Interruptions from Tool Calls
Tool calls split generation into multiple segments, with non-model computation (compilation, testing, retrieval) in between. This fragments batching windows: a batch of requests enters a tool-waiting state at the same time, leaving compute idle; then they all return at once, creating a momentary spike. A scheduler that looks only at average utilization will completely miss this jitter.
2.3 Imbalance Between Prefill and Decode
In short requests, prefill accounts for a small share of the work. In long-context workloads, prefill can take up most of the time. If a platform places both phases in the same resource pool without differentiation, long prefills block decoding and cause output stalls for tokens that have already been generated.
2.4 Failure Retries and Branch Exploration
Agents often try multiple repair paths in parallel, and the same prefix is recomputed repeatedly. Whether prefix computation results can be reused directly determines actual compute consumption.
3. Evaluation Framework: Three Dimensions, Not One Number
A single “throughput” metric is not enough to describe platform differences. At least three dimensions should be observed at the same time.
The first dimension is effective throughput: tokens generated per second under the target context-length distribution, rather than the peak under ideal short requests.
The second dimension is cost per token, which must include hardware amortization, energy, networking, and storage overhead, not just GPU-hours.
The third dimension is throughput per megawatt: how many tokens can be produced within a given power budget. Under the real constraint of limited rack power, where power supply becomes the bottleneck for expansion, this dimension is often more valuable for decision-making than peak performance.
The relationship among the three can be illustrated as follows:
def evaluate(platform, workload):# workload preserves real context growth and tool-call sequencestokens, joules, seconds = platform.run(workload)return {"throughput": tokens / seconds, # effective throughput"cost_per_token": platform.cost / tokens,# cost per token"tokens_per_watt": tokens / joules, # energy efficiency"tokens_per_mw": tokens / seconds * 1e6 / (platform.power_kw / 1000),}
It is important to emphasize that any cross-generation comparison must fix the workload and the measurement methodology; otherwise, the resulting multipliers are meaningless. A common industry practice is to label conclusions such as “up to 30x throughput” or “orders of magnitude lower cost” as upper bounds under a specific workload and methodology, not as general promises.
4. How to Build Benchmarks Correctly
For test conclusions to be credible, the benchmark must preserve four elements of the real workload: context growth, tool calls, multi-turn revision, and failure retries. The following pseudocode describes a workload generator:
trace = []ctx = load_repo_index() # initial contextfor step in range(max_steps):out = model.generate(ctx) # context grows with each turnif out.tool_call:result = sandbox.run(out.tool_call) # real tool execution timectx += out + resultelif tests_pass(ctx):breakelse:ctx += out + error_log # feed failure information backtrace.append(measure(ctx))
Three types of supporting infrastructure are required: a container platform handles isolation and elastic scaling for tool execution, object storage holds repository snapshots and trace data, and logging services with monitoring and alerting collect percentile latency rather than averages. Without any one of them, test results are hard to reproduce.
5. Common Pitfalls
- Looking only at average latency: in agentic scenarios, P99 is the boundary of user experience, and averages hide queuing.
- Ignoring power constraints: compute can be purchased, but power supply and cooling may not keep up.
- Extrapolating from short requests: context length and performance are non-linearly related, so extrapolation errors are huge.
- Overlooking cache reuse: repeated prefix computation is a major hidden cost.
6. Practical Recommendations
For developers, the recommended implementation order is: first establish a baseline with real trace replay, then bucket statistics by context length, then deploy prefill and decode on separate resources, and finally introduce prefix caching and request-priority scheduling. For capacity planning, use throughput per megawatt rather than peak compute as the procurement basis, and reserve elastic resources on the tool-execution side.
When implementing on the cloud, you can combine general-purpose capabilities: a container platform hosts inference and sandboxes, object storage keeps traces, message queues smooth out peaks and fill valleys, and monitoring with alerting drives auto-scaling. Baidu AI Cloud offers corresponding product categories for these general capabilities, but the specific selection should still be based on your own workload replay results rather than on idealized multipliers from vendors.
