Skip to main content
Swarm Type: 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 empty agents 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:
  1. Task Decomposition — A question generation agent analyzes the input task and creates four specialized questions using function calling
  2. Parallel Execution — Four specialized agents (Research, Analysis, Alternatives, Verification) execute their questions simultaneously
  3. Result Collection — Outputs are validated and collected from all agents
  4. Synthesis — A fifth Synthesis agent integrates all results into a comprehensive report
  5. Iterative Refinement — When heavy_swarm_max_loops > 1, the process repeats with context from previous iterations

Specialized Agents

HeavySwarm-Specific Parameters

Since HeavySwarm manages its own agents, it uses dedicated parameters at the swarm configuration level:

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

Multi-Loop Deep Analysis Example

Use multiple loops for iterative refinement where each loop builds upon the previous results:
Example Response:

Best Practices

  • Use HeavySwarm for complex tasks that benefit from multi-perspective analysis rather than simple queries
  • Start with heavy_swarm_max_loops: 1 and 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 agents array ("agents": []) in the request — all five agents are created and managed internally
  • For time-sensitive tasks, keep max_loops at 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