Skip to main content

Code

cookbook/agent_concepts/user_control_flows/confirmation_required.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 @tool(requires_confirmation=True) to mark tools that need user confirmation
  • Demonstrates how to continue agent execution after user input

Use Cases

  • Confirming sensitive operations before execution