Pattern

Human-in-the-Loop (HITL)

Definition

A design pattern where a human operator reviews, approves, or corrects an autonomous agent's actions at critical decision points before they are executed. HITL is the safety valve between full automation and full manual control. It can be implemented as: approval gates (agent proposes, human approves), escalation triggers (agent handles routine cases, escalates edge cases), correction loops (agent acts, human reviews and corrects), or oversight dashboards (human monitors agent activity in real-time). The key design decision is where to place HITL checkpoints — too many kills throughput, too few risks catastrophic errors.

Builder Context

Every production agent needs a HITL strategy — the question is where, not whether. Start with HITL on all irreversible actions (sending emails, making purchases, modifying data, deploying code) and progressively remove checkpoints as you build confidence in the agent's judgment. The most common mistake is treating HITL as binary (on/off) instead of graduated. Build approval modes: FULL_AUTO for low-risk routine tasks, REQUIRES_APPROVAL for medium-risk actions, HUMAN_IN_LOOP for high-risk irreversible operations. Agentifact tracks every tool's approvalControlMode so you can filter by the level of autonomy you're comfortable with.