agentworkforce avatar

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-code

Installs 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
1aj-geddes avatarAnomaly Detectionaj-geddes/useful-ai-promptsIdentify unusual patterns, outliers, and anomalies in data using statistical methods, isolation forests, and autoencoders for fraud detection and quality monito0skills.sh installs
2aj-geddes avatarClassification Modelingaj-geddes/useful-ai-promptsBuild binary and multiclass classification models using logistic regression, decision trees, and ensemble methods for categorical prediction and classification0skills.sh installs
3aj-geddes avatarComputer Visionaj-geddes/useful-ai-promptsImplement computer vision tasks including image classification, object detection, segmentation, and pose estimation using PyTorch and TensorFlow0skills.sh installs
4aj-geddes avatarCorrelation Analysisaj-geddes/useful-ai-promptsMeasure relationships between variables using correlation coefficients, correlation matrices, and association tests for correlation measurement, relationship an0skills.sh installs
5aj-geddes avatarData Cleaning Pipelineaj-geddes/useful-ai-promptsBuild robust processes for data cleaning, missing value imputation, outlier handling, and data transformation for data preprocessing, data quality, and data pip0skills.sh installs
6aj-geddes avatarData Visualizationaj-geddes/useful-ai-promptsCreate effective visualizations using matplotlib and seaborn for exploratory analysis, presenting insights, and communicating findings with business stakeholder0skills.sh installs