Why AI Agents Are Still Slow After LLM Inference Speeds Improve

    This article explains why faster token generation does not necessarily make AI agent tasks faster. It separates single-token throughput from end-to-end task latency, then examines the real bottlenecks: longer computation paths, multi-step agent loops, tool execution, context compression and state management, and artifact validation. It also outlines practical engineering optimizations, including task latency breakdowns, loop limits, parallel execution, unified artifact and log storage, and business-level evaluation metrics. The goal is to help developers assess and improve real-world agent delivery time rather than relying on generation speed alone.

    1. Introduction: Faster Generation, but Slow Task Delivery

    As large language models continue to evolve, inference throughput and time to first token remain important indicators of model-serving experience. Recently published data from a general-purpose LLM service shows that single-token generation speed can reach a high level during off-peak hours, while slowing down during peak hours. This kind of data confirms that the efficiency of the underlying inference stack is improving.

    However, many developers encounter a different situation in real projects: individual tokens are generated quickly, yet a complete task may take hours to finish. For example, a 3D animation generation task involving physics calculations may include script writing, scene modeling, motion trajectory calculation, render configuration, and result validation. The model produces text quickly, but the overall task does not shrink at the same pace.

    This reveals a key issue: token generation speed measures local throughput, while task delivery time depends on the entire execution chain. For teams building agent applications, automated development workflows, or multimodal content production platforms, focusing only on model output speed can lead to underestimating real engineering costs.

    This article analyzes why “the model is faster but the task is still slow” from the perspectives of computation paths, agent loops, context management, tool calls, and artifact acceptance, and provides actionable evaluation and optimization ideas.

    2. Single-Token Speed and Task Duration Are Different Metrics

    2.1 What Single-Token Speed Measures

    Single-token speed usually indicates how many text segments a model generates per unit of time. It reflects the baseline throughput of the model during inference and is suitable for evaluating interactive experiences such as chat responses, code completion, and short-text generation.

    Its advantage is that the metric is intuitive and easy to compare across models. However, it does not fully describe performance on complex tasks, because it covers only the “generation” stage and excludes task planning, document reading, tool execution, result checking, and failure retries.

    2.2 Task Duration Is the Sum of Multiple Stages

    A complex task often follows this flow:

    1. User goal input
    2. -> Task decomposition
    3. -> Read context and reference material
    4. -> Call tools or execute code
    5. -> Multiple rounds of model inference
    6. -> Result validation
    7. -> Retry on failure or human confirmation
    8. -> Final artifact delivery

    If any step takes longer, the overall task time increases. Even if model generation speed doubles, the final experience may still be slow when tool calls, file parsing, and acceptance checks account for most of the time.

    2.3 Demo Performance and Engineering Timelines Are Not Directly Comparable

    Product demos usually show the ideal path: clear input, complete material, available tools, and a result that passes on the first attempt. Real business scenarios, however, often involve edge cases, permission restrictions, missing data, and inconsistent formats. Engineering leaders need to evaluate not “whether the model can write,” but “whether the model can deliver reliably under given constraints.”

    Therefore, model evaluation should establish three layers of metrics:

    • Model-level metrics: generation speed, context length, and structured-output stability;
    • Agent-level metrics: number of tool calls, task rounds, failure rate, and retry count;
    • Business-level metrics: delivery time, human-intervention ratio, acceptance pass rate, and cost per task.

    3. Longer Computation Paths: Same Parameter Count, More Complex Inference

    3.1 Shared Weights and Multi-Round Computation

    Improvements in LLM capability do not depend only on increasing parameter count. A common approach in the industry is to reuse some network layers for multiple rounds of computation under the existing parameter scale. For example, several layers may share parameters and run two computation passes. The total number of parameters does not increase significantly, but the computation path becomes longer.

    An analogy: the orchestra has the same number of musicians, but the same complex score is performed twice. The expression may be more refined, but it also takes more time.

    3.2 Practical Impact on Developers

    This design may improve performance on complex reasoning, but it has two engineering consequences:

    • The computation per inference increases, and the cost per token may rise;
    • Cumulative latency in long tasks is amplified, especially in multi-round call scenarios.

    Illustrative pseudocode:

    1. # Simplified illustration of multi-round execution over shared layers
    2. hidden = embed(input_tokens)
    3. for layer in shared_layers:
    4. hidden = layer(hidden)
    5. # Second pass reusing the same set of parameters
    6. for layer in shared_layers:
    7. hidden = layer(hidden)
    8. output = decode(hidden)

    Real systems involve attention caching, batch scheduling, GPU memory management, and parallelism strategies, and are far more complex than the illustrative code. From a task perspective, however, the core conclusion is: enhanced model capability may come from a longer computation path, not faster generation speed.

    4. The Real Time Cost of Agent Tasks Comes from Loops, Not a Single Generation

    4.1 An Agent Is Not a One-Shot Q&A

    Agent tasks are usually driven by a model loop. In each round, the model must assess the current state, choose a tool, parse the return value, and decide the next step. For complex tasks, the number of rounds can grow quickly.

    A simplified agent loop:

    1. for step in range(max_steps):
    2. decision = model.generate(state)
    3. if decision.type == "tool_call":
    4. result = tool_registry.execute(decision)
    5. state = update_state(state, result)
    6. elif decision.type == "final":
    7. return decision.output

    If each round of model generation takes only a few hundred milliseconds, but each round of tool execution takes seconds or even minutes, total duration is mainly determined by tools and state updates.

    4.2 Tool Calls Are the Main Variable

    Common tools include code execution environments, file reading, database queries, log retrieval, object storage access, container job submission, and monitoring/alert queries. Each type of tool has its own latency:

    • File parsing may depend on file size and format;
    • Code execution may depend on dependency installation and resource limits;
    • Data queries may depend on indexing and concurrency;
    • Asynchronous tasks require status polling, adding further waiting.

    Therefore, when optimizing task duration, start by profiling the tool-time distribution rather than focusing only on model generation speed.

    5. Context Compression and State Management Amplify Long-Task Costs

    5.1 Long Tasks Inevitably Produce Large Amounts of Intermediate Information

    Complex tasks accumulate tool outputs, error logs, code snippets, design descriptions, and additional user requirements. As the context keeps growing, the system usually needs to compress, summarize, or store it in segments.

    Context compression itself consumes model-call resources. If the compression strategy is poor, it may also drop critical constraints and cause rework later.

    5.2 State Design Recommendations

    A combination of “short-term context + long-term memory + structured task state” can be used:

    1. {
    2. "task_id": "demo-001",
    3. "goal": "Generate a 3D animation",
    4. "constraints": ["Physics parameters must be reproducible", "Output format is fixed"],
    5. "completed_steps": ["Script generation", "Scene setup"],
    6. "pending_steps": ["Motion calculation", "Render validation"],
    7. "artifacts": ["scene.json", "motion_plan.json"]
    8. }

    Saving key state in a structured form reduces repeated reads and unnecessary inference. It also makes it possible to resume from a checkpoint after failure instead of starting over.

    6. As Code-Oriented Tasks Expand, Acceptance Cost Becomes a New Bottleneck

    6.1 Code Becomes a Universal Interface for Operating the Digital World

    When videos, 3D scenes, mechanical structures, and simulation workflows are all expressed as code or configuration, the model can operate many kinds of digital assets by generating scripts. This expands the model’s applicability but also increases artifact complexity.

    6.2 Acceptance Is More Than “Was It Generated?”

    For code artifacts, an automated checking mechanism should be established:

    • Syntax and format checks;
    • Unit tests or rule validation;
    • Resource reference integrity checks;
    • Key parameter range checks;
    • Result reproducibility checks.

    Illustrative acceptance flow:

    1. Generate artifact -> Static checks -> Rule validation -> Sandbox execution -> Metric comparison -> Manual spot check

    Without an acceptance stage, a task may appear complete but actually require multiple rounds of rework, increasing final delivery time.

    7. Optimization Recommendations for Engineering Deployment

    7.1 Build a Task-Time Breakdown Table

    Record the time spent at each stage: planning, reading, model generation, tool execution, validation, and retries. Only by identifying the main time consumers can optimization have a clear direction.

    7.2 Control Agent Rounds

    Set a maximum number of rounds, per-round timeout, tool timeout, and failure threshold. For repeated failures, exit early and hand off to a human instead of looping indefinitely.

    7.3 Parallelize Independent Tasks First

    If multiple file reads, test executions, or resource checks are independent of each other, process them in parallel through message queues, container platforms, or asynchronous task mechanisms to reduce waiting time.

    7.4 Store Artifacts and Logs in a Unified Way

    Write intermediate artifacts to object storage, connect runtime logs to a logging service, and use monitoring and alerting to observe changes in failure rate and latency. This makes recovery easier and supports post-incident review.

    7.5 Evaluate Model Value with Business Metrics

    Do not judge whether a model fits the business based only on generation speed. Evaluate delivery time, stability, human-intervention rate, and cost per task together. Only when improved model capability translates into reliable delivery does it have engineering value.

    8. Conclusion

    Higher single-token generation speed is an important signal of improved LLM-serving efficiency, but it is not the only factor determining the experience of complex tasks. Shared weights, multi-round computation, agent loops, tool calls, context compression, and artifact acceptance all affect final delivery time.

    For developers and enterprise users, a more mature evaluation approach is to adopt an end-to-end perspective: move from model metrics to task metrics, and then from task metrics to business metrics. Only by measuring generation capability, tool ecosystems, state management, and acceptance mechanisms within the same framework can the real business value of LLMs be assessed accurately.