Beyond Inference Speed: What Determines Delivery Time for AI Agent Tasks
This article explains why token generation speed alone does not determine how long an AI agent task takes to deliver. It breaks total task time into inference, tool calls, waiting, context management, and acceptance. It also covers how to weigh parameter scale against compute depth, why tool use does not guarantee domain correctness, and how to run a pilot with reproducible metrics and plan schedules using P50 and P90 durations.
1. From Throughput Figures to Delivery Time
Model throughput is usually advertised as the generation rate of a single request, measured in tokens per second (Token/s). That figure measures only the generation stage. The completion time of an agent task, however, is the sum of several stages in sequence, and generation speed is only one of them.
End-to-end time can be estimated with the following formula:
T_task = Σ(T_inference + T_tool + T_wait + T_context) + T_acceptance
The terms are defined as follows. T_inference is the time the model spends generating its reasoning and output. T_tool is the time spent reading files, running commands, and calling external services. T_wait is idle time caused by queuing, rate limiting, and retries. T_context is the overhead of reprocessing input, summarizing, or compressing context as it grows. T_acceptance is the time spent checking results, whether by people or by automated checks.
In this formula, the largest term is often not T_inference. A task that calls tools dozens of times and reads many engineering files can run for hours in total, even when each inference round is fast.
2. Four Stages of Task Time
2.1 Inference
Generation speed depends on output length, concurrent load, the server’s queuing policy, and acceleration techniques. The same model can perform noticeably differently at different times. When evaluating a model, look at P50 and P90 percentiles rather than only peak figures. Peak values usually come from ideal conditions and do not represent typical scheduling.
2.2 Tool Calls
Each tool call has three steps: the model decides which tool to call, the external environment performs the operation, and the result returns to the model. If the execution environment needs to compile, render, or run simulations, a single call can take minutes. Reducing the number of calls usually helps more than making each call faster. Common practices include merging file reads, caching content already read, and combining several checks into one batch.
2.3 Context Management
The longer the context, the more input tokens each round must process, and the compute cost rises accordingly. Compressing context can ease this problem, but compression loses detail. The model may then reread files or repeat reasoning, which adds rounds. The goal of context management is to keep the information needed for decisions while controlling total length.
2.4 Acceptance
Whether the result is correct determines whether the task is truly complete. Automated tests, format checks, and human review all take time. If acceptance is ignored, the apparent delivery time shrinks, but the rework time moves to later stages.
The code below estimates the time breakdown for a single task. The data is for demonstration only and does not reflect measured results for any model.
from dataclasses import dataclass@dataclassclass TaskStep:name: strinference_s: float # Model generation time (seconds)tool_s: float # Tool execution time (seconds)wait_s: float # Queuing and retry time (seconds)context_s: float # Context processing time (seconds)def estimate_task_hours(steps, review_s):total = sum(s.inference_s + s.tool_s + s.wait_s + s.context_sfor s in steps)return (total + review_s) / 3600steps = [TaskStep("Read project files", 20, 5, 10, 15),TaskStep("Generate initial plan", 120, 0, 0, 30),TaskStep("Run checks and fix issues", 300, 240, 60, 90),]print(f"Estimated duration: {estimate_task_hours(steps, review_s=1800):.2f} hours")
In this example, inference is not the largest part of the total. Tool execution and retries during the check-and-fix step take up most of the time. Optimization should focus first on the longest stage.
3. Trade-offs Between Parameter Scale and Compute Path
There are two main ways to improve model capability. One is to increase the parameter count. The other is to increase the computation depth for each token. One approach to the second option is to run the same group of network layers several times within a single forward pass. Looped structures that reuse weights do not increase the parameter count in proportion to the number of repetitions. However, each token passes through more computation steps, so latency rises.
The benefits of this design usually appear in multi-step reasoning and long-chain tasks. The costs appear in response latency and inference cost. When choosing a model, consider the following:
- Parameter count: When growth is limited, memory usage is close to that of a model of the same scale.
- Compute per token: Increases with the number of repetitions.
- Time to first token and total time: Usually longer.
- Suitable scenarios: Multi-step reasoning and tasks that require repeated verification.
- Validation: Benefits must be confirmed on your own task set, not only on general leaderboards.
For this reason, do not compare models by parameter scale alone. A more useful metric is the ratio of quality to end-to-end time on your target tasks.
4. Tool Use Capability and Domain Correctness
Being able to call tools does not mean understanding domain constraints. Take 3D animation, computer-aided design (CAD), and mechanical design as examples. Generated results must still satisfy physical constraints, dimensional standards, and safety regulations. A model can write a script that runs, but whether the geometry it generates meets strength requirements must be judged with professional tools and by qualified people.
Three layers of checks are recommended:
- Format and syntax checks: Confirm that the output can be parsed and that the file structure is complete.
- Rule and simulation checks: Use deterministic rules or simulation programs to verify key metrics.
- Domain expert review: Have a qualified expert sign off on results that affect safety or compliance.
Responsibility should be defined before the pilot begins. The process documentation should state which steps the model completes automatically and which steps require human confirmation.
5. Pilot Evaluation Method
The goal of a pilot is to obtain reproducible data that supports the decision to expand or stop. The recommended steps are:
- Define a task set: Select 20 to 50 tasks from real work orders and grade them by risk level.
- Fix the environment: Keep tool versions, input data, and access permissions consistent so that results are comparable.
- Record metrics: End-to-end duration, number of tool calls, total context tokens, rework count, cost per task, and acceptance pass rate.
- Set a baseline: Compare against the existing manual process or the current approach to measure the relative benefit.
- Set decision thresholds: For example, expand usage only when the acceptance pass rate reaches a preset value and the cost per task is below a set fraction of manual cost.
Duration data should be presented as percentiles. The code below summarizes P50 and P90 for a set of task durations.
from statistics import quantilesdef summarize_durations(durations_min):# At least two samples are required to compute quantilesq = quantiles(durations_min, n=10)return {"P50": round(q[4], 1), "P90": round(q[8], 1)}sample = [42, 55, 61, 74, 80, 95, 110, 132, 160, 210]print(summarize_durations(sample))
P50 reflects the typical case. P90 reflects the margin to reserve in schedules. Looking only at the average can hide the effect of long-tail tasks.
6. Budget and Scheduling Recommendations
Schedules should not be derived directly from speed figures in demo videos or product launch events. A practical approach is:
- Break tasks down to the stage level, and estimate P50 and P90 for each stage separately.
- Schedule using P90, and reserve time for acceptance and rework.
- Tie compute budgets to delivery volume, not to a single speed metric.
- Set observation metrics for each stage to identify bottlenecks early.
7. Common Misconceptions
Misconception 1: Treating token generation speed as delivery speed. Fast generation only means each step is fast. A task consists of many steps.
Misconception 2: Treating demo tasks as production tasks. Demos are usually selected in advance, use clean inputs, and run in stable environments. Production tasks have uneven input quality and more failure paths.
Misconception 3: Ignoring acceptance cost. Acceptance is often underestimated early on, but the cost of rework is usually far higher than the cost of one thorough check.
Whether an agent solution is worth investing in depends on one key question: can it produce results that pass acceptance within a controllable time and cost?
