Skip to main content
@approval(type="audit") does not replace a HITL flag. It must be layered on a tool that already uses requires_confirmation, requires_user_input, or external_execution. This example confirms an ephemeral pause through continue and then verifies that AgentOS wrote the resolved audit row to GET /approvals.
audit_record.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 audit_record.py, then run:
Full source: cookbook/05_agent_os/05_human_in_the_loop/audit_record.py