Code
cookbook/agent_concepts/user_control_flows/confirmation_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 confirmation
- Demonstrates how to handle streaming responses with user input
Use Cases
- Real-time user interaction
- Streaming applications requiring user input
- Interactive chat interfaces
- Progressive response generation