Benchmarking AI Agents with a Fixed Harness: Why Model Efficiency Varies
This article presents a controlled benchmark comparing four lightweight large language models inside a single fixed agent harness. By holding the framework, tools, context strategy, and acceptance rules constant, it isolates where end-to-end time is actually spent. All models passed, yet total runtime differed by nearly five times. The analysis breaks efficiency down into action steps, tool-call reliability, retry and backoff strategy, and context management, then offers practical guidance for model selection and reusable engineering practices.
1. Experimental Design: Reducing Everything to a Single Variable
A common mistake in AI agent evaluation is comparing “model capability” and “framework capability” at the same time. If two systems use different execution frameworks, different context organization, and different browser toolchains, the final latency gap could come from either the model or the framework, making the result impossible to attribute.
This comparison therefore uses a single-variable method. The execution framework is fixed to the same agent orchestration system. The task goal, input materials, context window organization, browser operation capability, and acceptance rules all stay identical. Only the underlying large language model is swapped. All models in the comparison are lightweight models below roughly 300B parameters, with one additional long-context model included as a reference group.
The task is deliberately complex: it requires multiple rounds of page browsing, information extraction, interface building, and self-verification. This is a typical “long-chain, multi-tool, strict-acceptance” scenario. The value of such a task is that it cannot pass on a single lucky generation; it only converges through a stable action loop.
2. Results Overview: All Passed, but the Process Differs Greatly
All four models eventually passed acceptance, but latency and process traces varied significantly:
- Model A: completed in one pass in 17 minutes, with no full rerun;
- Model B: failed on the first attempt; total time reached 1 hour 12 minutes including the rerun;
- Model C: no full rerun, but 3 internal automatic retries, totaling 88 minutes;
- Model D: failed twice in a row under the default retry policy, then completed after adjusting backoff parameters; first successful run totaled 1 hour 04 minutes.
The most valuable part of this data is not the final screenshot, but where the time actually went.
3. Four Real Sources of Efficiency Differences
1. Action Steps
The cost of an agent completing a task is driven mainly not by single-generation latency, but by the product of action steps. If a model produces directly executable tool calls every round, it can converge within 10 rounds. If it frequently outputs intermediate states that need correction, the number of rounds can quickly balloon past 40, and latency grows linearly or even super-linearly.
2. Tool-Call Effectiveness
Tool calls such as browser operations, file reads and writes, and script execution all carry a probability of failure. Efficient models tend to “verify in small steps before advancing” — for example, confirming that page elements have finished loading before performing the next action. Inefficient models tend to fire off large batches of calls at once, then have to roll back and redo after a failure.
A schematic execution loop can be abstracted as:
while not passed(acceptance):plan = model.next_action(context)result = tool.execute(plan)context = context.append(result)if result.failed:retry_with_backoff()
The parameter settings of retry_with_backoff directly determine the time lost after a failure.
3. Service Stability and Retry Strategy
Lightweight models are often deployed on high-concurrency inference services, where rate limiting and timeouts are the norm. If the default retry strategy uses a fixed short interval, it easily hits the wall repeatedly within a rate-limit window. Switching to exponential backoff with added random jitter clearly improves the success rate. In the experiment, one model only succeeded on its first attempt after adjusting the backoff parameters.
delay = base * 2 ** attempt + random_jitter
4. Context Management
In long-chain tasks, context expands quickly. If the framework does no compression or summarization, the model must locate key information among tens of thousands of tokens, attention gets diluted, and the error rate rises. A unified context strategy is the premise that lets this experiment attribute differences to the model, and it is also the most easily overlooked variable in engineering practice.
4. Implications for Model Selection
Labels like “low cost” and “high speed” only describe one facet of a model. Real agent efficiency is a composite metric:
- single-round generation speed;
- average number of action steps;
- tool-call success rate;
- service-side rate limiting and availability;
- context compression and memory strategy.
For selection, you should build your own small-scale benchmark set, run end-to-end tasks through a unified framework, and record three metrics: “first-attempt success rate,” “average number of retries,” and “end-to-end duration” — rather than only looking at the promotional parameters released with a model.
5. Reusable Engineering Recommendations
- Run horizontal evaluations with a fixed framework to avoid attribution confusion;
- Add idempotency and rollback mechanisms to tool calls to reduce the cost of failure;
- Standardize retries with exponential backoff plus jitter, and set a maximum retry limit;
- Use layered summarization for context, keeping decision-critical information and discarding redundant observations;
- Define acceptance rules upfront and make them automatically judgeable, avoiding manual intervention that interrupts the execution loop;
- Break latency down into three segments — “generation / tool / waiting” — to locate the real bottleneck.
6. Conclusion
With the same framework and the same task, all four models completed the work, yet end-to-end latency differed by nearly five times. This shows that the deployment efficiency of an agent is determined jointly by the model, the framework, and the infrastructure. For developers, rather than chasing a single-dimension parameter metric, it is better to engineer the evaluation methodology and use reproducible controlled experiments to answer “who is faster and more stable in my business.”
