All articles

Your Agent Is Only as Fast as Its Slowest Search

Agent tasks combine sequential searches and parallel waves, amplifying tail latency and cold starts. Set retrieval budgets from the task deadline, then measure per-call tails and end-to-end task latency together.

Several blue search paths converge at a shared junction, where one long winding path delays the continuation of the whole task.

A search that usually finishes quickly can still make an agent feel slow. The agent may need twenty searches before answering, and several may run together. Sequential delays accumulate; parallel work waits for the last required response. A fast median tells you little about either case.

The engineering lesson predates agents. In The Tail at Scale, Jeffrey Dean and Luiz André Barroso describe a service whose individual servers are slow only 1% of the time. A request waiting for 100 independent servers encounters that slow case about 63% of the time. An agent rebuilds this fan-out problem across its reasoning loop. Its retrieval budget belongs to the whole task.

Count the searches inside the task

An agent's retrieval critical path is the sequence of search operations whose completion gates the final answer. Dependent operations add their durations; concurrent operations contribute the time until the last required result arrives. Calls outside that path still consume capacity, but shortening them may leave the user's wait unchanged.

There is no universal search count. On BrowseComp-Plus, Table 1, proprietary models averaged roughly 6 to 26 search calls per question. GPT-5 with BM25 averaged 23.23. These are measurements on a difficult research benchmark, not a prediction for every support bot. They do establish that one user question can exercise retrieval dozens of times.

Parallelism changes the shape. Anthropic's research system runs three to five subagents concurrently, with each making three or more parallel tool calls. Anthropic reports that this reduced research time by up to 90% on complex queries. Google's Deep Search announcement describes hundreds of searches for a question. Faster completion and greater exposure to slow dependencies can coexist.

Execution shape Retrieval time, excluding orchestration What to inspect
Dependent chain Sum of search durations Number of steps and repeated cold reads
Parallel wave requiring every result Maximum search duration Slowest required branch
Consecutive parallel waves Sum of each wave's maximum Wave count, width and shared bottlenecks

A per-call tail becomes a task-level event

Define a tail event as a call exceeding a chosen latency threshold. If each call independently exceeds that threshold with probability p, a task with n calls encounters at least one such event with probability 1 - (1 - p)^n.

Using a 1% per-call event rate gives the following calculations:

Illustrative task Calls Probability of at least one tail event
One search 1 1.0%
Five branches with three concurrent calls each 15 14.0%
Chain approximating the BrowseComp-Plus example 23 20.6%
Six consecutive waves of fifteen calls 90 59.5%

The fifteen-call and ninety-call shapes are illustrations, not measurements of Anthropic's system. The calculation says how often a task encounters an outlier. It does not calculate task p95, and adding twenty-three per-call p99 values does not produce task p99. The full latency distribution, dependencies and execution graph determine those percentiles.

Real tails also share causes: an overloaded service, a cold tenant, a network interruption. Correlation changes the event probability and the severity of delays; independence is a planning approximation. Use traces to measure task p95 and p99 directly, alongside per-call tails. For a ninety-call task, a 1% per-call exception is already a majority-of-tasks event under the simple model.

Treat cold retrieval as a separate operating state

A cold query must fetch data or initialize serving resources that a warm query already has available. Its latency distribution differs from the steady-state distribution. Mixing both into one histogram can hide poor first-query behavior when most benchmark requests reuse the same index.

turbopuffer's architecture documentation gives a concrete vendor-reported example: p50 of 874 ms for the first query against one million documents, versus 14 ms for subsequent cached queries. Its architecture uses object storage with NVMe caching. Those figures describe that example, not a guarantee or a comparison against WarpSearch; its performance guidance explicitly recommends prewarming when the user opens a search or chat interface.

An agent can repeatedly enter this state if each branch opens a different idle namespace. Conversely, repeated queries against one namespace may pay the penalty only once. Namespace layout and access patterns determine which situation you have. Measure first-query latency after realistic idle intervals, then steady-state latency at realistic concurrency.

Choose mitigation by workload: prewarm on intent when there is advance notice, retain hot collections when the first response has a strict deadline, and accept cold reads for infrequent background work. Warm metadata alone does not guarantee warm posting lists or vector blocks. Test the actual query mix after warming.

Check whether retrieval is actually the bottleneck

Sometimes the model dominates. Esfandiarpoor and colleagues report average agentic retrieval time of 107.4 seconds versus 0.67 seconds for standard retrieval in their ViDoRe v3 experiments. They identify LLM inference overhead as the main scaling limitation. Saving 10 ms on each of twenty-three searches saves at most 230 ms of sequential time. That will not transform a hundred-second task.

Other workloads behave differently. The AgentSysBench preprint studies ten applications and finds non-LLM components dominating latency in five. That category includes tools and environments, not just search. The finding supports measuring the whole application rather than assuming either retrieval or inference always dominates.

Instrument model inference, search, document fetches, queueing and retries as separate spans. Record the collection and cache state when available, plus branch dependencies. Optimize retrieval when its slow calls block the next reasoning step, especially for interactive coding, voice or support tasks. If inference owns the critical path, work on inference and the number of reasoning steps first.

Fewer searches can help both sides. BrowseComp-Plus reports that changing GPT-5's retriever from BM25 to Qwen3-Embedding-8B raised accuracy from 55.90% to 70.12% while reducing average calls from 23.23 to 21.74. That result belongs to its dataset and harness, but it makes call count worth tracking alongside retrieval latency and answer quality.

Derive the search budget from the deadline

Start with an end-to-end deadline and reserve time for inference, fetching and response assembly. Allocate the remaining retrieval time across dependent stages. For example, a 1.2-second retrieval allowance across six equal-budget waves gives each wave 200 ms. Unequal stages need unequal allocations; this example just makes the arithmetic visible.

Now choose how often any required call may exceed its stage threshold. To keep that probability below 5% across ninety independent calls, the per-call exceedance rate must be about 0.057%, equivalent to roughly p99.943 at that threshold:

calls = 90
allowed_task_tail = 0.05
per_call_tail = 1 - (1 - allowed_task_tail) ** (1 / calls)
print(f"Per-call exceedance budget: {per_call_tail:.3%}")
# Per-call exceedance budget: 0.057%

This bounds a particular failure event under the stated assumptions. It is not an end-to-end SLO without accounting for everything else on the critical path. Replay representative traces, including idle tenants and bursty traffic, to validate the actual task distribution.

Apply controls that preserve the task's requirements:

  1. Propagate the remaining deadline into tools and retries; stop optional work when its answer can no longer help.
  2. Cache reusable results with permission, freshness and index-version boundaries in the cache key. Repeated phrasing alone does not establish safe reuse.
  3. Hedge eligible reads only with spare capacity and a cap on duplicate work. A second request to the same overloaded bottleneck can make things worse.
  4. Allow partial results only when missing a source is acceptable, and expose that incompleteness to the agent.

WarpSearch makes the cold-path choice explicit: its pricing documentation describes releasing an idle collection's worker after fifteen minutes and optional keep-warm. A cold request can return 503 warming_up with Retry-After, as documented in concepts; that retry belongs inside the task budget. Our engine efficiency post covers reducing underlying search work. Neither architecture nor algorithm names establish a tail-latency guarantee. Measure the deployed workload.

Key takeaways

  • Budget sequential chains and parallel waves according to their critical paths.
  • Report per-call tails, cold and warm behavior, and end-to-end task percentiles together.
  • Reduce calls when retrieval quality permits; preserve answer quality when imposing deadlines.
  • Validate the whole task under load. A fast median search is only one input.

Cookie settings

Optional tracking stays off until you choose it. Your choice applies to this browser for 180 days. Read the details.

Essential storage keeps you signed in, protects forms, and remembers this choice. It is always available.