resources

One prompt. N agents.Done in parallel.

Agent Swarms: Coordinate Multiple Agents

One prompt. N agents.Done in parallel.

Stop running tasks one by one. Spawn a swarm of agents, each tackling a piece of the problem simultaneously. Orchestrate, fan out, collect results. This is how you scale intelligence.

Swarm vs Subagent vs Agent Team

Three orchestration patterns. Each with different tradeoffs in control, context sharing, and scale.

Subagent

  • Reports to 1 parent agent
  • Isolated context per task
  • Sequential or parallel execution
  • Parent controls scope and prompt
  • Best for: discrete, bounded tasks

Swarm

  • N workers spawned simultaneously
  • Orchestrator coordinates all
  • Fan-out pattern with result collection
  • Workers are independent, no peer comms
  • Best for: parallel bulk work

Agent Team

  • Full sessions per agent
  • Peer-to-peer communication
  • Experimental, harder to control
  • Best for: complex multi-step projects

The 6 Swarm Patterns

Click each pattern to expand. Every pattern includes a flow visualization, example, and code you can use today.

The simplest swarm pattern. Take one prompt, spawn N agents with different inputs, collect all results. Each agent is independent and has no awareness of the others.

Example: Analyze 5 clients simultaneously

Inspired by the classic distributed computing pattern. List items, map an agent to each, then reduce all outputs into a single result. The reduce step is where intelligence compounds.

Example: Security scan all API route files

Each stage has a dedicated agent with a specific role. Output of one becomes input of the next. Unlike fan-out, this is sequential by design, but each agent is a specialist.

Example: Research prospect → write DM → review → send via LinkedIn

When you are stuck on a hard problem, the worst thing is tunnel vision. This pattern forces diversity of thought by giving each agent a different hypothesis. No anchoring bias. No groupthink.

The key insight: the critic has fresh eyes. No sunk cost fallacy, no attachment to the code, no bias from having written it. Each iteration improves quality. Stopping condition prevents infinite loops.

The brute force pattern. When you have a large number of items that need the same transformation, loop through them and spawn an agent for each. The & operator in bash runs each in the background. wait blocks until all complete.

Example: Migrate 200 Python files from Python 2 to Python 3

Swarm in Motion

An orchestrator dispatches work to N agents. Each runs independently, returns results to the center.

The /batch Skill

Built-in swarm orchestration. One command decomposes, plans, spawns, and manages parallel agents for you.

Decompose

Automatically scans the codebase and identifies all units of work (files, components, modules)

Plan

Presents the full plan for your approval: which files, what changes, estimated scope per unit

Spawn

One agent per unit, each in its own worktree. No conflicts, no merge issues, full isolation

Execute

All agents run in parallel. Each makes its changes, runs tests, validates output independently

Deliver

Each agent opens a PR. 20 PRs in parallel, clean diffs, ready for your review. You just approve.

Interactive Swarm Builder

Select your task, scale, and output format. Get an orchestrator prompt you can copy and run.

Real Use Cases

Patterns that have been deployed in production. Real numbers, real workflows.

Mass JS to TS Migration

200 JavaScript files converted to TypeScript with full type annotations. One agent per file, all running in parallel. Types inferred from usage patterns, imports rewritten, tests updated.

Competitive Analysis

One agent per competitor. Each researches pricing, features, positioning, reviews, tech stack. All results merged into a single comparison matrix with scoring and recommendations.

Multi-Language Translation

Marketing copy translated into 10 languages simultaneously. Each agent is prompted with language-specific cultural context and terminology. Native-quality output, not machine translation.

Client Weekly Reports

One agent per client reads their project folder, communication log, and progress file. Generates a formatted weekly report with blockers, wins, and next actions. 12 reports at once.

Cost Calculator

Compare swarm cost vs sequential. Swarms cost the same in tokens but save massive time.

Knowledge Check

5 questions. Test your understanding of agent swarm patterns.

don't miss what's next.

playbooks, templates, and tools that actually save you hours. straight to your inbox. no spam. unsubscribe anytime.

Want this running in your business, not just your terminal? Our Claude Code development agency ships it for you, or book a free consultation to scope your setup.

Day 35: Advanced Hooks Mastery

Day 37: Agent Teams: Roles & Handoffs

Ready to transform your business?

Let’s turn your next automation opportunity into a system that works.

Book a Free Strategy Call