- Validating sensitive operations
- Reviewing tool calls before execution
- Gathering user input for decision-making
- Managing external tool execution
Use Cases
Agno supports various human-in-the-loop (HITL) use cases for agents, teams and workflows:- User Confirmation: Require explicit user approval before executing a tool
- User Input: Gather specific information from users during execution
- Dynamic User Input: Have the agent collect user input as it needs it
- External Tool Execution: Execute tools outside of the agent’s control
- [Requires Approval or Audit]/(/hitl/approval): The workflow requires an admin review (approval/rejection) or an optional audit-only mode logging without pausing
HITL Requirements
During Human-in-the-Loop flows, the agent run pauses until the HITL requirement are resolved by the admin, user or external tool. You can interact with the HITL requirements in the code as follows:Resuming Execution
After all active requirements have been resolved, you can continue the run by calling thecontinue_run method. The continue_run method continues with the state of the agent at the time of the pause.
continue_run method passing the RunOutput of the specific run to continue:
Streaming HITL Flows
You can also stream the responses you get during a Human-in-the-Loop flow. This is useful when you want to process or show the response in real-time. You can also stream the events resulting from calling thecontinue_run or acontinue_run methods.
For streaming you must handle the events received while streaming the Agent run.
If any event is paused, then you will need to handle the active requirements:
Learn More
User Confirmation
Require explicit user approval before executing tool calls
User Input
Gather specific information from users during execution
Dynamic User Input
Let agents request user input dynamically when needed
External Tool Execution
Execute tools outside of the agent’s control
Approval
Admin approval with persistence, resolution tracking, and audit trails