Human-in-the-Loop
The agent pauses execution at defined checkpoints and surfaces a decision to a human — for approval, rejection, or editing — before continuing. This is essential for any agent that takes real-world actions where mistakes are costly or irreversible.
Structure
Checkpoints can be triggered by action type (destructive operations), confidence level (agent is uncertain), cost threshold (expensive API calls), or policy rules (compliance requirements).
How It Works
- Execute — agent works through the task normally
- Hit checkpoint — agent reaches a step requiring human approval
- Pause — execution halts and the agent surfaces the pending action with context
- Human decides — approve (continue as-is), reject (agent retries differently), or edit (modify the action and continue)
- Resume — execution continues from where it paused
Checkpoint triggers:
- Action-based — always pause before delete, send, publish, deploy
- Confidence-based — pause when the agent is uncertain
- Cost-based — pause before expensive operations
- Policy-based — compliance requires human sign-off
Key Characteristics
- Safety net — prevents costly mistakes from autonomous agents
- Trust building — users gain confidence by seeing what the agent does before it does it
- Latency cost — human review adds unpredictable delay
- Not scalable — more checkpoints = more human time required
- Context matters — the agent must present enough context for the human to decide
When to Use
- Agent takes real-world actions (send emails, modify databases, deploy code)
- Mistakes are expensive or irreversible
- Compliance requires human approval for certain operations
- You're building trust with users and want to start with more oversight
- The agent handles sensitive data or high-stakes decisions