Skip to main content

Purpose

The Human Task node pauses the workflow and waits for a human to provide input or approval before continuing. Essential for human-in-the-loop patterns, Human Task nodes ensure that critical decisions have human oversight. Human Task nodes bridge the gap between AI automation and human judgment. They enable workflows that leverage AI speed and consistency while retaining human oversight for high-stakes decisions.

How it works

When execution reaches a Human Task node, the workflow pauses durably while waiting for human input.
1

Workflow reaches Human Task

Execution arrives at the Human Task node. The workflow prepares to pause.
2

Execution pauses

The workflow execution pauses. Temporal maintains the complete state durably, so no data is lost.
3

Task appears in MagOneAI Hub

The task appears in MagOneAI Hub’s task queue for the assigned user or role. The user sees:
  • Task description
  • Context data from previous nodes
  • Available response options
  • Attachments or related documents
4

Human reviews and responds

The assigned user reviews the context, makes a decision, and submits their response through MagOneAI Hub.
5

Workflow resumes

The human’s response is captured and stored in the variable store. Workflow execution resumes from exactly where it paused.
6

Workflow continues

Subsequent nodes can access the human’s response and continue processing based on the decision.
Human Task nodes leverage Temporal’s durable execution. The workflow can wait for hours, days, or even weeks for human input without losing state or consuming compute resources. When the human responds, execution resumes instantly.

Configuration

Configure a Human Task node to present the right information and collect the right response.

Task description

Write a clear description of what the human needs to review or decide. The description appears as the task title in MagOneAI Hub. Good task descriptions:
  • “Review extracted invoice data for accuracy”
  • “Approve high-value purchase request: AED
  • “Validate compliance findings before finalizing report”
  • “Authorize payment of to
Poor task descriptions:
  • “Review” (too vague)
  • “Check this” (no context)
  • “Agent output validation” (too technical)

Assignee

Specify who should receive the task:
Assign to a specific user by email or user ID.
{
  "assignee_type": "user",
  "assignee": "[email protected]"
}
Use when: You know exactly who should handle this task.

Context data

Provide the human with context from previous nodes. This is the information they need to make an informed decision. Example: Invoice approval context
{
  "invoice_number": "{{document_agent.output.invoice_number}}",
  "vendor": "{{document_agent.output.vendor_name}}",
  "amount": "{{document_agent.output.total_amount}}",
  "currency": "{{document_agent.output.currency}}",
  "extracted_data": "{{document_agent.output}}",
  "risk_assessment": "{{risk_agent.output}}",
  "compliance_check": "{{compliance_agent.output}}",
  "document_url": "{{trigger.input.document_url}}"
}
The user sees this data in MagOneAI Hub formatted for easy review.

Approval options

Define the response options available to the human.
Binary decision with optional comments.
{
  "options": [
    {"value": "approved", "label": "Approve"},
    {"value": "rejected", "label": "Reject"}
  ],
  "allow_comments": true,
  "require_comments_on_reject": true
}

Timeout

Configure what happens if the human doesn’t respond within a specified time. Timeout settings:
  • Duration — How long to wait (e.g., 24 hours, 3 days, 1 week)
  • Action on timeout — What happens when time expires
    • Take default action (approve or reject)
    • Escalate to another user
    • Fail the workflow
    • Execute a fallback branch
Example timeout configuration:
{
  "timeout_duration": "24h",
  "timeout_action": "escalate",
  "escalate_to": "[email protected]",
  "escalation_message": "This task has been waiting for 24 hours and requires immediate attention."
}

Escalation

Define escalation paths for time-sensitive tasks. Escalation chain:
Initial assignee → Wait 24 hours → Escalate to manager
Manager → Wait 12 hours → Escalate to director
Director → Wait 6 hours → Auto-approve with notification
Escalation configuration:
{
  "escalation_chain": [
    {
      "assignee": "{{trigger.input.assigned_user}}",
      "timeout": "24h"
    },
    {
      "assignee": "{{trigger.input.manager}}",
      "timeout": "12h"
    },
    {
      "assignee": "[email protected]",
      "timeout": "6h"
    }
  ],
  "final_action": "auto_approve",
  "final_action_notification": "[email protected]"
}

Use cases

Human Task nodes enable sophisticated human-in-the-loop workflows.

Financial approvals

Scenario: Approve invoices above a threshold before payment.
Workflow:
  1. Extract invoice data (Agent)
  2. Validate against PO (Agent)
  3. Check budget availability (Tool)
  4. Condition: amount > 10000
     ├─ True: Human Task: "Finance manager approval"
     └─ False: Auto-approve
  5. Process payment (Tool)
  6. Send confirmation (Tool)
Human Task configuration:
{
  "description": "Approve invoice payment: {{vendor}} - {{amount}} {{currency}}",
  "assignee": "[email protected]",
  "context": {
    "invoice_number": "{{invoice_number}}",
    "vendor": "{{vendor_name}}",
    "amount": "{{amount}}",
    "currency": "{{currency}}",
    "po_number": "{{po_number}}",
    "budget_remaining": "{{budget_check.output.remaining}}",
    "invoice_url": "{{document_url}}"
  },
  "options": [
    {"value": "approved", "label": "Approve Payment"},
    {"value": "rejected", "label": "Reject Invoice"}
  ],
  "timeout": "48h",
  "timeout_action": "escalate",
  "escalate_to": "[email protected]"
}

Content review before publication

Scenario: Review AI-generated content before publishing to customers.
Workflow:
  1. Generate content (Agent with RAG)
  2. Fact-check against knowledge base (Agent)
  3. Check brand guidelines (Agent)
  4. Human Task: "Content review and approval"
  5. Condition: approved
     ├─ True: Publish content (Tool)
     └─ False: Return to drafts
  6. Send publication notification (Tool)
Human Task configuration:
{
  "description": "Review article before publication: {{article_title}}",
  "assignee_role": "content_reviewer",
  "context": {
    "title": "{{article_title}}",
    "content": "{{generated_content}}",
    "target_audience": "{{audience}}",
    "publication_date": "{{scheduled_date}}",
    "fact_check_results": "{{fact_checker.output}}",
    "brand_check_results": "{{brand_checker.output}}"
  },
  "options": [
    {"value": "approve", "label": "Approve for Publication"},
    {"value": "request_changes", "label": "Request Changes"},
    {"value": "reject", "label": "Reject"}
  ],
  "allow_editing": true,
  "timeout": "4h"
}

Data validation

Scenario: Validate AI-extracted data before committing to database.
Workflow:
  1. Extract data from document (Agent with vision)
  2. Validate format and completeness (Agent)
  3. Condition: confidence < 0.9
     ├─ True: Human Task: "Validate extracted data"
     └─ False: Auto-approve
  4. Save to database (Tool)
  5. Send confirmation (Tool)
Human Task configuration:
{
  "description": "Validate extracted data: {{document_type}}",
  "assignee_role": "data_entry_specialist",
  "context": {
    "document_image": "{{document_url}}",
    "extracted_data": "{{extractor.output}}",
    "confidence_score": "{{extractor.output.confidence}}",
    "validation_issues": "{{validator.output.issues}}"
  },
  "response_type": "form",
  "fields": [
    {"name": "name", "type": "text", "label": "Full Name", "default": "{{extracted_data.name}}"},
    {"name": "id_number", "type": "text", "label": "ID Number", "default": "{{extracted_data.id}}"},
    {"name": "expiry_date", "type": "date", "label": "Expiry Date", "default": "{{extracted_data.expiry}}"},
    {"name": "verified", "type": "checkbox", "label": "I have verified this data is correct"}
  ],
  "timeout": "1h"
}

Compliance escalation

Scenario: Escalate high-risk compliance findings to legal team.
Workflow:
  1. Analyze document for compliance (Agent)
  2. Assess risk level (Agent)
  3. Condition: risk_level == "high"
     ├─ True: Human Task: "Legal review required"
     └─ False: Auto-process
  4. Generate compliance report (Agent)
  5. Save report (Tool)
Human Task configuration:
{
  "description": "URGENT: High-risk compliance issue requires legal review",
  "assignee_role": "legal_counsel",
  "priority": "high",
  "context": {
    "document_type": "{{document_type}}",
    "risk_level": "{{risk_agent.output.risk_level}}",
    "findings": "{{compliance_agent.output.findings}}",
    "recommendations": "{{compliance_agent.output.recommendations}}",
    "document_url": "{{document_url}}",
    "customer_id": "{{customer_id}}"
  },
  "options": [
    {"value": "approve", "label": "Approve with Conditions"},
    {"value": "reject", "label": "Reject - Non-compliant"},
    {"value": "request_more_info", "label": "Request Additional Information"}
  ],
  "require_comments": true,
  "timeout": "4h",
  "escalate_to": "[email protected]"
}

Best practices

Give humans all the information they need to make an informed decision. Include:
  • Summary of what happened before
  • Key data points
  • AI analysis results
  • Links to original documents
  • Relevant history
Consider business hours, time zones, and realistic response times. Don’t set a 1-hour timeout if the person might be asleep.Good timeout examples:
  • Urgent approval: 4 hours with escalation
  • Standard approval: 24 hours
  • Non-urgent review: 3 days
Instead of generic “Yes/No”, use specific labels: “Approve Payment”, “Reject Invoice”, “Request Changes”.
For low-risk tasks, make approval the default and easiest action. For high-risk tasks, require explicit affirmation.
When humans reject something, require them to explain why. This provides valuable feedback and audit trails.
Don’t let tasks sit indefinitely. Build escalation chains that ensure timely resolution.
Monitor approval times, approval rates, and who approves what. Use this data to optimize workflows and identify training needs.
Use Human Task nodes strategically. Not every decision needs human approval. Reserve human oversight for high-stakes decisions, low-confidence AI outputs, and situations where human judgment is genuinely needed.

Advanced patterns

Multi-stage approvals

Require multiple approvals in sequence:
Workflow:
  1. Process request (Agent)
  2. Human Task: "Manager approval"
  3. Condition: approved AND amount > 50000
     ├─ True: Human Task: "Director approval"
     └─ False: Continue
  4. Execute action (Tool)

Parallel approvals

Require multiple approvals simultaneously:
Workflow:
  1. Process request (Agent)
  2. Parallel Node:
     ├─ Branch 1: Human Task: "Finance approval"
     ├─ Branch 2: Human Task: "Legal approval"
     └─ Branch 3: Human Task: "Compliance approval"
  3. Condition: All approved
     ├─ True: Execute
     └─ False: Reject

Conditional approval

Only require approval under certain conditions:
Workflow:
  1. Process document (Agent)
  2. Assess risk (Agent)
  3. Condition: risk_score > 0.7 OR amount > threshold
     ├─ True: Human Task: "Approval required"
     └─ False: Auto-approve
  4. Continue processing

Approval with agent augmentation

Agent assists human decision-making:
Workflow:
  1. Analyze request (Agent)
  2. Research relevant precedents (Agent with RAG)
  3. Generate recommendation (Agent)
  4. Human Task: "Final decision" (with AI recommendation)
  5. Process based on human decision

Integration with MagOneAI Hub

Human Task nodes integrate seamlessly with MagOneAI Hub’s task management interface.

Task queue

Tasks appear in the assignee’s queue with:
  • Priority indicators — Urgent, high, normal, low
  • Age indicators — How long the task has been waiting
  • Context preview — Quick view of key information
  • Filters — Filter by priority, age, workflow type

Task detail view

When a user opens a task, they see:
  • Full context — All data provided by the workflow
  • Attachments — Documents, images, links
  • Timeline — What happened before this task
  • Related tasks — Other tasks in the same workflow
  • Response options — Clear action buttons

Notifications

Users receive notifications when:
  • A new task is assigned to them
  • A task is approaching its timeout
  • A task has been escalated to them
  • Someone comments on their task

Mobile access

Human Task nodes work on mobile devices through MagOneAI Hub mobile app:
  • Push notifications for new tasks
  • Full context display optimized for mobile
  • Quick approve/reject actions
  • Camera integration for document review

Next steps