Swarm Type:Documentation Index
Fetch the complete documentation index at: https://docs.swarms.ai/llms.txt
Use this file to discover all available pages before exploring further.
HeavySwarm
Overview
The HeavySwarm is a sophisticated multi-agent orchestration system inspired by X.AI’s Grok 4 Heavy architecture. It automatically decomposes complex tasks into specialized questions and executes them using five built-in specialized agents: Research, Analysis, Alternatives, Verification, and Synthesis. Unlike other swarm types, HeavySwarm creates and manages its own agents internally — pass an emptyagents array ("agents": []) in the request.
Key features:
- Automatic Task Decomposition: Complex tasks are intelligently broken down into specialized questions using function calling
- Five Specialized Agents: Research, Analysis, Alternatives, Verification, and Synthesis agents work in concert
- Parallel Execution: Four specialist agents execute simultaneously for maximum efficiency
- Iterative Refinement: Multi-loop execution where each loop builds upon previous results
- Comprehensive Synthesis: A dedicated synthesis agent integrates all findings into an executive-ready report
Architecture
The HeavySwarm follows a structured 5-phase workflow:- Task Decomposition — A question generation agent analyzes the input task and creates four specialized questions using function calling
- Parallel Execution — Four specialized agents (Research, Analysis, Alternatives, Verification) execute their questions simultaneously
- Result Collection — Outputs are validated and collected from all agents
- Synthesis — A fifth Synthesis agent integrates all results into a comprehensive report
- Iterative Refinement — When
heavy_swarm_loops_per_agent> 1, the process repeats with context from previous iterations
Specialized Agents
| Agent | Role |
|---|---|
| Research Agent | Comprehensive information gathering, source verification, data collection, and systematic search strategies |
| Analysis Agent | Statistical analysis, pattern recognition, causal relationship identification, and predictive modeling |
| Alternatives Agent | Strategic option generation, creative problem-solving, scenario planning, and trade-off analysis |
| Verification Agent | Fact-checking, feasibility assessment, risk assessment, and compliance verification |
| Synthesis Agent | Multi-perspective integration, executive summaries, strategic alignment, and actionable recommendations |
HeavySwarm-Specific Parameters
Since HeavySwarm manages its own agents, it uses dedicated parameters at the swarm configuration level:| Parameter | Type | Default | Description |
|---|---|---|---|
heavy_swarm_loops_per_agent | integer | 1 | Number of execution loops per agent. Higher values enable iterative refinement for deeper analysis. |
heavy_swarm_question_agent_model_name | string | "gpt-4.1" | Model used for the question generation phase. This agent decomposes the task into specialized questions. |
heavy_swarm_worker_model_name | string | "claude-sonnet-4-20250514" | Model used for all five specialized worker agents (Research, Analysis, Alternatives, Verification, Synthesis). |
Use Cases
- Deep research and comprehensive market analysis
- Due diligence and investment research
- Policy analysis and strategic planning
- Technology assessment and competitive intelligence
- Complex problem-solving requiring multiple perspectives
- Medical or scientific research synthesis
API Usage
Basic HeavySwarm Example
- Shell (curl)
- Python (requests)
- JavaScript (fetch)
- Go
- Rust
Multi-Loop Deep Analysis Example
Use multiple loops for iterative refinement where each loop builds upon the previous results:- Shell (curl)
- Python (requests)
- JavaScript (fetch)
- Go
- Rust
Best Practices
- Use HeavySwarm for complex tasks that benefit from multi-perspective analysis rather than simple queries
- Start with
heavy_swarm_loops_per_agent: 1and increase only when deeper iterative analysis is needed - Choose the question agent model carefully — it determines the quality of task decomposition which drives the entire workflow
- Use a capable worker model (e.g.,
claude-sonnet-4-20250514) for the specialized agents to get high-quality research, analysis, and verification - HeavySwarm requires an empty
agentsarray ("agents": []) in the request — all five agents are created and managed internally - For time-sensitive tasks, keep
max_loopsat 1; increase for comprehensive research where thoroughness is prioritized over speed - Schedule non-urgent deep analysis during off-peak hours (8 PM - 6 AM PT) for cost savings