Özer Cem KELAHMETKELAHMET
AI Simulations · Agents

Parallel versus sequential tool calls: waves, the critical path and agent latency

An agent that sends one tool call per model turn pays for every latency and every turn. Sending independent calls together makes each wave last only as long as its slowest call. Change the turn time, edit the trace and watch the speed-up and the critical path.

Download Markdown

Interactive simulation. It needs JavaScript; the text below explains what it shows.

What you are looking at

Each row is one tool call from a single run of a research agent: three web searches, a notes file, four page fetches, a SQL query, a vector search, a code sandbox, a calculator, a report file, a checks run and a final post. The wave column is the call's dependency level. Wave 1 calls need only the user's question; a wave 2 call needs some result from wave 1, and so on. The last column is the tool's latency in seconds, the kind of number you read off a span in LangSmith or Langfuse.

The chart puts every call at its wave. The solid steps show how long each wave lasts when its calls run together: as long as its slowest call. The dashed steps show the same wave when the calls run one after another: the sum of their latencies. The gap between the two lines is the time parallel calls save. The bars show the idle time of each call: how long it sits finished, waiting for the slowest call in its wave.

The algorithm

An agent loop alternates two kinds of work: a model turn, where the model reads the latest results and writes the next tool calls, and tool execution. Let n be the number of calls, ℓ_i the latency of call i, W the number of waves and t_llm the time of one model turn.

Sequential. With one call per turn, the model takes a turn before every call and one more to write the answer:

T_seq = Σ ℓ_i + (n + 1) × t_llm

Parallel waves. If the model emits all the calls of a wave in one response and the runtime executes them concurrently, each wave ends when its slowest call returns. The sum of those maxima is the critical path of the run:

T_par = Σ_w max_(i in w) ℓ_i + (W + 1) × t_llm

Speed-up and idle time. The speed-up is S = T_seq / T_par. Each call's slack is the wave's maximum minus its own latency. The ratio of total tool time to the critical path is the average number of calls in flight while tools run.

Worked example. With the default 2-second turn, the fifteen calls add up to 34.6 s of tool time. Run one by one with sixteen turns, the agent takes 34.6 + 16 × 2 = 66.6 s. The slowest calls of the five waves are 2.3, 4.4, 5.2, 7.8 and 0.6 s, so the critical path is 20.3 s, and with six turns the parallel run takes 20.3 + 6 × 2 = 32.3 s. That is a speed-up of 2.06 times, or 51.5% less waiting. Fast calls spend 28.4 s in all waiting for slower siblings, and on average 1.70 calls are in flight. At 500 runs a day, the saving is 4.76 hours of waiting.

Notice where the gain comes from: 14.3 s from overlapping tools (34.6 − 20.3) and 20 s from the ten model turns that are no longer needed. When turns are slow, removing turns matters as much as overlapping tools.

Things to try

  • Set the model turn time to 0. Only the tool overlap is left: 34.6 s against 20.3 s, a speed-up of 1.70 times. Raise it to 4 s and the speed-up grows to 2.23 times, because each saved turn is now worth more.
  • Change call 8 (the slowest page fetch) from 4.4 to 1.5 s. The parallel run only drops from 32.3 to 31.5 s, because call 6 at 3.6 s becomes the slowest in wave 2. Speed up the slowest call of a wave, but expect the next one to take over.
  • Change call 14 (the checks run) from 7.8 to 3.9 s, as if you split the checks into two parallel shards. The critical path falls to 16.4 s and the run to 28.4 s.
  • Move call 15 into wave 4 by setting its wave to 4, as if the summary did not need the checks. There are now four waves, the run takes 29.7 s and the speed-up rises to 2.24 times.
  • Look at the bars: call 13 waits 7.6 s for call 14. A long call in a wave is a cue to start it earlier or to move cheap work out of its wave.

How it works in real systems

Both major APIs let the model return several tool calls in one response. In the Claude API, parallel tool use is on by default; you turn it off with disable_parallel_tool_use: true inside the tool_choice object, and all the tool_result blocks must come back together in the next user message. The documentation also suggests a system prompt line asking the model to invoke independent tools simultaneously. In the OpenAI API the model may call several functions in one turn, and setting parallel_tool_calls to false limits it to zero or one call (see function calling).

Emitting calls together is only half of it: the runtime must also execute them concurrently. The Claude Agent SDK runs read-only tools such as Read, Glob and Grep concurrently, but runs tools that change state, such as Edit, Write and Bash, one at a time to avoid conflicts. That is the reason for waves: calls that write shared state belong in their own wave even when the model could send them together. In LangGraph, parallel branches of the graph run in the same super-step for the same effect.

At a larger scale the same idea becomes fan-out. Anthropic reports that its research system has the lead agent start 3 to 5 sub-agents in parallel, each of which uses 3 or more tools in parallel, and that these changes cut research time by up to 90% for complex queries. The price is tokens: Anthropic also reports that multi-agent systems use about 15 times more tokens than chats.

Parallel calls also have limits this model leaves out: rate limits on a shared service (see retries and backoff), longer model turns when many results arrive at once, and wasted work when a later result shows an earlier call was not needed. Measure the waves in your own tracing data, paste them in, and weigh the time saved against your cost and latency budgets. The agent loop token cost simulation shows the token side of every extra turn.

Sources

Last updated Nov 24, 2026
Type to search.
    ↑↓ navigate↵ open