Agno Agents can execute multiple tools concurrently, allowing you to process function calls that the model makes efficiently. This is especially valuable when the functions involve time-consuming operations. It improves responsiveness and reduces overall execution time.Documentation Index
Fetch the complete documentation index at: https://spacesail.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
When you call
arun or aprint_response, your tools will execute concurrently. If you provide synchronous functions as tools, they will execute concurrently on separate threads.Example
Here is an example:async_tools.py
- Provide your Agent with a list of tools, preferably asynchronous for optimal performance. However, synchronous functions can also be used since they will execute concurrently on separate threads.
- Run the Agent using either the
arunoraprint_responsemethod, enabling concurrent execution of tool calls.
Concurrent execution of tools requires a model that supports parallel function
calling. For example, OpenAI models have a
parallel_tool_calls parameter
(enabled by default) that allows multiple tool calls to be requested and
executed simultaneously.gpt-5-mini makes three simultaneous tool calls to atask1, atask2 and atask3. Normally these tool calls would execute sequentially, but using the aprint_response function, they run concurrently, improving execution time.
