Benchmarking Agent Efficiency Across Models with a Fixed Harness

    This article explains why strong model benchmark scores do not always translate into fast agent delivery, and how to evaluate and improve agent execution efficiency when the engineering harness stays fixed. It outlines six variables to hold constant for a credible comparison, breaks down four observed behavior patterns into effective reasoning, tool waiting, failure rollback, and retry backoff time, and details four engineering levers: action turns, tool call success rate, retry and backoff policy, and context management. A reusable evaluation checklist and a sample retry policy are included.

    1. Why a Fast Model Is Not a Fast Agent

    Once agent applications move into the engineering phase, many teams hit the same puzzle: models that score similarly on general benchmarks can differ several times over in end-to-end latency once they are plugged into the same business workflow. The reason is straightforward. Benchmarks measure single-turn generation quality or inference speed, while real tasks are multi-turn loops of perceive, plan, act, verify, and roll back.

    The original experiment is a useful reference. The execution framework (harness) was fixed to one in-house agent collaboration framework, and the task description, input materials, context window strategy, browser automation capability, and acceptance rules were all kept identical. Only the underlying model was swapped. Four models of medium or smaller parameter size were compared, one of them serving as a long-context baseline. The key to the design is the single variable: it makes latency differences attributable to the model’s own behavior rather than to framework capability.

    This article does not repeat any specific product conclusions. Instead, it abstracts this kind of experiment into a general technical question: with a fixed engineering shell, how do you evaluate and improve a model’s agent execution efficiency?

    2. Experimental Design: Collapsing the Variables to One

    A credible agent comparison needs at least six categories of variables held fixed:

    1. Task and acceptance criteria: identical deliverable format, feature checklist, and acceptance scripts, so the scoring standard cannot drift.
    2. Materials and initial context: the same requirements document, design files, and data samples, plus the same system prompt.
    3. Tools and runtime environment: the same browser automation capability, file read/write permissions, and terminal execution sandbox.
    4. Context management strategy: the same truncation, summarization, and retrieval backfill rules.
    5. Retry and backoff policy: the most easily overlooked item, and the one with the largest impact on total latency.
    6. Timing methodology: record first-success latency, total latency including reruns, number of action turns, and number of tool calls.

    Only when the timing methodology is explicit are comparison results actually comparable. Many teams report only the final completion time while hiding internal automatic retries, which severely distorts the data.

    3. Process Data Matters More Than Result Screenshots

    All four models completed the task, but their paths differed enormously, falling into four typical behavior patterns:

    • First-pass type: finished in about seventeen minutes with few action turns and few wasted calls, indicating strong planning and self-verification.
    • First-round failure, full rerun type: failed acceptance on the first attempt, then accumulated about one hour and twelve minutes after a rerun. Failures here usually stem from misreading the acceptance rules rather than from coding ability.
    • Implicit internal retry type: no explicit full rerun, but the framework triggered three automatic retries internally, for a total of about eighty-eight minutes. This case is the most dangerous, because it looks like nothing failed while a stability problem is being masked by retries.
    • Backoff-sensitive type: after two consecutive failures under the default retry policy, the backoff window had to be extended before completion, for a cumulative first success at about one hour and four minutes.

    Plot these four patterns as a latency composition chart and the total time splits into four segments: effective reasoning time + tool waiting time + failure rollback time + retry backoff time. Except for the first segment, the other three are determined almost entirely by engineering factors.

    4. Four Engineering Variables That Decide Agent Efficiency

    4.1 Action Turns and Planning Granularity

    The number of action turns is the most direct efficiency lever. Planning that is too coarse overloads a single turn and raises the failure rate; planning that is too fine introduces large amounts of unproductive back-and-forth. A practical approach is to have the model first output a list of acceptance-ready subtasks, then execute them one by one.

    4.2 Tool Call Success Rate

    Failures in browser operations, file writes, and command execution multiply latency. Set a timeout, an idempotency key, and structured error codes for each type of tool so the model can read the failure reason instead of retrying blindly.

    4.3 Service Stability and Retry Backoff

    Retry policy must distinguish error types: use exponential backoff with jitter for recoverable errors, and abort immediately for unrecoverable ones, rolling back to the last stable state. The logic below is illustrative:

    1. def call_with_policy(fn, max_attempts=3, base=1.0):
    2. for i in range(max_attempts):
    3. try:
    4. return fn()
    5. except RecoverableError as e:
    6. if i == max_attempts - 1:
    7. raise
    8. time.sleep(base * (2 ** i) + random.random())
    9. except FatalError:
    10. raise # do not waste turns

    4.4 Context Management

    The long-context baseline model’s advantage is fewer retrieval backfills, at the cost of higher single-turn latency. In practice, layered context is more reliable: persistent system constraints plus a rolling summary plus on-demand retrieval, rather than stuffing all materials into the window at once.

    5. A Reusable Evaluation and Optimization Checklist

    • Replace manual visual inspection with fixed acceptance scripts to guarantee repeatability.
    • Record both first-success latency and total latency including retries, so the data cannot be dressed up.
    • Track the success rate and average wait time of each tool type to locate bottlenecks.
    • Give each model an action turn budget, and trigger a fallback strategy once it is exceeded.
    • Treat the retry policy as a separate experimental variable and run a sensitivity analysis on it.
    • Capture full-chain tracing in the container platform and logging service so every failure can be reviewed.

    6. Conclusion

    Positioning a model as low-cost or high-speed describes only one facet of its capability. Real agent efficiency is determined jointly by action turns, tool call success rate, service stability, and context management. For engineering teams, rather than chasing a single metric, it is better to make the execution framework an observable, rollback-capable, reproducible foundation. This is also the direction repeatedly validated in Baidu AI Cloud’s agent engineering practice: only with a stable engineering shell in place do differences in model capability turn into measurable delivery efficiency.