Skip to main content
Pause an agent run with @tool(requires_confirmation=True), inspect the pending tool returned by AgentOS, confirm it, and send the updated tool to the nested continue route. This pause exists only in the persisted run; it does not create an approval record.
basic.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as basic.py, then run:
Full source: cookbook/05_agent_os/05_human_in_the_loop/basic.py