Evaluating LLMs for Long-Session AI Agents: Caching, Reasoning, Tool Stability, and Speed

    This article presents an evaluation framework for choosing LLMs in long-session AI Agent workloads. Using a silent gray-release test build as a case study, it covers four areas: prefix cache hit rate, the share of reasoning tokens, tool-call stability across multi-step chains, and latency and throughput. It also explains why stability and speed can matter more than raw intelligence in production Agent systems.

    1. A Real Gray-Release Test

    Recently, a model provider quietly released an intermediate build to a small share of users, with no announcement. Silent releases like this are common in the LLM industry. Providers use low-traffic gray releases to collect real call data and check how a new architecture or inference strategy performs under real workloads before deciding whether to launch it publicly.

    As a developer, I ran two rounds of hands-on tests on this build. The results were worth a closer look:

    • Cache hit rate of about 91.7%, with cache reads reaching 11 times the volume of uncached input;
    • Reasoning tokens made up 55.7% of total output tokens, and complex tasks almost never crashed midway;
    • Multimodal input was retained. The build can read images directly but cannot generate them;
    • Over a dozen consecutive local tool calls (reading a config, reading a ledger, running a diff, parsing JSON, and reading an image) all succeeded.

    Each figure looks modest on its own. Together, they outline what long-session Agent workloads actually need from a model. This article does not focus on one specific model. Instead, it uses this test to outline a method for evaluating models for Agent use.

    2. Cache Hit Rate: The Lifeline of Long-Session Cost and Latency

    2.1 Why a 91.7% Hit Rate Matters

    In an Agent workflow, every turn carries the full context: system prompt, tool definitions, message history, and intermediate outputs. An Agent session with 20 turns can accumulate input tokens that are dozens of times larger than its output. If each turn recomputes the entire prefix, cost and time-to-first-token (TTFT) get out of control.

    Prefix caching solves this problem. This widely used technique stores and reuses the key-value cache of previously computed context prefixes. An 11x ratio of cache reads to uncached input means that for every new unit of input, 11 units of earlier prefix are reused directly. This is the ideal pattern for long sessions.

    2.2 How to Reproduce and Verify This in Practice

    Developers can measure cache efficiency with the following approach (illustrative pseudocode):

    1. stats = {
    2. "total_input": 0,
    3. "cached_input": 0,
    4. "output": 0,
    5. }
    6. for step in agent_session:
    7. resp = llm.invoke(messages=step.context)
    8. u = resp.usage
    9. stats["total_input"] += u.input_tokens
    10. stats["cached_input"] += u.cached_tokens
    11. stats["output"] += u.output_tokens
    12. hit_rate = stats["cached_input"] / stats["total_input"]
    13. amplification = stats["cached_input"] / (
    14. stats["total_input"] - stats["cached_input"]
    15. )

    Keep three points in mind during evaluation:

    1. Use realistic session lengths. A 3 to 5 turn session will show a high hit rate for almost any model. Simulate at least 15 to 30 turns, with real tool results fed back in each turn.
    2. Keep the prefix structure stable. The system prompt and tool definitions must come first in the message sequence and stay byte-for-byte identical. Any changing content inserted mid-prefix invalidates the cache. This is a basic principle of Agent framework design.
    3. Check whether hit rate and latency move together. A high hit rate should show up as lower TTFT. If the hit rate is high but latency does not improve, the cache layer may not be working as intended.

    3. Reasoning Token Share: A Hidden Indicator of Complex-Task Stability

    3.1 What 55.7% Means

    “Think first, then answer” has become the mainstream approach for complex tasks. When more than half of the output consists of reasoning tokens, the model has done substantial internal planning and checking before taking its final action. In Agent workloads, this has clear value:

    • In multi-step tasks, each decision depends on an accurate understanding of earlier states. Thorough reasoning substantially reduces careless tool calls.
    • When inputs are unusual, such as malformed JSON or missing fields, reasoning gives the model room to correct itself. It does not emit a wrong action that breaks the chain.

    3.2 Two Common Misconceptions

    Misconception 1: More reasoning is always better. Reasoning tokens are billed and increase response time. A simple task, such as reading one file, does not need long deliberation. A better approach is to adjust reasoning depth based on task complexity, or to route tasks by difficulty at the orchestration layer.

    Misconception 2: Single-turn Q&A is enough to test reasoning. Single-turn questions cannot reveal the real value of reasoning. Build tasks that depend on more than five sequential steps. For example: read a config, extract the target path, read the file at that path, diff it against another dataset, and produce a structured conclusion. Measure end-to-end success rate, not per-step accuracy.

    4. Tool-Call Stability: The First Gate for Agent Deployment

    4.1 Designing a Discriminating Stress Test

    In my test, I ran over a dozen consecutive heterogeneous tool calls covering five typical capabilities:

    Step Type What It Tests
    Review configuration file Locating key fields in long text
    Read ledger-style data Accurate extraction from structured data
    Run diff comparison Aligning and summarizing two inputs
    Parse JSON Format robustness and error tolerance
    Read image directly Multimodal understanding

    No call failed, and no parameter path drifted. This is more convincing than a “99% single-call success rate.” An Agent chain succeeds only if every step succeeds, so its overall success rate is the product of the per-step rates. At 99% per step, a 15-step chain succeeds only about 86% of the time. Zero failures across the full chain is the real bar for production use.

    4.2 A Checklist for Evaluating Tool Stability

    Build your own evaluation set that covers at least these areas:

    1. Parameter correctness: Do tool inputs match the schema exactly in paths, field names, and types?
    2. Error recovery: Deliberately make one tool return an error. Does the model retry, switch to another path, or give up?
    3. Context consistency: Does the intermediate result used in step N actually come from the output of step N-1, or did the model make it up?
    4. Termination: Does the model stop correctly when the task is complete, without falling into pointless extra call loops?

    5. Speed: An Underrated Factor for Experience and Cost

    The most obvious difference in this test was output speed. Compared with earlier builds in the same series, the new build returned results almost before I finished phrasing the next instruction. In Agent workloads, speed matters beyond user experience:

    • Interactive Agents such as coding assistants and ops copilots are highly sensitive to latency. Waits of more than a few seconds break the user’s train of thought.
    • Serial multi-step chains add up their per-step times. A 50% speedup per step nearly halves the end-to-end time of a 15-step chain.
    • Retry budget: A faster model leaves room for another retry when a step fails, which indirectly improves overall reliability.

    When measuring speed, record both time-to-first-token (TTFT) and output tokens per second (TPS), and group results by task type. Short tasks depend mostly on TTFT. Long-generation tasks depend mostly on TPS.

    6. Interpreting an Intermediate Build With Limited Intelligence Gains

    An honest observation about this gray-release build is that its raw intelligence, measured by hard-problem solving, improved only modestly over the previous version. Its gains in stability and speed were substantial. This raises a common selection question: when a model cannot be both smarter and more stable and faster, which should an Agent workload prioritize?

    My view is clear. For most production Agent applications, the marginal value of stability and speed is higher than the marginal value of extra intelligence. There are three reasons:

    1. Agent tasks usually fail not because the model lacks ability, but because it drifts. It calls the wrong tool, produces malformed output, or loses context. Stability addresses exactly these failures.
    2. Orchestration can compensate for limits in intelligence through task decomposition, multi-round verification, and human-in-the-loop review. Orchestration cannot compensate for chain instability.
    3. Speed and cache efficiency directly determine unit cost. Cost control is a precondition for scaling an Agent to production.

    7. Conclusion

    A silent release without an announcement can still be a useful window into a model’s engineering quality. Setting aside brand names and version numbers, the framework in this article applies to any model selection:

    • Use cache hit rate and amplification ratio to assess long-session economics.
    • Use reasoning token share and multi-step end-to-end success rate to assess reliability on complex tasks.
    • Use stress tests on heterogeneous tool chains to assess call stability.
    • Use TTFT and TPS, grouped by task type, to assess speed.

    An intermediate build is useful for exploring a direction. The stable and fast capabilities it shows are worth watching for in future official releases. For developers building Agents, creating your own evaluation set and testing against real business workflows is far more informative than chasing leaderboard scores.