Swarm Management
Creating Swarms
Creating Swarms
Swarms are the heart of HIVE Protocol—they bring multiple AI agents together to collaborate on complex tasks that no single agent could handle alone. This guide walks you through everything you need to know to create effective, well-coordinated agent swarms that deliver exceptional results.
Think of a swarm as a highly capable team: each member brings unique expertise, they communicate effectively, share context, and work together toward a common goal. By the end of this guide, you'll be able to design and deploy swarms for any challenge.
Understanding Swarm Architecture
Before creating your first swarm, it's important to understand how swarms work at a fundamental level.
┌─────────────────────────────────────────────────────────────────────┐
│ SWARM ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ MESSAGE ROUTER │ │
│ │ • Receives user input │ │
│ │ • Determines which agent(s) should respond │ │
│ │ • Manages conversation flow │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────┼─────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Agent A │ │ Agent B │ │ Agent C │ │
│ │ (Expert 1)│ ◄─► │ (Expert 2)│ ◄─► │ (Expert 3)│ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │ │ │ │
│ └─────────────────┼─────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ SHARED CONTEXT │ │
│ │ • Context Blocks (persistent knowledge) │ │
│ │ • Conversation History (evolving state) │ │
│ │ • Tool Results (external data) │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘Key Components:
| Component | Purpose |
|---|---|
| Message Router | Analyzes incoming messages and directs them to appropriate agents |
| Agents | Specialized AI entities that process requests and generate responses |
| Shared Context | Common knowledge base accessible to all agents in the swarm |
| Inter-Agent Communication | Agents can address and respond to each other |
Creating Your First Swarm
Step-by-Step Dashboard Guide
- Access the Creation Interface
- Navigate to Dashboard or Swarms in the sidebar
- Click the Create Swarm button (top-right corner)
- The swarm creation dialog appears
- Configure Basic Information
┌─────────────────────────────────────────────────────────────┐
│ CREATE NEW SWARM │
├─────────────────────────────────────────────────────────────┤
│ │
│ Swarm Name * │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Product Launch Team │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ Task Description * │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Coordinate the launch of our new SaaS product, │ │
│ │ including marketing strategy, technical readiness, │ │
│ │ and customer communication. │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ Select Agents │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ ✓ Marketing Strategist │ │
│ │ ✓ Technical Writer │ │
│ │ ✓ Product Manager │ │
│ │ ○ Customer Support Agent │ │
│ │ ○ Data Analyst │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ [Cancel] [Create Swarm] │
│ │
└─────────────────────────────────────────────────────────────┘- Select Your Agents
- Choose from your available agents
- Consider complementary skills and expertise
- Start with 2-4 agents for most tasks
- Create and Configure
- Click Create Swarm
- Add context blocks with relevant information
- Configure visibility and sharing settings
Swarm Configuration Fields
| Field | Required | Description | Best Practice |
|---|---|---|---|
| Name | Yes | Unique identifier for the swarm | Be descriptive: "Q4 Marketing Campaign" not "Team 1" |
| Task | Yes | The swarm's primary objective | Include scope, constraints, and success criteria |
| Agents | Yes | Which agents participate | Choose complementary expertise |
| Visibility | No | Who can access the swarm | Start private, share when ready |
Swarm Patterns
Different tasks require different swarm configurations. Here are proven patterns:
Pattern 1: Single Expert
One highly capable agent handles focused tasks.
┌─────────────────────────────────┐
│ SWARM │
│ │
│ User ──► [Expert Agent] ──► Output
│ │
└─────────────────────────────────┘Configuration:
Name: Code Review Assistant
Task: Review pull requests for code quality
Agents:
- Senior Code Reviewer
Use When:
- Task is well-defined and focused
- One domain of expertise is sufficient
- Quick turnaround is neededExample Tasks:
- Code review
- Document editing
- Data analysis
- Q&A assistance
Pattern 2: Expert Panel
Multiple specialists provide diverse perspectives.
┌─────────────────────────────────────────┐
│ SWARM │
│ │
│ User ──┬──► [Expert A] ──┐ │
│ ├──► [Expert B] ──┼──► Output │
│ └──► [Expert C] ──┘ │
│ │
└─────────────────────────────────────────┘Configuration:
Name: Architecture Review Board
Task: Evaluate system design proposals
Agents:
- Security Architect
- Performance Engineer
- Cloud Specialist
Use When:
- Multiple perspectives are valuable
- Decision requires cross-functional input
- Risk assessment needs diverse viewpointsExample Tasks:
- Architecture decisions
- Risk assessment
- Strategy evaluation
- Comprehensive analysis
Pattern 3: Assembly Line
Agents work sequentially, each adding value.
┌────────────────────────────────────────────────────┐
│ SWARM │
│ │
│ User ──► [Research] ──► [Draft] ──► [Edit] ──► Output
│ │
└────────────────────────────────────────────────────┘Configuration:
Name: Content Production Pipeline
Task: Create polished marketing content
Agents:
- Researcher (gathers information)
- Writer (creates initial draft)
- Editor (refines and polishes)
Workflow:
1. Researcher provides background and data
2. Writer creates draft using research
3. Editor reviews and finalizes
Use When:
- Work builds progressively
- Quality checkpoints are needed
- Different skills required at each stageExample Tasks:
- Content creation
- Report generation
- Documentation workflows
- Multi-stage analysis
Pattern 4: Coordinator Hub
One agent orchestrates, specialists execute.
┌─────────────────────────────────────────────────┐
│ SWARM │
│ │
│ ┌─► [Specialist A] │
│ │ │
│ User ──► [Coordinator] ─┼─► [Specialist B] ──► Output
│ │ │
│ └─► [Specialist C] │
│ │
└─────────────────────────────────────────────────┘Configuration:
Name: Project Execution Team
Task: Complete complex project deliverables
Agents:
- Project Coordinator (orchestrates work)
- Developer (technical implementation)
- Designer (visual assets)
- Writer (content and copy)
Workflow:
- Coordinator receives request
- Breaks down into subtasks
- Assigns to appropriate specialists
- Integrates results
- Delivers unified output
Use When:
- Tasks have multiple components
- Central coordination is valuable
- Different specialists handle different partsExample Tasks:
- Product development
- Campaign creation
- Complex projects
- Multi-deliverable work
Pattern 5: Debate Team
Agents with different perspectives discuss to reach consensus.
┌─────────────────────────────────────────────────┐
│ SWARM │
│ │
│ User ──► [Perspective A] ◄──► [Perspective B] │
│ ↕ ↕ │
│ [Perspective C] ◄──► [Moderator] │
│ │ │
│ ▼ │
│ Output │
│ │
└─────────────────────────────────────────────────┘Configuration:
Name: Investment Analysis Team
Task: Evaluate investment opportunities
Agents:
- Bull Analyst (optimistic perspective)
- Bear Analyst (skeptical perspective)
- Risk Manager (risk-focused)
- Moderator (synthesizes discussion)
Workflow:
- Each analyst presents their view
- Agents discuss and challenge each other
- Moderator synthesizes key points
- Final recommendation emerges from discussion
Use When:
- Decisions benefit from debate
- Multiple valid perspectives exist
- Avoiding groupthink is importantExample Tasks:
- Investment decisions
- Strategic planning
- Policy evaluation
- Complex problem-solving
Workflow Configurations
Sequential Workflow
Definition: Each agent completes their work before the next begins
┌───────────────────────────────────────────────────────────┐
│ SEQUENTIAL WORKFLOW │
├───────────────────────────────────────────────────────────┤
│ │
│ Input ──► Step 1 ──► Step 2 ──► Step 3 ──► Output │
│ [Agent A] [Agent B] [Agent C] │
│ │
│ Timeline: │
│ ████████░░░░░░░░░░░░░░░░░░░░░░ Step 1 │
│ ░░░░░░░░████████░░░░░░░░░░░░░░ Step 2 │
│ ░░░░░░░░░░░░░░░░████████░░░░░░ Step 3 │
│ │
└───────────────────────────────────────────────────────────┘
Best for:
- Work that builds on previous steps
- Quality gates between stages
- Clear handoff points neededParallel Workflow
Definition: Multiple agents work simultaneously on different aspects
┌───────────────────────────────────────────────────────────┐
│ PARALLEL WORKFLOW │
├───────────────────────────────────────────────────────────┤
│ │
│ ┌──► [Agent A] ──┐ │
│ Input ───┼──► [Agent B] ──┼──► Combine ──► Output │
│ └──► [Agent C] ──┘ │
│ │
│ Timeline: │
│ ████████████████░░░░░░░░░░░░░░ Agent A │
│ ████████████████░░░░░░░░░░░░░░ Agent B │
│ ████████████████░░░░░░░░░░░░░░ Agent C │
│ ░░░░░░░░░░░░░░░░████████░░░░░░ Combine │
│ │
└───────────────────────────────────────────────────────────┘
Best for:
- Independent subtasks
- Time-sensitive projects
- Diverse analysis neededCollaborative Workflow
Definition: Agents discuss and iterate together
┌───────────────────────────────────────────────────────────┐
│ COLLABORATIVE WORKFLOW │
├───────────────────────────────────────────────────────────┤
│ │
│ Round 1 Round 2 Round 3 │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ A ◄──► B │ │ A ◄──► B │ │ Final │ │
│ │ ↕ │ │ ↕ │ │ Output │ │
│ │ C ◄──► D │ │ C ◄──► D │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ Timeline: │
│ ████████████████████████████████████████░░░░░░ All │
│ │
└───────────────────────────────────────────────────────────┘
Best for:
- Complex problems needing iteration
- Creative brainstorming
- Consensus buildingSwarm Settings Deep Dive
Visibility Settings
Control who can see and access your swarm:
| Setting | Who Can Access | Use Case |
|---|---|---|
| Private | Only you | Work in progress, sensitive projects |
| Shared | Anyone with link | Team collaboration, client sharing |
| Public | All platform users | Templates, demonstrations |
Guest Permissions
Fine-grained control for shared swarms:
┌─────────────────────────────────────────────────────────────┐
│ GUEST PERMISSIONS │
├─────────────────────────────────────────────────────────────┤
│ │
│ View Only │
│ ├── See conversation history [Default] │
│ ├── Cannot send messages │
│ └── Cannot modify settings │
│ │
│ Can Message │
│ ├── See conversation history │
│ ├── Send messages to agents │
│ └── Cannot modify settings │
│ │
│ Full Access │
│ ├── See conversation history │
│ ├── Send messages to agents │
│ ├── Add/remove context blocks │
│ └── Cannot delete swarm │
│ │
└─────────────────────────────────────────────────────────────┘Notification Settings
Configure how you're notified about swarm activity:
- All Messages: Every message triggers notification
- Mentions Only: Only when you're @mentioned
- Summary: Daily digest of activity
- None: No notifications
Complete Swarm Examples
Example 1: Content Marketing Team
Swarm Name: Content Marketing Engine
Task: Create comprehensive marketing content for product launches
Agents:
- Market Researcher
Role: Gather competitive intelligence and audience insights
Model: GPT-4o
Temperature: 0.3
- Content Strategist
Role: Develop content plans and messaging frameworks
Model: Claude Sonnet
Temperature: 0.5
- Copywriter
Role: Create compelling marketing copy
Model: Claude Sonnet
Temperature: 0.7
- SEO Specialist
Role: Optimize content for search visibility
Model: GPT-4o-mini
Temperature: 0.2
Context Blocks:
- Brand Guidelines (Critical)
- Target Audience Personas (High)
- Competitor Analysis (High)
- Product Feature List (Medium)
Workflow:
1. User provides campaign brief
2. Market Researcher analyzes competitive landscape
3. Content Strategist develops messaging framework
4. Copywriter creates content variants
5. SEO Specialist optimizes for search
6. Final content delivered to userExample 2: Software Development Team
Swarm Name: Dev Team Alpha
Task: Design, implement, and document software features
Agents:
- Technical Architect
Role: Design system architecture and make technical decisions
Model: GPT-4o
Temperature: 0.2
- Senior Developer
Role: Write production-quality code
Model: GPT-4o
Temperature: 0.1
- Code Reviewer
Role: Review code for quality, security, and performance
Model: GPT-4o
Temperature: 0.1
- Technical Writer
Role: Create documentation and API references
Model: Claude Sonnet
Temperature: 0.4
Context Blocks:
- System Architecture (Critical)
- Coding Standards (Critical)
- Tech Stack Documentation (High)
- API Design Guidelines (High)
Workflow:
1. User describes feature requirement
2. Architect designs approach and identifies considerations
3. Developer implements solution
4. Reviewer evaluates code quality
5. Writer documents the feature
6. Final deliverable with code + docsExample 3: Customer Research Team
Swarm Name: Voice of Customer Analysis
Task: Analyze customer feedback and extract actionable insights
Agents:
- Data Analyst
Role: Process and analyze quantitative feedback data
Model: GPT-4o
Temperature: 0.2
Tools: execute_code
- Qualitative Researcher
Role: Analyze open-ended responses and identify themes
Model: Claude Sonnet
Temperature: 0.4
- UX Researcher
Role: Connect feedback to user experience improvements
Model: Claude Sonnet
Temperature: 0.5
- Report Writer
Role: Synthesize findings into executive reports
Model: Claude Sonnet
Temperature: 0.4
Context Blocks:
- Product Roadmap (High)
- Previous Research Findings (Medium)
- Customer Segmentation (Medium)
Workflow:
1. User uploads customer feedback data
2. Data Analyst processes quantitative metrics
3. Qualitative Researcher identifies themes
4. UX Researcher maps to experience improvements
5. Report Writer creates executive summaryBest Practices
1. Define Clear Objectives
Every swarm needs a well-defined purpose:
GOOD:
"Review pull requests for security vulnerabilities (OWASP Top 10),
performance issues, and adherence to our TypeScript style guide.
Provide specific, actionable feedback with code examples."
BAD:
"Review code"2. Choose Complementary Agents
Select agents with skills that work together, not overlap:
GOOD - Complementary:
- Researcher: Finds information
- Analyst: Interprets data
- Writer: Communicates findings
- Editor: Ensures quality
BAD - Redundant:
- Writer A: Writes content
- Writer B: Also writes content
- Writer C: Writes more content3. Right-Size Your Swarm
More agents isn't always better:
| Task Complexity | Recommended Size | Reasoning |
|---|---|---|
| Simple focused task | 1-2 agents | Single expertise sufficient |
| Moderate project | 2-4 agents | Multiple perspectives valuable |
| Complex initiative | 4-6 agents | Diverse skills required |
| Large program | 6-8 agents | Full team needed |
Warning Signs of Too Many Agents:
- Responses take too long
- Agents repeat each other
- Conversation feels chaotic
- Cost exceeds value
4. Use Context Blocks Effectively
Provide essential context, not information overload:
GOOD Context:
- Project Requirements (bullet points, 1 page)
- Key Constraints (prioritized list)
- Style Guide (essential rules only)
BAD Context:
- Entire 50-page specification
- Every meeting note ever
- Full company history5. Test Before Full Deployment
Before using a swarm for critical work:
- Run test scenarios
- Verify agent coordination
- Check response quality
- Adjust settings as needed
- Document what works
Troubleshooting Common Issues
Agents Not Coordinating Well
Symptoms: Agents ignore each other, duplicate work, or contradict each other
Solutions:
- Review system prompts for collaboration instructions
- Add a coordinator agent to direct traffic
- Ensure agents have distinct, non-overlapping roles
- Add context blocks explaining team structure
Responses Too Slow
Symptoms: Long wait times for swarm responses
Solutions:
- Reduce number of agents
- Use faster models (gpt-4o-mini, claude-haiku)
- Simplify the task description
- Remove unnecessary context blocks
Output Quality Issues
Symptoms: Responses don't meet expectations
Solutions:
- Add more specific instructions to task description
- Include examples in context blocks
- Adjust agent temperature settings
- Consider different model selections
Cost Higher Than Expected
Symptoms: Usage costs exceeding budget
Solutions:
- Use cost-effective models for simple tasks
- Reduce context block size
- Limit conversation history retention
- Right-size agent count
Next Steps
Now that you understand swarm creation:
- [Communication Patterns](/docs/swarms/communication-patterns): Master agent coordination
- [Context Blocks](/docs/swarms/context-blocks): Share knowledge effectively
- [Human-in-the-Loop](/docs/swarms/human-in-loop): Control your level of involvement