Skip to main content
Human-in-the-Loop (HITL) in Agno enables you to implement patterns where human oversight and input are required during agent execution. This is crucial for:
  • Validating sensitive operations
  • Reviewing tool calls before execution
  • Gathering user input for decision-making
  • Managing external tool execution

Types of Human-in-the-Loop

Agno supports four main types of human-in-the-loop flows:
  1. User Confirmation: Require explicit user approval before executing tool calls
  2. User Input: Gather specific information from users during execution
  3. Dynamic User Input: Have the agent collect user input as it needs it
  4. External Tool Execution: Execute tools outside of the agent’s control
Currently Agno only supports Human-in flows for Agent. Team and Workflow will be supported in the near future!

Resuming Agent Execution

Human-in-the-loop flows interrupt the agent’s execution and require human oversight. The run can then be continued by calling the continue_run method. For example:
run_response = agent.run("Perform sensitive operation")

if run_response.is_paused:
    # The agent has paused and is awaiting human input
    # ... perform other tasks, update the tools if needed

    # Continue the run after providing the necessary input
    response = agent.continue_run(run_id=run_response.run_id, updated_tools=run_response.tools)
    # or response = await agent.acontinue_run(run_id=run_response.run_id, updated_tools=run_response.tools)
The continue_run method continues with the state of the agent at the time of the pause. You can also pass the RunOutput of a specific run to the continue_run method, or pass the run_id and list of updated tools in the updated_tools parameter.

Learn More

Developer Resources