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. Here is an example:Documentation Index
Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt
Use this file to discover all available pages before exploring further.
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-4o 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.
