Skip to main content

Code

cookbook/agent_concepts/user_control_flows/confirmation_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 confirmation flow as synchronous version
  • Demonstrates how to handle async execution with user input

Use Cases

  • Non-blocking user confirmation flows
  • High-performance applications requiring async execution
  • Web applications with user interaction
  • Long-running operations with user input