Open devstein opened 1 year ago
To add async support to the Plan & Execute Agent, follow these steps:
Update the AgentExecutor class to support async methods. This can be done by adding an async version of the run
method called arun
. This method should have the same logic as the run
method, but with async/await syntax.
Update the Tools
that need async support by implementing coroutine methods. For example, if a Tool uses an HTTP request, you can use the aiohttp
library to make the request asynchronously.
Update the example notebook to demonstrate the usage of the async API. This can be done by creating a new section in the notebook that shows how to use the arun
method and run multiple agents concurrently using asyncio.gather
.
The provided async_agent.ipynb
file already demonstrates the usage of the async API for Agents, so no changes are needed for this file.
Feature request
I have been playing around with the Plan & Execute Agent.
Would love to see async support implemented.
Motivation
Would like to use it as a drop in agent replacement for my existing async setup.
Your contribution
Happy to help out where needed.