Defining Async Tools
Useasync def with the @tool decorator:
Using Async Tools
Async tools work with both sync and async agent execution:When to Use Async Tools
Use async tools when your function:- Makes HTTP requests
- Queries a database
- Reads or writes files
- Calls other async services
- Performs any I/O that benefits from non-blocking execution