AI agent glossary
Parallel tool calls
When a model requests several tool calls in a single response, so your code can run them at the same time and return all the results together.
Many tasks need several independent pieces of information: the weather in three cities, the contents of four files, the results of two searches. Instead of asking for them one at a time across several turns, a model can request all of them in one response.
In the Anthropic Messages API this shows up as multiple tool_use blocks in one assistant message. Your code should run each one, ideally concurrently, and send back a single user message containing a tool result for every request, each matched by its ID.
Parallel calls reduce latency and the number of round trips, which also saves tokens. They only make sense for independent operations; if one call depends on another's output, the model has to wait for the first result before making the second request.
Asked to compare three competitors' pricing pages, a research agent issues three fetch calls in one response. Your code runs them concurrently and returns all three pages in the next message.
Learn more in the course
Related terms
Go from definitions to doing
Learn to use and build AI agents in 65 practical lessons.