Swarm Orchestration
Scale AI workflows with multi-agent orchestration and smart coordination
✨ The solution you've been looking for
Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and intelligent coordination. Use when scaling beyond single agents, implementing complex workflows, or building distributed AI systems.
See It In Action
Interactive preview & real-world examples
AI Conversation Simulator
See how users interact with this skill
User Prompt
I need to build a production-ready REST API with authentication, CRUD operations, and comprehensive tests. Can you orchestrate a swarm to handle this in parallel?
Skill Processing
Analyzing request...
Agent Response
Swarm deploys specialized agents (coder, tester, reviewer) working simultaneously on different aspects, delivering a complete API faster than sequential development
Quick Start (3 Steps)
Get up and running in minutes
Install
claude-code skill install swarm-orchestration
claude-code skill install swarm-orchestrationConfig
First Trigger
@swarm-orchestration helpCommands
| Command | Description | Required Args |
|---|---|---|
| @swarm-orchestration complex-api-development | Build a full REST API with concurrent development, testing, and review | None |
| @swarm-orchestration large-codebase-analysis | Distribute analysis tasks across multiple agents for faster processing | None |
| @swarm-orchestration distributed-data-processing | Handle large-scale data processing with adaptive load balancing | None |
Typical Use Cases
Complex API Development
Build a full REST API with concurrent development, testing, and review
Large Codebase Analysis
Distribute analysis tasks across multiple agents for faster processing
Distributed Data Processing
Handle large-scale data processing with adaptive load balancing
Overview
Swarm Orchestration
What This Skill Does
Orchestrates multi-agent swarms using agentic-flow’s advanced coordination system. Supports mesh, hierarchical, and adaptive topologies with automatic task distribution, load balancing, and fault tolerance.
Prerequisites
- agentic-flow v1.5.11+
- Node.js 18+
- Understanding of distributed systems (helpful)
Quick Start
1# Initialize swarm
2npx agentic-flow hooks swarm-init --topology mesh --max-agents 5
3
4# Spawn agents
5npx agentic-flow hooks agent-spawn --type coder
6npx agentic-flow hooks agent-spawn --type tester
7npx agentic-flow hooks agent-spawn --type reviewer
8
9# Orchestrate task
10npx agentic-flow hooks task-orchestrate \
11 --task "Build REST API with tests" \
12 --mode parallel
Topology Patterns
1. Mesh (Peer-to-Peer)
1// Equal peers, distributed decision-making
2await swarm.init({
3 topology: 'mesh',
4 agents: ['coder', 'tester', 'reviewer'],
5 communication: 'broadcast'
6});
2. Hierarchical (Queen-Worker)
1// Centralized coordination, specialized workers
2await swarm.init({
3 topology: 'hierarchical',
4 queen: 'architect',
5 workers: ['backend-dev', 'frontend-dev', 'db-designer']
6});
3. Adaptive (Dynamic)
1// Automatically switches topology based on task
2await swarm.init({
3 topology: 'adaptive',
4 optimization: 'task-complexity'
5});
Task Orchestration
Parallel Execution
1// Execute tasks concurrently
2const results = await swarm.execute({
3 tasks: [
4 { agent: 'coder', task: 'Implement API endpoints' },
5 { agent: 'frontend', task: 'Build UI components' },
6 { agent: 'tester', task: 'Write test suite' }
7 ],
8 mode: 'parallel',
9 timeout: 300000 // 5 minutes
10});
Pipeline Execution
1// Sequential pipeline with dependencies
2await swarm.pipeline([
3 { stage: 'design', agent: 'architect' },
4 { stage: 'implement', agent: 'coder', after: 'design' },
5 { stage: 'test', agent: 'tester', after: 'implement' },
6 { stage: 'review', agent: 'reviewer', after: 'test' }
7]);
Adaptive Execution
1// Let swarm decide execution strategy
2await swarm.autoOrchestrate({
3 goal: 'Build production-ready API',
4 constraints: {
5 maxTime: 3600,
6 maxAgents: 8,
7 quality: 'high'
8 }
9});
Memory Coordination
1// Share state across swarm
2await swarm.memory.store('api-schema', {
3 endpoints: [...],
4 models: [...]
5});
6
7// Agents read shared memory
8const schema = await swarm.memory.retrieve('api-schema');
Advanced Features
Load Balancing
1// Automatic work distribution
2await swarm.enableLoadBalancing({
3 strategy: 'dynamic',
4 metrics: ['cpu', 'memory', 'task-queue']
5});
Fault Tolerance
1// Handle agent failures
2await swarm.setResiliency({
3 retry: { maxAttempts: 3, backoff: 'exponential' },
4 fallback: 'reassign-task'
5});
Performance Monitoring
1// Track swarm metrics
2const metrics = await swarm.getMetrics();
3// { throughput, latency, success_rate, agent_utilization }
Integration with Hooks
1# Pre-task coordination
2npx agentic-flow hooks pre-task --description "Build API"
3
4# Post-task synchronization
5npx agentic-flow hooks post-task --task-id "task-123"
6
7# Session restore
8npx agentic-flow hooks session-restore --session-id "swarm-001"
Best Practices
- Start small: Begin with 2-3 agents, scale up
- Use memory: Share context through swarm memory
- Monitor metrics: Track performance and bottlenecks
- Enable hooks: Automatic coordination and sync
- Set timeouts: Prevent hung tasks
Troubleshooting
Issue: Agents not coordinating
Solution: Verify memory access and enable hooks
Issue: Poor performance
Solution: Check topology (use adaptive) and enable load balancing
Learn More
- Swarm Guide: docs/swarm/orchestration.md
- Topology Patterns: docs/swarm/topologies.md
- Hooks Integration: docs/hooks/coordination.md
What Users Are Saying
Real feedback from the community
Environment Matrix
Dependencies
Framework Support
Context Window
Security & Privacy
Information
- Author
- ruvnet
- Updated
- 2026-01-30
- Category
- productivity-tools
Related Skills
Swarm Orchestration
Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and …
View Details →Autogpt Agents
Autonomous AI agent platform for building and deploying continuous agents. Use when creating visual …
View Details →Autogpt Agents
Autonomous AI agent platform for building and deploying continuous agents. Use when creating visual …
View Details →