New advertisers: 50% off your first month with code FIRSTMONTHSee slots
agentworkforce avatar

Choosing Swarm Patterns

Pattern reference and decision framework for choosing among 24 Agent Relay orchestration patterns.

GitHub stars
1.1K
last updated
Jun 11, 2026
View on GitHub

What it does

  • Covers 10 core patterns (fan-out, pipeline, hub-spoke, consensus, mesh, handoff, cascade, dag, debate, hierarchical) with topology and best-fit use cases
  • Includes a decision framework that starts from whether tasks are independent, linear, or require a decision, then narrows to one pattern
  • Lists 14 role-driven patterns such as map-reduce, supervisor, red-team, and review-loop, each with the roles that shape its topology
  • Notes that hierarchical currently resolves to the same edges as hub-spoke, and that swarm.pattern must be set explicitly in YAML

Install

$ npx -y skills add agentworkforce/relay --skill choosing-swarm-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/agentworkforce/relay
Category
AI & Agent Building
License
Apache-2.0
First seen
Jun 11, 2026

More from agentworkforce/relay

All 17

Similar to Choosing Swarm Patterns

More AI & Agent Building