AI Agent Efficiency: Comparing Models with a Fixed Harness

    A controlled comparison of four models using the same agent harness shows why low-cost and high-throughput labels do not reliably predict delivery efficiency. This article examines the experimental controls, completion times, and retry patterns, then identifies four practical efficiency factors: action steps, effective tool use, service stability, and context management. It also provides a checklist for reproducible evaluation.

    1. Why Reverse the Usual Evaluation Setup?

    When evaluating AI agents on complex frontend tasks, a common approach is to hold the model constant and compare execution frameworks, or harnesses. These experiments reveal which harness handles scheduling, tool orchestration, and context management better. But they leave a cost-related question unanswered: Once the harness is fixed, where do differences between models actually matter?

    This experiment reversed that setup. Every model used the same harness, task description, input assets, context window, browser capabilities, and acceptance criteria. The model was the only variable.

    The comparison covered four general-purpose models in the small-to-medium parameter range, anonymized here as Models A, B, C, and D. Their similar positioning around low cost and high throughput made them suitable for testing a specific hypothesis: Can positioning labels predict actual delivery efficiency?

    In this experiment, they could not. All four models eventually completed the task, but the differences in their execution paths were much larger than the differences in their final results.

    2. Experimental Design: Five Controls

    A credible comparison depends on controlling variables consistently. This experiment fixed five elements:

    1. Task: Each model built the same creative studio collaboration system, with five workflow states: project overview, inspiration board, asset positioning and comments, version approval, and publication preview. The system also had to support distinct permissions for creative directors, designers, and clients.
    2. Assets: Each model received the same openly licensed images and seed data for members, versions, and comments. No existing pages were provided as references, so the models had to develop the information architecture and visual design themselves.
    3. Context: All models used the same context window and task budget, preventing an advantage from having access to more context or more time to work.
    4. Tools: Browser automation capabilities were identical. Desktop and mobile checks used fixed viewports of 1440 × 1000 and 390 × 844, respectively.
    5. Acceptance: Screenshots of the first version had to be saved, only one repair round was allowed, and the final deliverables had to include code, screenshots, execution logs, review records, and a metrics file.

    The fifth control was particularly important. Allowing only one repair round helped separate the ability to get things right initially from the ability to succeed through repeated trial and error—a distinction many evaluations overlook.

    3. Execution Data Reveals More Than Final Screenshots

    The anonymized timing and retry results were:

    Model Full-run restart Internal automatic retries Cumulative time to first success
    Model A No 0 Approximately 17 minutes
    Model B Yes, once 0 Approximately 72 minutes
    Model C No 3 Approximately 88 minutes
    Model D No; backoff was adjusted after two consecutive failures under the default strategy Multiple, totaling 85 Approximately 64 minutes

    The visual outputs reflected different design preferences. One used a lightweight editorial style with especially readable structure. Another adopted a dark professional workspace with the highest information density and engineering completeness. A third emphasized brand identity and consistency on mobile. The fourth used an archive-style layout with thin-lined tables and serif headings.

    These differences suggest that aesthetic and architectural preferences are adjustable characteristics, rather than a simple ranking of capability. The larger efficiency gap lay in the number of actions required to reach an acceptable result.

    4. Four Factors Behind Actual Agent Efficiency

    4.1 Action Steps

    Completion time was strongly associated with the number of action steps, rather than generation speed within an individual step.

    Model C generated quickly in each step, but its three internal automatic retries repeatedly sent it through a failure, rollback, and restart cycle. This increased the total number of steps needed to finish.

    4.2 Effective Tool Use

    Browser operations were a major source of failure. Common problems included unstable selectors, pages that were not ready, and assertions executed too early.

    A key efficiency distinction was whether the agent diagnosed the failure before taking further action—by reading logs or inspecting the DOM state—instead of retrying blindly.

    4.3 Service Stability and Retry Strategy

    Under repeated failures, a default retry strategy can fall into a tight loop that wastes budget and clutters logs. A more robust approach uses exponential backoff with jitter and fails immediately on non-retryable errors, such as invalid parameters or insufficient permissions.

    1. import random, time
    2. RETRYABLE = {"rate_limit", "timeout", "upstream_5xx"}
    3. def call_with_backoff(fn, max_attempts=5, base=1.0, cap=30.0):
    4. for attempt in range(max_attempts):
    5. try:
    6. return fn()
    7. except Exception as e:
    8. code = getattr(e, "code", "unknown")
    9. if code not in RETRYABLE or attempt == max_attempts - 1:
    10. raise
    11. delay = min(cap, base * (2 ** attempt)) * (0.5 + random.random())
    12. time.sleep(delay)

    4.4 Context Management

    With the same context window, long-running tasks depend on when context is compressed and what information is retained.

    An effective strategy preserves confirmed facts, pending work, and failure causes while discarding verbose raw tool output:

    1. {
    2. "confirmed": [
    3. "Routing for all five workflow states is implemented",
    4. "Permissions for all three roles are active"
    5. ],
    6. "pending": ["Mobile viewport adaptation"],
    7. "failures": [
    8. {
    9. "step": "approve_flow",
    10. "reason": "selector_timeout"
    11. }
    12. ]
    13. }

    5. A Checklist for Reproducible Evaluation

    • Fix the harness, assets, context, tools, and acceptance criteria. Change only one variable at a time.
    • Capture screenshots of the first version and the final version after a single repair round, so unlimited refinement does not obscure initial performance.
    • Collect process metrics: action steps, tool calls, retries, failure-type distribution, token consumption, and budget usage.
    • Archive logs and metrics alongside the code so conclusions can be audited.
    • Limit conclusions to the task and configuration tested. Do not extrapolate them into a general capability ranking.

    6. Conclusion

    “Low cost” and “high speed” describe only part of a model’s behavior. Actual agent efficiency is better understood as the interaction of model capability × harness scheduling × tool reliability × context management. A weakness in any factor can be amplified over a long task.

    From an engineering perspective, the more valuable investment is to make retry backoff, state compression, and automated acceptance checks observable and configurable parts of the infrastructure. That is a more dependable way to reduce delivery costs than chasing a single leaderboard position.