Skip to main content

Human-in-the-Loop (HITL)

Human-in-the-Loop enables workflows to pause and wait for human decisions, approvals, or input before continuing. Not everything should be fully automated -- HITL gives you the guardrails to keep humans in control of what matters.

Why Human-in-the-Loop?

  • High-stakes decisions -- Approve large purchases or sensitive operations
  • Quality control -- Review AI-generated content before publishing
  • Compliance -- Ensure human oversight for regulated processes
  • Exception handling -- Escalate edge cases that humans handle better
  • Training -- Improve AI by collecting human feedback on its output

How HITL Works

When a workflow reaches a Human node, execution pauses. A task is created and assigned to the designated approver(s). The assignee receives a notification, reviews the context, and responds. Once the human responds, the workflow continues with their input.

Workflow reaches Human node --> Task created & assigned --> Human reviews & responds --> Workflow continues

Task Lifecycle

StatusDescription
PendingWaiting for human response
ApprovedHuman approved the request
RejectedHuman rejected the request
ExpiredTimeout reached without response

When a task expires, it either auto-approves (for low-risk decisions) or fails the workflow (for high-stakes ones), depending on your configuration.

Timeout Handling

Timeouts prevent tasks from sitting indefinitely. You have three options:

StrategyWhen to UseBehavior
Auto-approve on timeoutLow-risk, routine approvalsWorkflow continues as if approved
Escalate on timeoutImportant but not criticalTask reassigned to backup approver
Fail on timeoutHigh-stakes, must-approve decisionsWorkflow stops with an error

Configuring Human Nodes

In Workflows

Add a Human node to your workflow from the Visual Builder or via the workflow definition. Configure these properties:

PropertyDescriptionRequired
PromptQuestion or instruction for the reviewerYes
ApproversEmail addresses of people who can respondYes
Input FieldsData to collect from the humanYes
TimeoutHow long to wait before timeout actionNo
Auto-Approve on TimeoutWhether to auto-approve if no responseNo
Escalate ToBackup approvers on timeoutNo

Input Field Types

You can collect various types of data from the reviewer:

Field TypeDescription
BooleanYes/No toggle
TextFree-text input
NumberNumeric input with optional min/max bounds
SelectSingle-choice dropdown
Multi-selectMulti-choice selection
DateDate picker

Context Passing

Pass workflow data to help humans make informed decisions. Map fields from previous workflow nodes to the context that the reviewer sees. For example, show the customer name, order total, refund amount, and reason so the reviewer has everything needed to decide.

The reviewer sees the prompt, all mapped context, and the input fields in a clean approval interface.

Multi-Level Approvals

Create approval chains by adding multiple Human nodes in sequence. Combine them with Condition nodes for threshold-based escalation:

  1. Team lead approves all requests
  2. Manager approves only if amount exceeds a threshold
  3. Finance approves only if amount exceeds a higher threshold

This keeps routine approvals fast while adding oversight for larger decisions.

Managing Human Tasks

From the Dashboard

  1. Go to Tasks > Pending to see all tasks awaiting your response
  2. Click a task to view the full context and attached artifacts
  3. Fill in the required fields
  4. Click Approve or Reject

Notifications

Configure how you receive task notifications:

  • Email notifications
  • Slack integration
  • In-app notifications
  • Webhook to an external system

Best Practices

Write Clear Prompts

"Approve expense report #1234 for $2,500 (Travel - Q4 Conference)" is actionable. "Please review" is not.

Provide Context

Include all relevant data from the workflow so reviewers can decide without hunting for information.

Use Reasonable Timeouts

24 hours for routine approvals, 1 hour for urgent matters, 7 days for complex compliance reviews.

Always Set Escalation

Do not let tasks sit indefinitely. Configure a backup approver or auto-approve for non-critical decisions.

Collect Feedback

Add a quality rating or feedback field alongside the approval. This data helps improve your AI agents over time.


Next: Learn about Agent-to-Agent Communication for building collaborative agent systems.