Comprehensive Market Intelligence with HeavySwarm
This example demonstrates how to use HeavySwarm for deep, multi-perspective analysis. Unlike other swarm types, HeavySwarm automatically creates and manages five specialized agents (Research, Analysis, Alternatives, Verification, Synthesis) — you provide the task, configuration, and an emptyagents array.
Step 1: Get Your API Key
- Visit https://swarms.world/platform/api-keys
- Sign in or create an account
- Generate a new API key
- Set it as an environment variable:
Step 2: Setup
Step 3: Define the Research Function
HeavySwarm creates its own five specialized agents internally — pass an emptyagents array and configure the swarm using HeavySwarm-specific parameters:
Step 4: Run the Analysis
Step 5: Multi-Loop Deep Dive (Optional)
For tasks requiring deeper analysis, increaseheavy_swarm_max_loops and max_loops. Each iteration builds on previous results:
HeavySwarm is best suited for complex research and analysis tasks that benefit from multiple specialized perspectives. It automatically decomposes your task into four targeted questions, executes them in parallel across Research, Analysis, Alternatives, and Verification agents, then synthesizes everything into a comprehensive report. No agent configuration is needed — just provide the task and an empty
agents array.