orchestrating-multi-agent-systems
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".
- License 许可
- MIT
- 最近更新
- 2025-12-18
- Stars
- ★ 29
- Forks
- 9
01 前言 Front Matter
- name
- orchestrating-multi-agent-systems
- license
- MIT
- version
- 1.0.0
- description
- 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:*, node:*)
02 资源文件 114
- 其他.build-trigger24 B
- 其他articles/.gitkeep—
- 参考文档articles/2026-best-travel-dates-according-to-your-zodiac-sign.md6.1 KB
- 参考文档articles/30-unique-travel-gift-ideas-for-globetrotters-and-adventure-lovers.md4.3 KB
- 参考文档articles/5-essential-tips-for-successful-family-travel-planning.md4.6 KB
- 参考文档articles/6-essential-tips-to-prevent-travel-fraud-and-save-money.md5.8 KB
- 参考文档articles/7-budget-friendly-tips-for-exploring-finger-lakes-this-summer.md5.0 KB
- 参考文档articles/7-stretches-relieve-hip-knee-pain.md5.0 KB
- 参考文档articles/9-essential-nutrition-tips-for-healthy-travel.md4.4 KB
- 参考文档articles/aaa-texas-urges-early-travel-safety-for-july-4-trips.md4.4 KB
- 参考文档articles/aaas-top-labor-day-travel-tips.md5.0 KB
- 参考文档articles/airline-flights-1980s-vs-today-travel-changes.md6.0 KB
- 参考文档articles/an-honest-review-of-osaka-expo-is-it-worth-visiting.md2.1 KB
- 参考文档articles/arachova-greece-travel-guide-2026-skiing-delphi-and-more.md5.6 KB
- 参考文档articles/austria-luxury-adventure-destination.md6.0 KB
- 参考文档articles/avoid-these-10-critical-airport-mistakes-in-2025.md1.8 KB
- 参考文档articles/best-cruises-2027-total-solar-eclipse.md5.2 KB
- 参考文档articles/best-food-tours-america.md4.7 KB
- 参考文档articles/best-food-tours-toronto-first-time-visitors.md4.6 KB
- 参考文档articles/best-hotels-in-doha-luxury-getaway.md4.6 KB
- 参考文档articles/best-us-cities-food-lovers-2026.md4.9 KB
- 参考文档articles/canadians-us-travel-rebound-trade-tensions.md4.8 KB
- 参考文档articles/casa-koko-punta-mita-luxury-villa-riviera-nayarit.md6.1 KB
- 参考文档articles/casa-koko-punta-mita-private-villa-luxury-travel-2.md5.4 KB
- 参考文档articles/casa-koko-punta-mita-private-villa-luxury-travel.md5.8 KB
- 参考文档articles/celebrity-cocktail-favorites-taste-test-guide.md5.7 KB
- 参考文档articles/coping-with-menopause-managing-night-sweats-and-anxiety-on-vacation.md5.4 KB
- 参考文档articles/cork-ireland-food-tourism-destination.md5.4 KB
- 参考文档articles/couples-travel-destinations-least-likely-break-up.md5.6 KB
- 参考文档articles/culinary-journeys-food-focused-itineraries.md5.7 KB
- 参考文档articles/culinary-travel-indian-foodies.md6.4 KB
- 参考文档articles/dead-sea-secret-river-forbidden-landscape.md5.8 KB
- 参考文档articles/discover-the-naked-flying-travel-trend-why-you-should-try-it.md5.5 KB
- 参考文档articles/discover-the-top-travel-purses-stylish-and-practical-solutions-for-your-essentials.md4.1 KB
- 参考文档articles/discovering-the-hidden-charm-of-rockaway-beach-missouri-a-perfect-side-trip-from-branson.md3.9 KB
- 参考文档articles/don-julio-x-popeyes-and-food-collaborations-were-talking-about-in-2025.md5.1 KB
- 参考文档articles/essential-tips-to-prevent-the-spread-of-african-swine-fever-while-traveling-abroad.md4.2 KB
- 参考文档articles/essential-travel-tips-during-flash-flood-warnings-from-mobile-fire-rescue.md4.0 KB
- 参考文档articles/essential-travel-tips-for-first-time-greater-bay-area-visitors.md5.9 KB
- 参考文档articles/essential-travel-tips-for-patriots-fans-flying-to-super-bowl-lx.md5.7 KB
- 参考文档articles/experience-brazil-5-lessons-from-rio.md1.8 KB
- 参考文档articles/explore-europe-2026-border-updates-train-hacks-insider-tips.md5.3 KB
- 参考文档articles/food-inflation-the-egg-comes-first-but-the-chicken-matters.md5.6 KB
- 参考文档articles/hamptons-summer-2026-new-openings.md4.6 KB
- 参考文档articles/healthy-summer-travel-tips-for-a-stress-free-vacation.md4.6 KB
- 参考文档articles/hotel-mini-fridges-food-safety-warning-experts.md5.7 KB
- 参考文档articles/how-to-choose-right-food-tour-lima.md7.2 KB
- 参考文档articles/jamaica-tourism-3-0-sustainable-travel.md6.0 KB
- 参考文档articles/japan-immigration-travel-guide-2026-tips-for-smooth-airport-entry.md5.8 KB
- 参考文档articles/luxury-culinary-wellness-retreat-bali-mandapa.md5.6 KB
- 参考文档articles/madrid-beyond-local-expert-travel-experiences.md5.4 KB
- 参考文档articles/madrid-beyond-redefines-luxury-travel-local-connections.md5.6 KB
- 参考文档articles/master-japanese-travel-essential-guide-to-ic-cards.md5.2 KB
- 参考文档articles/mateh-yehuda-wine-festival-israel-day-trip-guide.md5.4 KB
- 参考文档articles/melatonin-for-jet-lag-expert-insights-and-benefits.md5.6 KB
- 参考文档articles/menorca-boutique-wine-scene-mediterranean-alternative.md6.0 KB
- 参考文档articles/navigating-foreign-travel-expert-tips-for-americans-amid-political-tensions.md4.3 KB
- 参考文档articles/nine-stylish-swedish-airbnbs-midsummer-travel.md5.1 KB
- 参考文档articles/orchard-mulled-cider-and-sharp-cheddar-fall-guide.md5.1 KB
- 参考文档articles/pilates-overtaking-yoga-2026-fitness-trends.md5.1 KB
- 参考文档articles/plan-food-led-trip-new-zealand.md6.6 KB
- 参考文档articles/playcations-rise-active-outdoor-adventures-summer-2025.md5.4 KB
- 参考文档articles/restorative-yoga-poses-period-pain.md5.4 KB
- 参考文档articles/romantic-destinations-couples-least-likely-break-up.md5.5 KB
- 参考文档articles/royal-caribbean-legend-of-the-seas-2026-debut.md4.5 KB
- 参考文档articles/royal-caribbean-sandals-deal-travelers.md4.8 KB
- 参考文档articles/save-on-philly-summer-2025-top-travel-tips-from-aaa.md5.2 KB
- 参考文档articles/secret-travel-tips-to-save-money-on-your-vacation.md5.3 KB
- 参考文档articles/skip-saint-tropez-var-coast-french-riviera-alternative.md5.8 KB
- 参考文档articles/smart-travelers-choosing-caribbean-summer-over-europe.md5.4 KB
- 参考文档articles/staying-calm-during-flight-turbulence-and-unexpected.md7.1 KB
- 参考文档articles/stylish-airbnbs-sweden-midsummer-getaway.md5.1 KB
- 参考文档articles/summer-travel-demand-strong-despite-global-uncertainty.md5.4 KB
- 参考文档articles/the-golden-age-of-air-travel-80s-experience.md6.8 KB
- 参考文档articles/top-8-romantic-weekend-getaways-for-valentines-day-couples.md5.1 KB
- 参考文档articles/top-luxury-destinations-multigenerational-family-travel.md5.3 KB
- 参考文档articles/top-luxury-destinations-multigenerational-travel-2.md4.9 KB
- 参考文档articles/top-luxury-destinations-multigenerational-travel.md5.3 KB
- 参考文档articles/top-reasons-greece-is-perfect-for-family-trips-in-2026.md5.5 KB
- 参考文档articles/top-travel-shoe-bags-for-2025-best-picks-revealed.md5.3 KB
- 参考文档articles/top-travel-trends-captivating-young-adventurers-today.md5.1 KB
- 参考文档articles/travel-health-2026-disease-outbreaks-travelers-need-know.md5.9 KB
- 参考文档articles/travel-to-the-source-food-drink-provenance.md6.8 KB
- 参考文档articles/travel-tyrol-austria-budget.md4.7 KB
- 参考文档articles/traveling-for-food-culinary-experience-trip.md5.2 KB
- 参考文档articles/traveling-with-pain-skip-bpc-157-wolverine-peptide.md6.6 KB
- 参考文档articles/tsa-officers-unpaid-essential-travel-advice-during-government-shutdown.md5.1 KB
- 参考文档articles/turbulence-tests-couples-travel-dating-trend.md6.0 KB
- 参考文档articles/turks-and-caicos-must-visit-2026.md4.5 KB
- 参考文档articles/uk-issues-new-middle-east-travel-advisory-amid-tensions.md5.5 KB
- 参考文档articles/ultimate-amalfi-coast-travel-guide-for-first-time-visitors.md4.9 KB
- 参考文档articles/uncover-spains-best-kept-secrets-travel-tips-inspired-by-bea-alonzos-itinerary.md4.2 KB
- 参考文档articles/understanding-hip-dips-embracing-your-unique-body-shape.md5.7 KB
- 参考文档articles/understanding-safety-for-thailand-travel-tourist-guide-post-myanmar-earthquake.md4.6 KB
- 参考文档articles/unlocking-tyrol-regional-guest-cards-budget-adventure.md5.1 KB
- 参考文档articles/var-coast-french-riviera-alternative-saint-tropez.md5.7 KB
- 参考文档articles/victory-cruise-lines-2027-canada-new-england-itineraries.md4.8 KB
- 参考文档articles/victory-cruise-lines-canada-new-england-itineraries-2027.md6.3 KB
- 参考文档articles/vogue-editors-summer-2026-travel-plans.md5.5 KB
- 参考文档articles/why-travelers-are-booking-cruises-years-in-advance.md4.7 KB
- 参考文档articles/wine-of-the-month-a-west-coast-chenin-blanc.md3.7 KB
- 参考文档articles/young-travelers-transform-travel-into-a-lifestyle-not-luxury.md4.8 KB
- 资产文件assets/.gitkeep—
- 脚本assets/agent_template.ts3.8 KB
- 脚本assets/example_coordinator.ts3.7 KB
- 资产文件assets/example_workflow.json6.7 KB
- 资产文件assets/README.md333 B
- 参考文档dedup-index.json16.8 KB
- 参考文档references/README.md441 B
- 脚本scripts/agent_setup.sh2.6 KB
- 脚本scripts/dependency_installer.sh2.8 KB
- 脚本scripts/env_setup.sh2.6 KB
- 脚本scripts/README.md380 B
- 参考文档site.yaml5.5 KB
03 SKILL.md 正文
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
Step 1: Initialize Project Structure
Set up the foundation for your multi-agent system:
- Create project directory with necessary subdirectories
- Initialize npm project with TypeScript configuration
- Install AI SDK v5 and provider-specific packages
- Set up configuration files for agent orchestration
Step 2: Define Agent Roles
Identify and specify specialized agents needed:
- Determine agent responsibilities and capabilities
- Define agent system prompts with clear instructions
- Specify tools each agent can access
- Establish agent communication protocols
Step 3: Implement Agents
Create individual agent files with proper configuration:
- Write agent initialization code with AI SDK
- Configure system prompts for agent behavior
- Define tool functions for agent capabilities
- Implement handoff rules for inter-agent delegation
Step 4: Configure Orchestration
Set up coordination between agents:
- Define workflow sequences for task processing
- Implement routing logic for task distribution
- Configure handoff mechanisms between agents
- Set up state management for multi-step workflows
Step 5: Test and Refine
Validate the multi-agent system functionality:
- Test individual agent responses and behaviors
- Verify handoff execution between agents
- Validate routing logic with different input scenarios
- Monitor coordination and identify bottlenecks
Output
The skill generates a complete multi-agent system including:
Project Structure
{baseDir}/
├── agents/
│ ├── coordinator.ts # Main orchestration agent
│ ├── specialist-1.ts # Domain-specific agent
│ ├── specialist-2.ts # Domain-specific agent
│ └── [additional agents]
├── orchestration/
│ ├── workflow.ts # Workflow definitions
│ ├── routing.ts # Routing logic
│ └── handoffs.ts # Handoff configurations
├── tools/
│ └── [agent tools] # Shared tool implementations
├── config/
│ └── agents.config.ts # Agent configurations
└── package.json # Dependencies
Agent Implementation Files
- TypeScript files with AI SDK v5 integration
- System prompts tailored to each agent role
- Tool definitions and implementations
- Handoff rules and coordination logic
Orchestration Configuration
- Workflow definitions for task sequences
- Routing rules for intelligent task distribution
- State management for multi-step processes
- Error handling and fallback mechanisms
Documentation
- Agent role descriptions and capabilities
- Workflow diagrams showing agent interactions
- API documentation for agent endpoints
- Usage examples for common scenarios
Error Handling
Common issues and solutions:
Agent Initialization Failures
- Error: AI SDK provider configuration invalid
- Solution: Verify API keys in environment variables, check provider-specific setup requirements
Handoff Execution Errors
- Error: Agent handoff fails or creates circular dependencies
- Solution: Review handoff rules for clarity, implement handoff depth limits, add fallback agents
Routing Logic Failures
- Error: Tasks routed to incorrect agent or no agent
- Solution: Refine routing criteria, add default routing rules, implement topic classification improvement
Tool Access Violations
- Error: Agent attempts to use unauthorized tools
- Solution: Review tool permissions per agent, implement proper access control, validate tool configurations
Workflow Deadlocks
- Error: Multi-agent workflow stalls without completion
- Solution: Implement timeout mechanisms, add workflow monitoring, design escape conditions for stuck states
Resources
AI SDK Documentation
- 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
Multi-Agent Architecture Patterns
- Coordinator-worker pattern for task distribution
- Pipeline pattern for sequential processing
- Hub-and-spoke pattern for centralized coordination
- Peer-to-peer pattern for collaborative agents
Agent Design Best Practices
- Single responsibility principle for agent specialization
- Clear handoff criteria and routing rules
- Comprehensive error handling and fallbacks
- State management for complex workflows
- Testing strategies for multi-agent systems
Example Use Cases
- Code generation pipelines with specialized agents
- Customer support routing systems
- Research and analysis workflows
- Content creation and review pipelines
- Data processing and validation systems
04 同仓库更多 Skills
testing-visual-regression
Detect visual changes in UI components using screenshot comparison. Use when detecting unintended UI changes or pixel differences. Trigger with phrases like "test visual changes", "compare screenshots", or "detect UI regressions".
generating-unit-tests
Automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions. Use when creating test coverage for functions, classes, or modules. Trigger with phrases like "generate unit tests", "create tests for", or "add test coverage".
generating-test-reports
Generate comprehensive test reports with metrics, coverage, and visualizations. Use when performing specialized testing. Trigger with phrases like "generate test report", "create test documentation", or "show test metrics".
orchestrating-test-execution
Coordinate parallel test execution across multiple environments and frameworks. Use when performing specialized testing. Trigger with phrases like "orchestrate tests", "run parallel tests", or "coordinate test execution".
managing-test-environments
Provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".
generating-test-doubles
Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".