Skip to main content
Human-in-the-Loop (HITL) blocks allow you to pause workflow execution for human review, approval, or modification of data before continuing. Perfect for content moderation, data validation, or any process that needs human oversight.

Overview

HITL blocks:
  • Pause execution: Workflow stops until human review is complete
  • Interactive forms: Dynamic UI forms generated from data
  • Edit and approve: Users can modify data before approval
  • Resume automatically: Workflow continues after review submission
HITL blocks use the UI Manifest system to generate dynamic review forms based on the data structure from previous blocks.

When to Use HITL

HITL blocks are ideal for:
  • Content Review: Approve AI-generated content before publishing
  • Data Validation: Review scraped data before adding to CRM
  • Quality Gates: Human approval checkpoint before critical actions
  • Data Enrichment: Review and correct AI-enriched data
  • Compliance: Ensure content meets compliance requirements

Creating HITL Blocks

Via Natural Language

Simply describe what needs review:
"After scraping leads, add a human review step to approve them before adding to the CRM"
The AI agent automatically creates a HITL block with:
  • block_type: "hitl"
  • instruction: Description of what to review
  • display_format: Optional layout preferences

HITL Block Structure

{
  "name": "Review Leads",
  "slug": "review-leads",
  "block_type": "hitl",
  "instructions": "Review scraped leads. Approve or reject each lead before adding to CRM.",
  "dependent_on": ["scrape-leads"],
  "display_format": "Show name, company, email in a table"
}

Display Formats

HITL blocks support multiple display layouts:

Table

Best for quick scanning and comparing items. Shows data in rows and columns.

Card Grid

Good for items with images or detailed content. Displays items as cards in a grid.

List

For sequential review of complex items. Shows items in a vertical list.

Carousel

For horizontal scrolling through items. Useful for image-heavy content.

Configuring Display Format

Specify display format in instructions:
"Display as cards with 2 columns showing image and title"
Or use the block configuration:
{
  "display_format": "table with name, email, company columns"
}

Review Process

1. Data Generation

Previous block generates data:
{
  "items": [
    {
      "id": "1",
      "name": "John Doe",
      "email": "[email protected]",
      "company": "Acme Corp"
    }
  ]
}

2. Form Generation

UI Manifest Agent generates a review form:
  • Analyzes data structure
  • Creates appropriate input fields
  • Adds approve/reject buttons
  • Configures layout based on display_format

3. User Review

User sees the review form:
  • Editable fields: Can modify data before approval
  • Action buttons: Approve, reject, or skip items
  • Draft saving: Save progress and return later

4. Submission

After review:
  • Modified data is captured
  • Approval status is recorded
  • Workflow resumes automatically

5. Output

HITL block outputs reviewed data:
{
  "summary": {
    "total_items": 10,
    "approved": 7,
    "rejected": 3
  },
  "items": [
    {
      "id": "1",
      "original_data": {
        "name": "John",
        "email": "[email protected]"
      },
      "final_data": {
        "name": "John Doe",
        "email": "[email protected]",
        "status": "approved"
      }
    }
  ]
}

Block Execution States

HITL blocks have specific execution states:
StatusDescription
pendingBlock not yet started
runningBlock is executing
form_generatingUI Manifest Agent generating the form
awaiting_inputWaiting for human review
processing_responseProcessing submitted response
completedReview completed, workflow continues
failedBlock encountered an error
The awaiting_input state is unique to HITL blocks. The workflow pauses here until the user completes the review.

Reminder System

HITL blocks support email reminders for pending reviews:

Configuration

{
  "hitl_reminder_enabled": true,
  "hitl_reminder_intervals": [1, 24, 72],
  "hitl_reminder_modes": ["email", "in_app"]
}

Reminder Intervals

  • [1, 24, 72]: Reminders at 1 hour, 24 hours, 72 hours
  • [24]: Single reminder at 24 hours (default)
  • []: No reminders

Notification Modes

ModeDescription
in_appNotification in the app UI
emailEmail to workflow owner
slackSlack message (if configured)
whatsappWhatsApp message (if configured)
See Email Reminder for more details on the reminder system.

Example Workflows

Example 1: Content Review

Workflow:
  1. Generate quotes (Code block)
  2. Review quotes (HITL block)
  3. Post approved quotes (Code block)
HITL Configuration:
{
  "block_type": "hitl",
  "instructions": "Review generated quotes. Edit if needed, then approve for posting.",
  "display_format": "Display as cards with quote and author"
}

Example 2: Lead Validation

Workflow:
  1. Scrape leads (Code block)
  2. Review leads (HITL block)
  3. Add to CRM (Code block)
HITL Configuration:
{
  "block_type": "hitl",
  "instructions": "Review scraped leads. Verify email addresses and company names.",
  "display_format": "Table with name, email, company columns. Make email editable."
}

Best Practices

Write clear instructions about what to review. Users should understand what they’re approving.
Choose the display format that best fits your data. Tables for structured data, cards for rich content.
Enable reminders for time-sensitive reviews. Don’t let reviews sit indefinitely.
Keep review batches manageable. Too many items can be overwhelming.

Limitations

HITL blocks can only depend on exactly one code block. They cannot depend on other HITL blocks or start blocks.
  • Single dependency: Must depend on exactly one code block
  • No chaining: Cannot chain HITL blocks directly (use code blocks between)
  • Data structure: Input data should be structured (list of items)

Workaround for Multiple Reviews

To create multiple review stages:
code-1 → hitl-1 → code-2 (processes approved items) → hitl-2

Troubleshooting

  • Check that previous block output is structured correctly
  • Verify data format matches expected structure
  • Ensure HITL block depends on a code block
  • Check that all required fields are filled
  • Verify action buttons are configured correctly
  • Review browser console for errors
  • Verify reminder configuration is correct
  • Check email settings in account
  • Ensure reminder intervals are set

HITL blocks are a powerful way to add human oversight to automated workflows. Use them when you need quality control or compliance checks.