Benchmarking LLMs Inside a Fixed Agent Framework: A Controlled Experiment and Lessons Learned

    This article presents a controlled experiment where four LLMs of similar parameter scale were tested within the same agent framework and task. Despite comparable single-inference performance claims, end-to-end completion times varied by over 5x, revealing that true agent efficiency depends on action‑loop length, tool‑call accuracy, service stability, and context management—not just model speed. The analysis includes process metrics, failure/retry patterns, and practical selection recommendations for engineering teams.

    Reversing the Variable: From Framework to Model

    In a prior experiment, I kept the model constant and swapped four different agent harnesses to observe how framework design affects task efficiency. One framework won decisively—completing a complex creative collaboration system in 16 minutes 55 seconds.

    That result raised a more fundamental question: if the framework stays fixed, how much does swapping the underlying model change efficiency? This is the typical scenario for engineering teams: the framework is already set, and the only adjustable component is the model. So this time, the variable was reversed—all agents ran on the same DSH harness, with identical tasks, materials, context, browser environment, and acceptance criteria. Only the model was replaced.

    With several new models below the 300B parameter scale available, I selected four for comparison: three lightweight models positioned as low-cost and fast, plus one model with a 256K context window as a reference. All four completed the task, but the differences in their process data were far more revealing than the final screenshots.

    Experimental Design: Strict Variable Control

    The biggest risk in any benchmark is an unfair comparison. To keep conclusions credible, the following dimensions were strictly fixed:

    1. Task fixed. All four models executed the same complex task: building a creative collaboration system involving frontend UI, interaction logic, data flow, and multiple modules. The complexity was high enough to expose weakness in long-chain execution.

    2. Input material and context fixed. The requirement documents, design assets, and reference materials were identical, eliminating misinterpretation caused by different input.

    3. Browser environment fixed. The verification steps in the agent’s browser sandbox used the same environment for all runs.

    4. Acceptance criteria fixed. The same pass/fail checklist determined completion—no subjective scoring.

    5. Only variable: the model. From model selection to calling parameters, everything else was kept as consistent as possible.

    Results: Four Divergent Execution Paths

    All four models eventually reached a “task complete” state, but their journeys differed dramatically:

    • Model A (positioned as high‑speed): Finished in 17 minutes with no wasted actions—the efficiency baseline.
    • Model B: Failed on the first attempt, succeeded on a rerun, total time 1 hour 12 minutes. The failure cause deserves separate analysis.
    • Model C: Did not trigger a full rerun but internally performed 3 automatic retries, accumulating 88 minutes. It recovered through self‑correction.
    • Model D (long‑context reference): Failed twice under the default retry policy, then succeeded after switching to exponential backoff—first success at 1 hour 4 minutes.

    Key observation: completion times differed by more than 5×, yet all models had similar parameter counts and comparable marketing positioning. The “low‑cost” and “high‑speed” labels reflect single‑inference performance only; they do not predict real‑world efficiency in multi‑step agent tasks.

    Why Agent Efficiency Really Depends on These Four Factors

    1. Total number of action steps

    An agent task is not a single inference but a loop of dozens or even hundreds of iterations: think → call a tool → observe the result → think again. Fast single‑step inference does not guarantee fewer total steps. A model that correctly plans a sequence upfront can be several times more efficient than a model that is quick per step but repeatedly backtracks. Always measure total steps, not just wall‑clock time.

    2. Tool‑call accuracy

    Agents rely on tool calls (file I/O, browser actions, code execution) to complete work. Incorrect formats, hallucinated parameters, or poor judgment about when to call a tool trigger retry chains. Model C’s three internal retries were essentially self‑repair costs at the tool‑call layer.

    3. Service stability

    Long‑duration tasks place high demands on inference service availability. Model D failed twice under default settings and only succeeded after exponential backoff—showing that rate limits and instabilities directly impact agent success rates. Engineering teams should configure robust retry and backoff logic by default:

    1. import time
    2. def call_model_with_backoff(prompt, max_retries=5):
    3. delay = 2
    4. for i in range(max_retries):
    5. try:
    6. return agent.run(prompt)
    7. except RateLimitError:
    8. time.sleep(delay)
    9. delay *= 2 # exponential backoff
    10. raise RuntimeError("Task failed after exceeding retry limit")

    4. Context management

    As a task proceeds, the context grows continuously. The model’s ability to maintain instruction adherence, remember early constraints, and avoid redundant actions inside a long context directly determines how often it must redo work. This is why a larger context window does not automatically equal better performance—effective use of the available context matters more than its raw size.

    Recommendations for Engineering Teams

    Based on this experiment, four practical suggestions:

    1. Evaluate with end‑to‑end tasks, not single‑turn benchmarks. Build an internal evaluation suite with a fixed harness, fixed tasks, and fixed acceptance criteria, then run the model through the full agent loop.
    2. Track process metrics. Total steps, tool‑call failure rates, retry counts, and number of failures before first success are far more indicative of real usability than a final screenshot.
    3. Design fallbacks for unreliable services. Exponential backoff, checkpoint/resume for long tasks, and persisting critical steps are standard agent‑engineering practice.
    4. Calculate total cost, not just token price. A cheaper‑per‑token model that needs twice as many steps can end up more expensive. Evaluate the total cost to complete a task, including time and compute.

    Conclusion: The Real Lesson Is About Systems, Not Single Points

    The most valuable outcome of this experiment was not a ranking, but a correction in mental model: model positioning describes single‑point capability; agent efficiency is a system‑level result of multiple coupled factors. The framework, the model, the tool chain, service stability, and context management—any one of these can amplify or negate the advantages of a given model. For developers, building your own controlled‑variable evaluation pipeline is the most reliable basis for model selection.