Human-in-the-Loop

Intelligent Workflow Orchestration with Human Oversight

Realflow.Studio's HITL approval nodes enable AI-driven workflows to seamlessly incorporate human decision points without losing context, state, or momentum.


Adaptive Form Routing

The LLM dynamically determines when human intervention is required based on configurable business rules; risk thresholds, compliance requirements, exception conditions, or confidence levels. When triggered, Realflow surfaces the appropriate approval form from your library, matching the decision type to the right human touchpoint.


RACI-Based Role Assignment

Define human participation using familiar responsibility models:

  • Responsible  Executes the approval action, completes forms, provides input
  • Accountable  Final sign-off authority, escalation endpoint
  • Consulted  Provides input before decision; feedback captured in workflow context
  • Informed  Receives notification of outcomes; audit trail participant

Role assignments can be static, rule-based, or LLM-determined based on workflow context.


Omnichannel Delivery

Reach approvers where they work. HITL requests route through:

  • Slack  Interactive approval cards with inline actions
  • Microsoft Teams  Adaptive cards with approval buttons and context preview
  • Email  Branded HTML notifications with secure approval links
  • SMS  Time-sensitive alerts with short-link access for mobile-first responders
  • Mobile Push  Instant notifications to the Realflow mobile app with deep links directly to approval screens

Channel selection can be user-preferred, role-based, or escalation-driven with automatic cascade:

  1. Initial push notification (instant)
  2. Second push after 2 minutes
  3. Fallback to SMS after 5 minutes
  4. Fallback to email after 10 minutes
  5. Escalate to backup approver after 15 minutes

Real-Time Approvals for Live Conversations

Enable customer-facing chatbots and AI agents to request human authorization without breaking the conversation flow. When a chatbot encounters a decision that exceeds its authority-a discount request, an exception to policy, a sensitive data release-it can:

  1. Hold the conversation - The customer sees a natural "let me check on that for you" message
  2. Push for approval - A manager or specialist receives an instant mobile push with full context
  3. Resume seamlessly - Upon approval, the chatbot continues the conversation with the authorized action, often within seconds

Use Cases

  • Customer service agents authorizing refunds or credits above threshold
  • Sales bots requesting manager approval for custom pricing
  • Support chatbots escalating to specialists for sensitive account changes
  • Compliance sign-off during onboarding flows while the applicant waits

Bidirectional Chat During Approval

Approvers aren't limited to simple approve/reject decisions. A real-time chat channel connects the approver with the originator—whether that's a human waiting for authorization or an LLM-driven workflow.

Human-to-Human

Manager: "What was the business purpose?"
Sarah: "Client meeting dinner with TechCorp team"
Manager: "Thanks, approved!"

Human-to-LLM

Underwriter: "Can you verify the employment history dates?"
LLM: "Employment history verified: TechCorp 2018-present (5 years, 3 months). 
      HR confirmation received on Nov 18."
Underwriter: "Perfect, approved."

The LLM answers using full workflow state knowledge—no human needs to look up the information. All chat exchanges are recorded in the workflow audit trail for compliance.

Chat Capabilities

  • Document sharing - Upload additional documents mid-conversation
  • Real-time delivery - WebSocket connections ensure instant message delivery
  • Full audit trail - Every exchange recorded for compliance
  • Rate limiting - Prevent abuse with configurable message frequency limits

While-You-Wait Sequential Approvals

Transform multi-level approval chains from day-long email threads into real-time experiences:

10:30:00  Sarah submits $500 expense via mobile
10:30:01  Push notification sent to supervisor Alex
10:30:42  Alex approves via Face ID
10:30:43  Push notification sent to manager Chris
10:32:15  Chris approves
10:32:16  Sarah's screen: "✓ Approved!"

Total time: 2 minutes, 16 seconds

Sarah never leaves the app. A live progress indicator shows each approver's status in real-time via WebSocket connection. No email checking, no URL copying, no context switching.

Performance Characteristics

  • Push notification delivery: < 1 second
  • Approval link validation: < 100ms
  • Workflow resume time: < 500ms
  • Status update propagation: < 200ms
  • Total approval cycle (2 levels): 2-5 minutes typical

Ambient Session Recovery

When real-time approval isn't possible (the customer disconnects, the browser closes, or the wait exceeds acceptable hold time) Realflow's MCP architecture enables seamless recovery.

How It Works

  1. Session registration  When a conversation pauses for HITL, the MCP server registers the session GUID and pending state
  2. Approval completes  The human approver takes action via any channel; the session is marked resumable
  3. User returns  Upon opening any new chat, the system prompt instructs the LLM to call the MCP session initiation endpoint
  4. Pending work surfaces  The endpoint returns all resumable sessions: "You have a pending approval for [refund request] that's ready to continue. Want to pick up where you left off?"
  5. Context restored  User selects, LLM retrieves the full conversation history via session GUID lookup, and the interaction resumes exactly where it paused

What This Enables

  • Ambient resumption  Users don't need a special link. Any new chat surfaces pending work automatically.
  • Multi-item queues  Multiple pending approvals? User sees all of them and chooses which to continue.
  • Platform independence  Works identically across any MCP-compatible interface.
  • Nothing sensitive in URLs  Authentication and authorization happen at the MCP layer, not encoded in links.

proceed.link serves as a simple notification mechanism—a nudge sent via email or SMS that opens a fresh chat window. The intelligence lives entirely in the MCP server knowing what's pending and the LLM knowing to ask.


Zero Infrastructure, Universal Compatibility

No server applications to manage. The HITL approval system operates as a fully managed service. Install the MCP server component, configure your approval workflows, and you're operational.

Works with all LLMs that support MCP. Claude, GPT, Gemini, Llama, or any MCP-compatible model; Realflow HITL integrates without vendor lock-in.

Standalone or integrated deployment. Implement HITL independently, or integrate with PSP for complete workflow state persistence across multi-step, multi-agent processes.


Context-Appropriate Domain Routing

Approval links are served from purpose-aligned domains, each with security profiles appropriate to their use case:

Domain Use Case Expiration Security
approvals.link Manager approvals, compliance attestations 7 days Medium
boards.link Kanban boards, committee dashboards, group tracking 21 days Low
forms.link Onboarding intake, vendor registration, change requests 30 days Low
surveysubmit.link NPS surveys, feedback collection, pulse checks 60 days Very Low
zips.link Quick confirmations, yes/no decisions, acknowledgments 15 min High
proceed.link Conversation resume—opens new chat where pending sessions surface N/A N/A
realflow.link Platform-branded enterprise interactions, partner integrations Configurable Configurable

Domain selection can be workflow-defined, LLM-determined, or white-labeled to customer domains.


Multi-Recipient Racing

Send the same approval request to multiple qualified approvers. First to accept takes responsibility; others see "being handled by Alex" in real-time. Status streams back to the workflow immediately.

Use Cases

  • Distribute urgent approvals across a team
  • Load-balance across available managers
  • Ensure coverage during PTO or off-hours
  • Reduce bottlenecks in high-volume workflows

Integrated Document Experience

Universal Document Viewer

Review Office documents (Word, Excel, PowerPoint), PDFs, and images inline within the approval interface. No external applications required.

PDF Form Filling

Complete fillable PDF forms directly in the approval workflow. Field values persist to workflow state.

Document Annotation

Mark up documents during review; annotations captured in workflow audit trail.

Custom Form Builder

Design bespoke approval forms with:

  • Drag-and-drop field placement
  • Conditional logic (show/hide based on previous answers)
  • Validation rules
  • Integrated signature capture panels for legally binding sign-offs

Transparent State Persistence & Resume

Realflow's PSP architecture persists complete workflow state when entering HITL nodes. The workflow suspends cleanly, awaits human action across minutes or days, and resumes exactly where it left off-with full context intact. No polling, no state reconstruction, no lost work.


Workflow Patterns

Manager Approval

1. Employee submits expense report
2. Checkpoint: manager_approval
   - Generate approval.link (7-day expiration)
   - Send push notification to manager
   - Pause workflow
3. Manager reviews, approves via mobile
4. Workflow resumes, processes reimbursement

Multi-Stakeholder Review

1. Document uploaded for review
2. Checkpoint: stakeholder_review
   - Generate reviews.link for each reviewer
   - Send emails to legal, finance, compliance
   - Pause workflow
3. Each reviewer provides comments over 5 days
4. All reviews collected, workflow resumes
5. Synthesize feedback, route to next step

Customer Document Collection

1. Loan application initiated
2. Checkpoint: document_upload
   - Generate forms.link (30-day expiration)
   - Send email to customer
   - Pause workflow
3. Customer uploads pay stubs, tax returns
4. Documents received, workflow resumes
5. Proceed to underwriting

While-You-Wait Expense Approval

1. Sarah submits expense via mobile app
2. Screen shows: "Waiting for approval..."
3. Supervisor receives push, approves in 42 seconds
4. Manager receives push, approves in 90 seconds
5. Sarah's screen: "✓ Approved!"
6. Total time: 2 minutes, 16 seconds

Security Model

Link Type Expiration One-Time Use Risk Level
logins.link 15 min Yes High
zips.link 15 min Yes High
approvals.link 7 days Optional Medium
uploads.link 14 days Optional Medium
reviews.link 21 days No Low
forms.link 30 days No Low
surveysubmit.link 60 days No Very Low
reports.link 90 days No Low