HIVE

Swarm Management

Human-in-the-Loop

Human-in-the-Loop

Human-in-the-Loop (HITL) is one of HIVE Protocol's most powerful features. It allows you to maintain the perfect balance between AI automation and human oversight. Rather than choosing between fully autonomous AI or manually doing everything yourself, HITL gives you granular control over how and when you participate in agent workflows.

Why Human-in-the-Loop Matters

AI agents are incredibly capable, but there are situations where human judgment is essential:

┌─────────────────────────────────────────────────────────────────┐
│                    The Automation Spectrum                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Full Manual     Collaborative      Supervised      Autonomous   │
│      │               │                  │               │        │
│      ●───────────────●──────────────────●───────────────●        │
│      │               │                  │               │        │
│   You do          You guide         You review      Agents       │
│   everything      agents            outputs         handle it    │
│                                                                  │
│                    ▲                                             │
│                    │                                             │
│           HIVE Protocol HITL                                     │
│           gives you control                                      │
│           across this spectrum                                   │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Key benefits of HITL:

BenefitDescription
Quality ControlReview and approve critical outputs before they're used
Domain ExpertiseInject specialized knowledge agents might not have
Risk MitigationCatch and correct errors before they compound
Learning OpportunityUnderstand how agents work to improve your prompts
ComplianceMaintain audit trails and human oversight for regulated tasks

The Three Collaboration Modes

HIVE Protocol provides three distinct collaboration modes, each designed for different scenarios and levels of involvement.

Mode 1: Observe Mode

Observe mode lets you watch your agent swarm work without interfering. You're a silent observer, monitoring the conversation and outputs without participating.

┌─────────────────────────────────────────────────────────────────┐
│  OBSERVE MODE                                         [* . .]   │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  Agent: Researcher                          10:23 AM     │   │
│  │  I've analyzed the market data. Key findings:            │   │
│  │  - Market growing at 12% annually                        │   │
│  │  - Three main competitors identified                     │   │
│  │  - Customer preference shifting to mobile                │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  Agent: Analyst                             10:24 AM     │   │
│  │  Thanks for that data. Let me cross-reference with       │   │
│  │  our internal metrics. The mobile shift aligns with      │   │
│  │  what we're seeing in our analytics...                   │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  You are observing                                        │   │
│  │  Agents are working autonomously                         │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

When to use Observe Mode:

ScenarioWhy Observe Works
Routine tasksAgents handle repetitive work while you focus elsewhere
LearningUnderstand how agents collaborate and reason
Quality samplingPeriodically review outputs without interrupting flow
High-trust workflowsEstablished processes that agents execute reliably
Background researchLet agents gather information while you do other work

Observe Mode settings:

observe_mode:
  notifications:
    on_completion: true
    on_error: true
    on_milestone: false

  auto_review:
    enabled: true
    priority_threshold: "high"

  intervention_triggers:
    error_count: 3
    confidence_threshold: 0.7
    timeout_minutes: 30

Mode 2: Collaborate Mode

Collaborate mode creates a true partnership between you and your agents. You can offer suggestions, share ideas, and provide guidance, while agents build upon your input with their own analysis and creativity.

┌─────────────────────────────────────────────────────────────────┐
│  COLLABORATE MODE                                     [. * .]   │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  You                                        2:15 PM      │   │
│  │  I've been thinking about the pricing strategy.          │   │
│  │  What if we offered a freemium tier to capture           │   │
│  │  more of the SMB market?                                 │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  Agent: Market Analyst                      2:15 PM      │   │
│  │  That's an interesting angle! Building on that idea,     │   │
│  │  I'd suggest we analyze the freemium models of           │   │
│  │  three successful competitors: Slack, Notion, and        │   │
│  │  Figma. Each took a different approach...                │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  You are collaborating                                    │   │
│  │  Share ideas and agents will build upon them             │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

When to use Collaborate Mode:

ScenarioWhy Collaborate Works
BrainstormingAgents expand on your ideas with additional perspectives
Strategic planningCombine human intuition with data-driven analysis
Creative projectsGet AI inspiration while maintaining creative control
Problem solvingWork through complex issues together
Learning new domainsAgents fill knowledge gaps while you guide direction

Effective collaboration techniques:

TECHNIQUE 1: Seed and Expand
You: "I'm thinking about sustainability as a brand differentiator."
Agent: [Expands with market trends, competitor analysis, strategies]

TECHNIQUE 2: Challenge and Refine
You: "What's wrong with this approach?"
Agent: [Provides critical analysis, then suggests improvements]

TECHNIQUE 3: Parallel Exploration
You: "Let's explore three different directions simultaneously."
Agents: [Each agent develops a different direction]

TECHNIQUE 4: Build on Build
You: "Great point about mobile. What about tablet users?"
Agent: [Extends the analysis to cover your new angle]

Mode 3: Direct Mode

Direct mode gives you precise control over your agents. Your instructions are followed exactly as given, making this mode ideal for tasks requiring specific outputs or when you know exactly what you need.

┌─────────────────────────────────────────────────────────────────┐
│  DIRECT MODE                                          [. . *]   │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  You (Command)                              4:30 PM      │   │
│  │  Write a product announcement following this exact        │   │
│  │  structure:                                               │   │
│  │  1. Hook (1 sentence, max 15 words)                      │   │
│  │  2. Problem statement (2 sentences)                       │   │
│  │  3. Solution (3 bullet points)                            │   │
│  │  4. CTA (1 sentence with link placeholder)               │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  Agent: Copywriter                          4:30 PM      │   │
│  │  Following your exact structure:                          │   │
│  │                                                           │   │
│  │  1. HOOK: Your team meetings are about to get 10x        │   │
│  │     more productive.                                      │   │
│  │                                                           │   │
│  │  2. PROBLEM: Teams waste an average of 31 hours per      │   │
│  │     month in unproductive meetings.                       │   │
│  │                                                           │   │
│  │  3. SOLUTION:                                             │   │
│  │     - AI-generated agendas based on project context      │   │
│  │     - Real-time action item capture                       │   │
│  │     - Automated follow-up reminders                       │   │
│  │                                                           │   │
│  │  4. CTA: Start running better meetings today -           │   │
│  │     [LINK: Try free for 14 days]                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  You are directing                                        │   │
│  │  Agents follow your instructions precisely               │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

When to use Direct Mode:

ScenarioWhy Direct Works
Specific formattingOutput must match exact specifications
CorrectionsFix mistakes precisely without interpretation
Compliance requirementsSpecific language or structure is mandatory
Quality controlEnforce standards and catch deviations
Template fillingPopulate predefined structures accurately

Command syntax for Direct Mode:

EXPLICIT INSTRUCTIONS
- "Write exactly 3 paragraphs, each 2-3 sentences."
- "List precisely 5 benefits, numbered 1-5."
- "Format as a markdown table with columns: Name, Date, Status"

CONSTRAINT COMMANDS
- "Do not include any pricing information."
- "Keep the total response under 200 words."
- "Avoid these terms: [list of terms to avoid]"

STRUCTURE COMMANDS
- "Follow this exact template: [template]"
- "Mirror the structure of this example: [example]"
- "Output as JSON with this schema: [schema]"

Switching Between Modes

One of HITL's most powerful features is the ability to switch modes mid-conversation.

Mode Switching Interface

┌─────────────────────────────────────────────────────────────────┐
│  Mode Selector                                                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌─────────────┐ ┌─────────────┐ ┌─────────────┐               │
│  │   OBSERVE   │ │ COLLABORATE │ │   DIRECT    │               │
│  │             │ │   [Active]  │ │             │               │
│  └─────────────┘ └─────────────┘ └─────────────┘               │
│                                                                  │
│  Click any mode to switch. Agents will be notified.             │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Smooth Transitions

SCENARIO: Research task that needs refinement

Step 1: Start in OBSERVE
        Let agents gather initial research autonomously
        Agent A: "Found 15 relevant studies..."
        Agent B: "Cross-referencing with industry reports..."
        [You watch silently]

Step 2: Switch to COLLABORATE
        Join the discussion to guide direction
        You: "The healthcare angle is most relevant for us."
        Agent A: "Great insight! Let me focus on healthcare..."

Step 3: Switch to DIRECT
        Get specific outputs for the final deliverable
        You: "Summarize the top 5 healthcare findings in a table"
        Agent B: [Produces exact table format requested]

Mode Transition Best Practices

FromToWhenExample Trigger
ObserveCollaborateAgents going off-track"Y is more relevant than X"
ObserveDirectNeed immediate output"Give me a summary now"
CollaborateObserveDiscussion is productive"I'll let you continue"
CollaborateDirectNeed to lock in decisions"Use approach B exactly"
DirectCollaborateNeed creative exploration"Let's brainstorm improvements"
DirectObserveTask is well-defined"Continue with this format"

Intervention Strategies

Even in Observe or Collaborate modes, there are times when you need to intervene.

Strategy 1: Gentle Steering

Guide the conversation without disrupting flow:

Agent A: "Let's look at the technical architecture first..."
Agent B: "Good idea. Starting with the database layer..."

You: "Just a thought - might be worth considering the user
      experience implications as you go. No rush."

Agent A: "Great point! Let me incorporate UX considerations
         into our technical discussion..."

When to use: Agents are productive but missing an angle you care about.

Strategy 2: Context Injection

Provide critical information agents don't have:

Agent: "Based on typical enterprise sales cycles, I'd
        estimate 6-9 months to close..."

You: "Important context: We already have a champion at the
      prospect company who's pushing for a Q1 decision.
      Also, they have budget that expires in March."

Agent: "That changes things significantly! Let me revise
        my approach to capitalize on this urgency..."

When to use: You have insider knowledge, recent developments, or constraints.

Strategy 3: Error Correction

Fix mistakes immediately before they propagate:

Agent: "Since you're using Python 2.7, the syntax would be..."

You: "Quick correction: We're on Python 3.11, not 2.7."

Agent: "Thanks for catching that! Python 3.11 changes things.
        Let me update my recommendations..."

When to use: Agent is working from incorrect assumptions.

Strategy 4: Scope Management

Keep the conversation focused and productive:

Agent A: "We should also consider blockchain integration..."
Agent B: "Yes! And maybe IoT connectivity..."

You: "Let's stay focused on the core MVP. We can explore
      those advanced features in a future phase."

Agent A: "You're right. Focusing on MVP essentials:
         1. User authentication
         2. Core data management
         3. Basic reporting..."

When to use: Discussion is expanding beyond useful scope.

Strategy 5: Quality Feedback

Help agents improve their outputs iteratively:

Agent: [Produces a draft marketing email]

You: "Good start! A few refinements:
      - The opening feels too generic, make it more personal
      - The CTA is buried, move it higher
      - Add a specific deadline to create urgency"

Agent: "Great feedback! Here's the revised version..."

When to use: Output is close but needs refinement.

Approval Workflows

For high-stakes tasks, HIVE Protocol supports structured approval workflows.

Workflow Types

TYPE 1: Simple Approval

Agent: "I've drafted the customer response. Ready to send?"
       [Preview of response]
       [Approve] [Edit] [Reject]


TYPE 2: Checkpoint Workflow

┌─────────────────────────────────────────────────────────────────┐
│  Content Production Workflow                                     │
├─────────────────────────────────────────────────────────────────┤
│  Step 1: Topic Research                              [Done]     │
│  Step 2: Outline Creation                    [Awaiting Review]  │
│  Step 3: First Draft                              [Pending]     │
│  Step 4: Final Review                [Approval Required]        │
│  Step 5: Publish                     [Approval Required]        │
└─────────────────────────────────────────────────────────────────┘


TYPE 3: Parallel Approval

Multiple stakeholders review simultaneously:
  Legal Review:      Approved
  Finance Review:    Pending
  Executive Review:  Pending
  Status: 1 of 3 approvals received

Configuring Approval Requirements

approval_workflow:
  name: "Content Publication"

  checkpoints:
    - step: "outline"
      type: "review"
      required: false
      notification: true

    - step: "final_draft"
      type: "approval"
      required: true
      approvers: ["content_lead"]
      timeout_hours: 24

    - step: "publish"
      type: "approval"
      required: true
      approvers: ["content_lead", "legal"]
      require_all: false

  on_rejection:
    action: "return_to_previous"
    notify: true
    require_feedback: true

Approval Actions

ActionEffectWhen to Use
ApproveWorkflow continuesOutput meets requirements
Approve with CommentsContinue with notesMinor improvements possible
Request ChangesReturn for revisionSpecific issues need addressing
RejectStop the workflowFundamental problems
DelegateForward to anotherSomeone else is better positioned
DeferPause workflowNeed more time or information

Advanced HITL Patterns

Pattern 1: Progressive Autonomy

Start with high oversight, then reduce as confidence builds:

WEEK 1: Direct Mode - Explicit instructions, review every output
WEEK 2: Collaborate Mode - Guide direction, review key outputs
WEEK 3: Observe Mode with Checkpoints - Review at milestones
WEEK 4+: Full Observe Mode - Periodic quality sampling only

Pattern 2: Exception-Based Intervention

Configure rules for automatic alerts:

intervention_rules:
  confidence_alert:
    trigger: "agent_confidence < 0.7"
    action: "notify_and_pause"

  disagreement_alert:
    trigger: "agents_disagree"
    action: "notify"

  high_stakes_alert:
    trigger: "output_type in ['contract', 'public_statement']"
    action: "require_approval"

Pattern 3: Role-Based Involvement

Different team members participate in different ways:

Executive:   OBSERVE mode - Periodic dashboards, final approvals
Manager:     COLLABORATE mode - Set direction, guide decisions
Specialist:  DIRECT mode - Domain expertise, precise execution

Measuring HITL Effectiveness

Track these metrics to optimize your processes:

MetricWhat It MeasuresTarget
Intervention RateHow often humans step inDecreasing over time
Approval TimeHow long approvals takeConsistent, not blocking
Rejection RateHow often outputs rejectedLow (< 10%)
Mode DistributionTime in each modeShifting toward Observe

Best Practices Summary

1. Choose the Right Starting Mode

Task TypeRecommended Start
Exploration/ResearchObserve
Strategic PlanningCollaborate
Precise ExecutionDirect
New WorkflowDirect
Proven WorkflowObserve

2. Communicate Clearly

GOOD: "Focus on the mobile user experience,
      specifically the checkout flow."

BAD:  "Make it better for users."

3. Trust But Verify

  • Set clear objectives upfront
  • Review outputs at natural breakpoints
  • Provide feedback that improves future performance
  • Gradually reduce oversight as confidence grows

4. Match Detail to Mode

ModeYour Input Style
ObserveSilent or minimal prompts
CollaborateIdeas, questions, suggestions
DirectExplicit, detailed instructions
  • [Creating Swarms](/docs/swarms/creating-swarms): Set up swarms to use with HITL
  • [Communication Patterns](/docs/swarms/communication-patterns): How agents communicate
  • [Context Blocks](/docs/swarms/context-blocks): Provide context to guide behavior

Cookie Preferences

We use cookies to enhance your experience, analyze site traffic, and for marketing purposes. By clicking "Accept All", you consent to our use of cookies. Read our Privacy Policy for more information.