AI Wisdom

Human-in-the-Loop (HITL)

Insert human approval checkpoints in agent workflows for high-stakes, irreversible, or high-uncertainty actions.

In this article

Problem: Fully autonomous agents can make irreversible mistakes โ€” deleting data, sending emails, making payments โ€” with no opportunity for correction.

Solution: Design agent workflows with explicit human checkpoints that pause execution, surface the intended action and its consequences, and require human approval before proceeding.

Implementation (LangGraph pattern):

  1. Define "interrupt" nodes in the graph for sensitive actions (e.g., "send_email", "delete_records")
  2. When the agent reaches an interrupt node, serialise the current state and pause execution
  3. Notify the human (Slack message, UI notification, email) with: proposed action, reasoning, expected consequences
  4. On approval: resume from the checkpoint. On rejection: route to replanning node
  5. Set time limits โ€” auto-reject if no human response within N minutes

When to interrupt:

  • Irreversible actions (send, delete, deploy, publish)
  • High-cost operations (> $10 API call, > 1 hour compute)
  • High-uncertainty steps (agent confidence < threshold)

Trade-Offs:

  • โœ” Pro: Prevents catastrophic irreversible errors
  • โœ” Pro: Builds user trust in agentic systems
  • โœ– Con: Interrupt latency can be minutes to hours โ€” not suitable for synchronous workflows
  • โœ– Con: Human fatigue if too many interrupts are required (alert fatigue)

When To Use: Customer-facing agents with real-world consequences; regulated industries. When to avoid: Fully automated batch jobs with dry-run validation first.

Discussion

Sign in to share your feedback and join the discussion.