โ† All skills 2389 Research ยท Agent Skills
Agents & Orchestration

building-multiagent-systems

v1.0.0

Architecture patterns for multi-agent systems with orchestrators, sub-agents, and tool coordination

Install โ€” npx skills ยท recommended
npx skills add 2389-research/building-multiagent-systems
Prefer Claude Code? Install via /plugin
/plugin install building-multiagent-systems@2389-research

Building multi-agent systems

Architecture patterns for multi-agent systems where AI agents coordinate using tools.

Installation

/plugin marketplace add 2389-research/claude-plugins
/plugin install building-multiagent-systems@2389-research

What this plugin does

Guides you through designing and implementing multi-agent systems -- coordination, lifecycle management, production hardening. Based on patterns from real production systems.

Concepts covered

When to use

Quick example

// Four-layer architecture for each agent
const parentAgent = new Agent({
  model: 'sonnet',  // Layer 1: Reasoning
  tools: [editTool, readTool, bashTool],  // Layer 3: Tool bus with schemas
  permissions: ['file:read', 'file:write']  // Layer 2: Orchestration policy
});

// Fan-out/fan-in pattern: spawn specialist sub-agents
const reviewers = [
  { type: 'security', model: 'smart', tools: [readTool] },
  { type: 'performance', model: 'fast', tools: [readTool] },
  { type: 'style', model: 'fast', tools: [readTool] },
  { type: 'tests', model: 'smart', tools: [readTool, bashTool] }
];

// Spawn with permission inheritance (read-only for reviewers)
const results = await Promise.all(
  reviewers.map(r => parentAgent.spawnSubAgent({
    name: r.type,
    model: r.model,
    tools: r.tools,
    permissions: ['file:read'],  // Cannot write - safer
    timeout: 120000
  }))
);

// Cascading cleanup with heartbeat monitoring
async function cleanup() {
  const children = await getChildAgents();
  await Promise.all(children.map(c => c.stop()));
  await this.stop();
}

Discovery questions

Before architecting, the skill asks:

  1. Starting point -- greenfield, adding to existing, or fixing current?
  2. Primary use case -- parallel work, pipeline, delegation, collaboration, queue?
  3. Scale expectations -- small (2-5), medium (10-50), large (100+)?
  4. State requirements -- stateless, session-based, or persistent?
  5. Tool coordination -- independent, shared read-only, write coordination, rate-limited?
  6. Existing constraints -- language, framework, performance, compliance?

Common pitfalls

Documentation

See skills/SKILL.md for the complete architecture patterns and implementation guidance.

Philosophy

Production-ready patterns over improvisation. Every pattern here addresses a real failure mode from a production system.

---

If these patterns helped you build a better multi-agent system, a โญ helps us know it's landing.

Built by 2389 ยท Part of the Claude Code plugin marketplace