esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Letโ€™s talk

Iโ€™ll build the agent for it.

What Is Parallel Tool Calling?

How an AI model asks for several tools in one reply, when your code can run them at once, and where it goes wrong, explained simply for your AI interview.

In short

Parallel tool calling is when an AI model asks for several tools in one reply, so your code can run them at the same time. It saves waiting when the calls don't depend on each other, and it needs care when a call changes data.

10 min readIntermediateOccasional ยท estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Parallel tool calling means the model can ask for several tools in one reply. Take a claim that needs a policy lookup, a claim history and a payment. The first two only read, so my code runs them together. The payment changes money, so the model asks for it in a later reply, after it has read both answers. In Anthropic's API, every call gets one result back, sent together in one message.

What is parallel tool calling, in plain words?

A model can ask your code to run a tool, such as a policy lookup. Parallel tool calling is when it asks for several tools in one reply, instead of one at a time.

Think of a claims handler at an insurance office. She emails the policy team, the claims archive and the repair network in one go, rather than waiting for each reply before writing the next email. Only the emails that don't depend on each other can go out together.

An AI claims agent works the same way. For claim CL-40718 it needs the policy, the claim history and then a payment. The two lookups can run together. The payment waits, because it changes money.

Key words

Tool call
The model asking your code to run a function, such as a policy lookup.
Batch
All the tool calls the model asks for in one reply.
Side effect
A change in the outside world, like moving money or sending a letter.
Tool result
The answer your code sends back for one call, matched to it by its id.

How does one batch of parallel calls work?

The loop is the same as normal tool calling, with one difference: a single reply from the model can hold several requests. Here is one round.

Two reads, one round

Model

asks for two reads in one reply

Reads: run together

get_policy(CL-40718)

reads the cover limit

get_history(CL-40718)

reads past claims

Claude API: results back

one message, one id per call

Model reads the results

answers, or asks for the payment

  1. 1The policy lookup is sent to your code.
  2. 2The history lookup is sent to your code too.
  3. 3The policy answer goes back with the other.
  4. 4The history answer goes back too.
  5. 5The model reads both results and decides what comes next.
The model asks for two reads in one reply. Your code runs them together and sends both answers back in one message. Once the model has read them, it asks for the payment in a second reply.
  1. 1

    Ask for several

    One reply can hold more than one tool call, and each call carries its own id.

  2. 2

    Run them

    Your code runs the independent calls together and keeps any dependent call for later.

  3. 3

    Send every answer back

    In Anthropic's API, one message holds one result per call, each matched to its call by id.

  4. 4

    Write the reply

    The model reads every result and answers, or asks for more tools.

  • โ€œSince model responses can include zero, one, or multiple calls, it is best practice to assume there are several.โ€

    OpenAI, function calling guide

When is it safe to run tool calls at the same time?

The test is simple: does a call need an earlier answer, or does it change something? A call that only reads, and needs nothing else, is usually safe to run in parallel. Anthropic's docs say it this way:

  • โ€œIndependent, read-only operations are usually safe to run in parallel for lower latency. Tools with side effects, shared state, or ordering requirements might be better run sequentially.โ€

    Anthropic, parallel tool use

  • Safe together

    Policy lookup and claim history

    Both only read. Neither needs the other's answer.

  • Run in order

    Payment after its checks

    The payment needs the fraud check first. Run it after that answer, never in the same batch.

  • Keep apart

    Two changes to one claim

    Two updates to the same record can overwrite each other. Run them one at a time.

How do you run a batch safely in code?

Here is a simplified claims batch. The two reads go into a thread pool, a set of workers that run jobs at the same time. The payment is not in this batch: the model asks for it in a later reply, after it has read both answers. We pretend the model asked for the two reads at once.

Python
# A simplified claims agent's batch. No real model: we pretend it asked for these calls at once.
from concurrent.futures import ThreadPoolExecutor

POLICY = {"CL-40718": "Home policy HOME-2231, cover 450000"}
HISTORY = {"CL-40718": "2024 water claim, paid"}
READS = {"get_policy": POLICY, "get_history": HISTORY}

def pay_claim(claim, amount):
    return "paid " + str(amount) + " on " + claim

def run_batch(calls):
    reads = [c for c in calls if c[0] in READS]
    # Reads change nothing, so they run together; map keeps the answers in call order.
    with ThreadPoolExecutor() as pool:
        results = list(pool.map(lambda c: READS[c[0]][c[1]], reads))
    # A payment changes money, so it is held until the next reply.
    results += ["held for the next reply: " + c[0] for c in calls if c[0] not in READS]
    return results

calls = [
    ("get_policy", "CL-40718"),
    ("get_history", "CL-40718"),
]
for line in run_batch(calls):
    print(line)
# In the next reply, the model asks for the payment after reading both answers.
print(pay_claim("CL-40718", 1800))

Output

Home policy HOME-2231, cover 450000
2024 water claim, paid
paid 1800 on CL-40718

The output shows the two reads, in call order. The payment comes in the next reply. Real code matches each answer to its call by id, as the Anthropic docs put it: "Match each result to its call with tool_use_id." A common bug is a missing result for one call, or a dependent call that ran too early.

Tip

Batch only calls that are independent of each other. Anthropic's docs suggest adding a line like this to your system prompt: "Only batch tool calls that are independent of each other." They also let you switch parallel calls off with disable_parallel_tool_use inside tool_choice, and OpenAI's guide offers parallel_tool_calls set to false.

How would you speed up a slow claims agent?

A claims agent answers slowly. Its log shows the policy lookup, then the history, then the payment check, each waiting for the one before. The first two don't need each other. How do you fix it?

  • Before

    One call after another

    Every call waits for the one before, so the user waits for all of them.

  • After

    Reads together, writes last

    The two reads run at once. The payment comes after its check, in its own reply.

Then I would measure it. Count how many times your code sends a request and waits for the model's reply, per claim, before and after, rather than guessing the gain.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: the model can ask for several tools in one reply.
  • Your code runs the calls, so your code sets the order.
  • Reads can run together; anything that changes data runs in order and gets checked.
  • For Claude: one result for every call, sent back together in the next message.
  • How to turn parallel calls off when order matters.
  • Errors: a dependent call that fails gets an error result, never silence.

Common traps

  • Trap"Parallel calls always make the app faster."

    BetterOnly for independent calls. A dependent call run early fails or acts on the wrong data.

  • Trap"The model runs my tools in parallel."

    BetterFor your own tools, your code runs them. The model only asks, so the order and the limits are yours to set.

  • Trap"Just send the results when they are ready."

    BetterFor Claude, every call needs its own result in the next message, even a skipped call marked as an error.

Can you spot the safe batch?

Spot the safe batch

Your claims agent asked for two calls in one reply. Which pair can run at the same time?

Quick check

A model asks for check_fraud_score and pay_claim in one reply. The payment should only happen if the score is low. What should your code do?

Can you answer these from memory?

Flash cards ยท tap a card to flip it

1 / 6

What will they ask next?

  1. Q156What is tool (function) calling?11 min
  2. Q175What makes a tool-calling loop reliable enough to ship?13 min
  3. Q176How should an agent handle tool errors and retries?14 min
  4. Q177What makes a good tool set?13 min
  5. Q179Excessive agency and least privilege?11 min

Last updated on 27 November 2026

Building an agent that calls several tools at once?

I design and build AI agents, including the UI and the system behind them. Book a short call and tell me which tools your agent calls, and which of them change data.