
Choosing Swarm Patterns
If you're building multi-agent systems with Agent Relay, this is the pattern reference you'll want open. It covers all 24 swarm patterns the engine supports, from the core 10 (fan-out, pipeline, hub-spoke, consensus, mesh, handoff, cascade, dag, debate, hierarchical) to 14 specialized ones like map-reduce and red-team. The decision framework is genuinely helpful for picking between them, and crucially, the YAML examples match the actual API surface. One caveat: hierarchical currently resolves to the same single-level topology as hub-spoke despite the name implying multi-level trees. Best used as a reference when you're staring at a coordination problem and need to know which pattern name to drop into that swarm.pattern field.
- GitHub stars
- 719
- last updated
- Jun 11, 2026
Install
$ npx -y skills add agentworkforce/relay --skill choosing-swarm-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Overview
Overview
The Agent Relay SDK (@agent-relay/sdk) supports 24 swarm patterns via a single swarm.pattern field. Patterns are configured declaratively in YAML — there are no standalone fanOut(...) / hubAndSpoke(...) helpers. Pick the simplest pattern that solves the problem; add complexity only when the system proves it's insufficient.
Run a pattern
TypeScript SDK runner
import { runWorkflow } from '@agent-relay/sdk/workflows';
const run = await runWorkflow('workflows/feature-dev.yaml', {
vars: { task: 'Add OAuth login' },
});
Quick Decision Framework
Sponsors
Details
- Repository
- github.com/agentworkforce/relay
- Category
- AI & Agent Building
- License
- Apache-2.0
- First seen
- Jun 11, 2026
More from agentworkforce/relay
All 18- Creating Agent Skills Skill
- Creating Claude Agents
- Creating Claude Hooks
- Creating Claude Rules
- Creating Skills
- Debugging Websocket Issues
- Deploying To Staging Environment
- Frontend Design
- Github Oauth Nango Integration
- Implementing Command Palettes
- Prpm Json Best Practices
- Relay 80 100 Workflow
- Review Fix Signoff Loop
- Setting Up Relayfile
- Using Agent Relay
- Writing Agent Relay Workflows
- Browser Testing With Screenshots