Code
cookbook/agent_concepts/user_control_flows/user_input_required_stream.py
Usage
Key Features
- Uses
agent.run(stream=True)for streaming responses - Implements streaming continuation with
agent.continue_run(stream=True) - Maintains real-time interaction with user input collection
- Demonstrates how to handle streaming responses with user input
Use Cases
- Real-time user interaction
- Streaming applications requiring user input
- Interactive form-like interfaces
- Progressive response generation with user input