Agent Efficiency Compared: Benchmarking Four Models with a Fixed Harness

    This article benchmarks four lightweight and long-context models by keeping the agent harness fixed and varying only the underlying LLM. It breaks down why the fastest run finished in 17 minutes while others took 88 minutes, and identifies the engineering variables that drive real agent efficiency: action turns, tool-call success rate, service stability, and context management. It closes with practical recommendations on layered retries, structured-output validation, and dynamic context compression.

    1. Introduction: Shifting from Model Capability to System Performance

    In agent application development, developers often fall into a trap: attributing the final delivery quality entirely to the parameter size or inference speed of the underlying large language model (LLM). In real engineering deployments, however, whether an agent can complete a task with high quality within a time limit is a complex systems engineering problem.

    To isolate the influence of the model’s inherent capabilities, this technical discussion applies an extreme variable-control method: the agent execution framework (harness) is completely fixed, while the task objective, input materials, system context window, browser automation environment, and final acceptance rules are kept strictly identical. Only the underlying model driving the agent is swapped. The models in this horizontal test include several mainstream lightweight, high-speed models with fewer than 300B parameters, plus one model with an extra-long context window as a control.

    The results show that all four models ultimately delivered a complex creative collaboration system that met the acceptance criteria. However, their engineering metrics during execution differed dramatically: the fastest model closed the loop in 17 minutes; the second-best model hit an exception in its first run and took about 1 hour 12 minutes in total including a rerun; another model avoided a full rerun but went through 3 internal automatic retries, stretching the total time to 88 minutes; the control model failed twice in a row under the default retry strategy, and only finished in 1 hour 4 minutes after the backoff mechanism was adjusted.

    This set of data clearly proves that a low-cost or high-speed model positioning only describes part of the capability. Real agent efficiency depends more on the number of action turns, tool-call success rate, service stability, and context management strategy.

    2. Experiment Design: Building an Unbiased Standardized Sandbox

    To draw conclusions with engineering reference value, the evaluation environment must be absolutely neutral and rigorous.

    2.1 Fixed Variables and the Single Variable

    The core principle of this evaluation is the single-variable method. The fixed harness manages the agent’s perception, planning, action, and reflection loop. All prompt engineering, memory compression strategies, and tool set definitions are encapsulated inside the harness. The only thing that changes is the underlying model that receives instructions and outputs structured action instructions.

    2.2 Task Complexity and Acceptance Mechanism

    The test task was to build a creative collaboration system with multi-page interactions and dynamic data rendering. The acceptance rules do not rely on subjective human scoring; instead, automated scripts check functional coverage, code quality, and the actual rendering effect in the browser. Only a complete pass through automated acceptance counts as a “first-time success.”

    3. Deep Dive into Process Data: Overlooked Engineering Overhead

    The final screenshot only reflects the result, while the process data exposes the pain points of the system architecture.

    3.1 Rapid Closed Loop: The Lesson from 17 Minutes

    The model that completed the task within 17 minutes showed that its core advantage was not simply fast token generation, but extremely precise control of action steps. It broke down the correct directory structure in one pass during the planning phase, and its tool calls hit the target on the first try, avoiding ineffective trial-and-error loops. This suggests that a model’s instruction-following ability is key to reducing engineering overhead.

    3.2 Failure and Rerun: The Cost of 1 Hour 12 Minutes

    The model that took 1 hour 12 minutes failed in its first run. This usually happens because the model generated incorrect tool-call parameters, causing the sandbox environment to throw an error and interrupt. Only after a manual or automated full-run rerun mechanism was introduced did the model correct the path. This reveals that in an agent architecture, a model lacking self-correction ability can dramatically increase time costs.

    3.3 Hidden Retries: The Internal Drain of 88 Minutes

    The model that took 88 minutes without a full rerun triggered 3 automatic retries internally. This means a single tool call (such as a file write or dependency installation) timed out or conflicted. To keep the task flow from breaking, the underlying harness automatically retried. This “running while impaired” approach guaranteed final delivery, but the accumulated waiting time severely dragged down efficiency.

    3.4 Backoff Strategy Tuning: The Turning Point at 1 Hour 4 Minutes

    The control model failed twice in a row under the default retry strategy. After engineers intervened and changed fixed-interval retries to an exponential backoff plus jitter strategy, the task completed in a cumulative 1 hour 4 minutes. This shows that transient concurrency limits on the model server side require a smarter retry algorithm on the client side as a fallback.

    4. Analysis of Key Engineering Variables

    Based on the observations above, we can extract several core engineering variables that affect real agent efficiency:

    1. Action turns: The more turns, the larger the accumulated context, which not only increases token consumption but also easily triggers the model’s “lost in the middle” effect, causing it to drift from the initial goal.
    2. Tool-call success rate: Whether the model can output tool parameters that strictly conform to the JSON Schema directly determines whether an abnormal interruption is triggered.
    3. Service stability and rate limiting: Even if the model’s inference speed is extremely fast, strict server-side concurrency limits mean the client’s retry mechanism will determine the final time.
    4. Context management: Although a long-context model can hold more historical information, without an effective summarization and trimming mechanism, inference latency increases linearly with context length.

    5. Best Practices for Developers

    Based on this horizontal test, enterprises should focus on the following practices when selecting models and designing architecture:

    5.1 Build Layered Retries and Circuit Breaking

    Do not rely on a single retry strategy. It is recommended to implement a robust call layer with pseudocode logic like the following:

    1. import random
    2. import time
    3. def robust_invoke(model_client, payload, max_retries=5):
    4. for attempt in range(max_retries):
    5. try:
    6. return model_client.execute(payload)
    7. except RateLimitError or TimeoutError:
    8. # Exponential backoff + random jitter to prevent server avalanche
    9. wait = (2 ** attempt) + random.uniform(0, 1)
    10. time.sleep(wait)
    11. raise Exception("Execution failed after max retries")

    5.2 Strengthen Structured Output Validation

    Add a Schema validation middleware at the harness layer. If the model outputs a tool call in the wrong format, intercept it immediately and ask the model to regenerate locally, instead of letting the entire task flow crash and requiring a full rerun.

    5.3 Dynamic Compression of the Context Window

    Regardless of how long a context the underlying model supports, implement sliding-window or summary-based memory management. Keep only the file tree and error logs most relevant to the current task, and remove redundant historical dialogue to reduce the latency of each inference.

    6. Conclusion

    Deploying agents is not a solo performance by a single model, but a collaboration between model capability and the engineering framework. Through this fixed-harness horizontal test, we see that the gap between 17 minutes and 88 minutes is essentially a combined reflection of engineering robustness and model instruction-following ability. Developers should move beyond pure parameter worship and turn to refined tuning of action turns, retry strategies, and context management. With the support of general-purpose container and log monitoring services on cloud platforms such as Baidu AI Cloud, they can build truly efficient and reliable agent applications.