When to Use
- -You have a task that requires multiple capabilities (research + write + review)
- -You want to parallelize work across specialist agents
- -You need a central coordinator to track complex multi-step workflows
- -You are building an Internal AI OS and need the orchestration layer
Inputs
Complex task description, available specialist agent definitions, delegation rules.
Outputs
Orchestration plan, execution log, synthesized result, agent performance metrics.
Tools Required
OpenAI/ClaudePostgreSQL (task queue)Squish (memory)MCP tools
Skill Safety
Every 4M Labs skill is designed to be readable, auditable, and easy to modify before use. Treat skills like code: review them before running, check tool permissions, and keep secrets out of prompts.
SKILL.md
--- name: multi-agent-orchestrator description: Gives an agent the ability to coordinate multiple specialist agents using the orchestrator-workers pattern: decompose tasks, delegate, monitor progress, and synthesize results. inputs: - task: Complex task description needing multiple capabilities - agent_registry: List of available specialist agents with their capabilities - delegation_rules: How to assign subtasks (by capability, load, priority) - synthesis_format: How to combine worker outputs (merge, evaluate, rank) outputs: - orchestration_plan: Decomposed subtasks with agent assignments - execution_log: Per-worker status, outputs, and error handling - synthesized_result: Combined final output from all workers - metrics: Task completion time, agent utilization, success rate tools: - openai_claude: Orchestrator LLM for task decomposition and synthesis - task_queue_postgres: PostgreSQL-backed queue for subtask tracking - squish_memory: Cross-session agent memory and context passing - mcp_tools: Agent tool integrations for specialist capabilities safety: - Set maximum iterations and timeouts per worker agent - Log all delegation decisions for audit - Never delegate sensitive actions (deployments, payments) without human approval - Implement circuit breaker: if a worker fails 3 times, route to human - Validate worker outputs before synthesis to catch hallucinations --- # Multi-Agent Orchestrator Skill Coordinate multiple specialist agents using the orchestrator-workers pattern: decompose complex tasks, delegate to specialists, monitor progress, and synthesize results. ## When to Use - You have a task that requires multiple capabilities (research + write + review) - You want to parallelize work across specialist agents - You need a central coordinator to track complex multi-step workflows - You are building the Internal AI OS and need the orchestration layer ## How It Works 1. **Decompose**: Orchestrator analyzes task and breaks into subtasks with dependencies 2. **Assign**: Each subtask is assigned to the best-fit agent from the registry 3. **Execute**: Workers run in parallel or sequence based on dependency graph 4. **Monitor**: Orchestrator tracks progress, handles failures, re-routes as needed 5. **Synthesize**: Combine worker outputs into coherent final result ## Orchestration Patterns - **Fan-out**: One task to many workers in parallel (best for research/data gathering) - **Pipeline**: Sequential subtasks where each depends on previous output (best for content creation) - **Hybrid**: Parallel groups with sequential dependencies (best for complex projects) - **Competitive**: Multiple workers on same task, pick best result (best for creative work) ## Example Prompt "Set up a multi-agent system for writing a blog post. Use three specialist agents: 1) ResearchAgent - finds latest stats and examples on the topic, 2) WriterAgent - drafts the post based on research, 3) EditorAgent - reviews and polishes. Orchestrate them in a pipeline. Use Squish memory so WriterAgent can access ResearchAgent's findings." ## Related - Recipe: /recipes/internal-ai-os - Recipe: /recipes/agent-memory-squish
Related Recipes
Want multi-agent orchestrator running in your business?
4M Labs can deploy multi-agent orchestrator as a production workflow:
- Connected to your tools and data sources
- Secured for your team with proper access controls
- Deployed with monitoring and error handling
- Documented for handoff and future maintenance