Code
cookbook/agent_concepts/user_control_flows/user_input_required_async.py
Usage
1
Create a virtual environment
Open the
Terminal
and create a python virtual environment.2
Set your API key
3
Install libraries
4
Run Example
Key Features
- Uses
agent.arun()
for asynchronous agent execution - Implements
agent.acontinue_run()
for async continuation - Maintains the same user input flow as synchronous version
- Demonstrates how to handle async execution with user input collection
Use Cases
- Non-blocking user input collection
- High-performance applications requiring async execution
- Web applications with form-like interactions
- Long-running operations with user input