home / skills / jeremylongshore / claude-code-plugins-plus-skills / orchestrating-multi-agent-systems

This skill helps you orchestrate multi-agent systems with handoffs, routing, and workflows across providers to improve task coordination.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill orchestrating-multi-agent-systems

Review the files below or copy the command above to add this skill to your agents.

Files (13)
SKILL.md
2.2 KB
---
name: orchestrating-multi-agent-systems
description: |
  Execute orchestrate multi-agent systems with handoffs, routing, and workflows across AI providers.
  Use when building complex AI systems requiring agent collaboration, task delegation, or workflow coordination.
  Trigger with phrases like "create multi-agent system", "orchestrate agents", or "coordinate agent workflows".
  
allowed-tools: Read, Write, Edit, Grep, Glob, Bash(npm:*)
version: 1.0.0
author: Jeremy Longshore <[email protected]>
license: MIT
---

# Orchestrating Multi Agent Systems

## Overview

This skill provides automated assistance for the described functionality.

## Prerequisites

Before using this skill, ensure you have:
- Node.js 18+ installed for TypeScript agent development
- AI SDK v5 package installed (`npm install ai`)
- API keys for AI providers (OpenAI, Anthropic, Google, etc.)
- Understanding of agent-based architecture patterns
- TypeScript knowledge for agent implementation
- Project directory structure for multi-agent systems

## Instructions

1. Create project directory with necessary subdirectories
2. Initialize npm project with TypeScript configuration
3. Install AI SDK v5 and provider-specific packages
4. Set up configuration files for agent orchestration
1. Write agent initialization code with AI SDK
2. Configure system prompts for agent behavior
3. Define tool functions for agent capabilities
4. Implement handoff rules for inter-agent delegation


See `{baseDir}/references/implementation.md` for detailed implementation guide.

## Output

- TypeScript files with AI SDK v5 integration
- System prompts tailored to each agent role
- Tool definitions and implementations
- Handoff rules and coordination logic
- Workflow definitions for task sequences
- Routing rules for intelligent task distribution

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources

- AI SDK v5 official documentation for agent creation
- Provider-specific integration guides (OpenAI, Anthropic, Google)
- Tool definition and implementation examples
- Handoff and routing pattern references
- Coordinator-worker pattern for task distribution

Overview

This skill helps you design, implement, and run orchestrated multi-agent systems that perform handoffs, routing, and workflow coordination across AI providers. It focuses on clear role definitions, tool interfaces, and routing logic so agents collaborate reliably. Use it to turn complex tasks into coordinated sequences of agent responsibilities and automated delegations.

How this skill works

The skill provides templates and patterns for initializing agents, defining system prompts, and declaring tool interfaces. It encodes handoff rules and routing policies so a coordinator can delegate work to specialist agents and manage state across provider boundaries. It also generates sample TypeScript/SDK integrations and workflow definitions you can adapt for Python-based orchestration.

When to use it

  • Building systems where multiple specialized agents must collaborate on a single user request
  • Routing tasks across different AI providers or models based on capability, cost, or latency
  • Implementing coordinator-worker workflows with clear handoffs and retries
  • Creating pipelines that require conditional branching, aggregation, or multi-step approvals
  • Prototyping multi-agent plugins, automation flows, or developer tooling for AI teams

Best practices

  • Define clear agent roles and limited tool interfaces to reduce overlap and ambiguity
  • Use a central coordinator with explicit handoff rules and observability hooks
  • Design routing policies based on capability, trust, and cost rather than only latency
  • Instrument state and message passing for debugging, retries, and replayability
  • Start with small end-to-end workflows and expand agents incrementally

Example use cases

  • Customer support workflow where intent classifier routes cases to response, billing, or escalation agents
  • Data extraction pipeline with a scraper agent, extractor agent, verifier agent, and aggregator
  • Multi-provider answer synthesis: query specialist agents across providers, merge results, and produce final output
  • DevOps automation where a planning agent delegates tasks to execution agents that call provider-specific tools
  • Interactive tutorial system that spawns role-playing agents and routes student interactions

FAQ

Does this require a specific SDK or language?

Patterns are SDK-agnostic, but examples use AI SDK v5 and TypeScript; you can adapt the orchestration and workflow concepts to Python and other SDKs.

How do I handle errors and retries between agents?

Implement centralized error handling in the coordinator, add idempotent tool functions, and include retry/backoff policies in handoff rules.