Agent orchestrator

From eddiebelaval/squire · View interactive version

Agent orchestrator is an AI agent skill from the GitHub repository eddiebelaval/squire. Coordinate multiple AI agents and skills for complex workflows

How to use this skill

Skill file

Agent Orchestrator

The Agent Orchestrator skill coordinates multiple specialized AI agents, skills, and tools to accomplish complex tasks that benefit from distributed expertise. It acts as a conductor, delegating subtasks to appropriate agents, managing dependencies, integrating results, and ensuring coherent final outputs.

This skill understands the capabilities of available agents (general-purpose, operations-manager, specialized skills), determines optimal task decomposition, manages inter-agent communication, handles failures, and synthesizes diverse outputs into unified results. It's the meta-layer that makes multi-agent collaboration effective.

Use this skill for complex projects requiring diverse expertise, tasks that benefit from parallel execution, or workflows where specialized agents outperform general-purpose approaches.

Core Workflows

Workflow 1: Decompose Task & Delegate

  1. Analyze the complex task:
  1. Map to available agents/skills:
  1. Decompose into subtasks:
  1. Delegate to appropriate agents:
  1. Monitor execution:
  1. Integrate results:
  1. Validate final result

Workflow 2: Parallel Agent Execution

  1. Identify parallelizable subtasks:
  1. Prepare parallel execution:
  1. Launch agents in parallel:
  1. Coordinate completion:
  1. Aggregate results:
  1. Synthesize final output

Workflow 3: Sequential Agent Pipeline

  1. Design pipeline flow:
  1. Execute pipeline sequentially:
  1. Manage state between agents:
  1. Handle pipeline failures:
  1. Validate end-to-end result

Workflow 4: Adaptive Agent Selection

  1. Assess task requirements dynamically:
  1. Select best-fit agent:
  1. Delegate with context:
  1. Evaluate agent performance:
  1. Learn for future selection:

Workflow 5: Error Recovery & Fallback

  1. Detect agent failure:
  1. Diagnose failure cause:
  1. Attempt recovery:
  1. Log failure and recovery
  2. Continue workflow if recovered

Quick Reference

| Action | Command/Trigger |

|--------|-----------------|

| Delegate complex task | "Orchestrate agents for [task]" |

| Run agents in parallel | "Run these tasks in parallel: [tasks]" |

| Create agent pipeline | "Create pipeline: [agent1] → [agent2] → [agent3]" |

| Select best agent | "Which agent should handle [task]?" |

| Coordinate workflow | "Coordinate [workflow] across agents" |

| Handle agent failure | "Agent [X] failed on [task], recover" |

| Integrate agent outputs | "Synthesize outputs from [agents]" |

Best Practices

Agent Capabilities Map

Available Agents/Skills

| Agent/Skill | Specialty | Best For | Avoid For |

|-------------|-----------|----------|-----------|

| General-Purpose | Broad tasks | Quick tasks, general coding | Complex orchestration |

| Operations Manager | Project coordination | Workflows, timelines, resources | Writing code |

| UI Builder | Frontend design | Components, layouts, styling | Backend logic |

| Database Designer | Schema design | Tables, relationships, RLS | Frontend work |

| API Designer | Endpoint design | RESTful APIs, validation | UI/UX |

| Testing QA | Test creation | E2E tests, test plans | Feature development |

| Performance Optimizer | Speed optimization | Metrics, caching, lazy loading | Initial development |

| Deployment Automation | CI/CD | Vercel, environments, pipelines | Coding features |

| Prompt Engineer | AI optimization | Improving prompts, AI workflows | Non-AI tasks |

| Skill Creator | Skill development | Building new skills | Daily tasks |

| Workflow Designer | Process design | Complex workflows | Simple tasks |

| Chain Builder | Prompt sequences | Multi-step AI tasks | Single prompts |

MCP/Tool Access

| Agent | Available MCPs/Tools |

|-------|---------------------|

| General-Purpose | All (Playwright, Supabase, GitHub, Firecrawl, Memory) |

| Operations Manager | GitHub (PRs, issues), Memory (tracking) |

| UI Builder | Playwright (testing), Memory (design decisions) |

| Database Designer | Supabase (migrations, queries), Memory (schema) |

| Testing QA | Playwright (E2E), GitHub (test runs) |

Orchestration Patterns

Pattern 1: Expert Panel

Task → [Expert A, Expert B, Expert C] → Synthesize → Decision

Use when: Need diverse perspectives on same problem

Example: Architecture decision → [Performance expert, Security expert, Maintainability expert] → Recommendation

Pattern 2: Assembly Line

Task → Agent A → Agent B → Agent C → Output

Use when: Sequential transformations needed

Example: Design → Implement → Test → Deploy

Pattern 3: Divide & Conquer

Task → Split → [Agent 1: Part A, Agent 2: Part B, Agent N: Part N] → Merge → Output

Use when: Large task divisible into independent parts

Example: Multi-page app → [Agent per page] → Integrate

Pattern 4: Supervisor-Worker

Supervisor analyzes → Delegates to Workers → Workers execute → Supervisor integrates

Use when: Central coordination needed

Example: Project manager → [Feature developers] → Integration

Pattern 5: Collaborative Refinement

Agent A: Draft → Agent B: Critique → Agent A: Revise → Validate → Output

Use when: Quality improves through iteration

Example: Writer → Reviewer → Writer → Final

Pattern 6: Specialist Routing

Analyze task → Route to appropriate specialist → Specialist executes → Return

Use when: Different task types need different agents

Example: Issue triage → [Bug to QA | Feature to Developer | Ops to DevOps]

Delegation Templates

Standard Delegation

**Agent**: [Agent name]
**Task**: [Clear, specific task description]
**Context**: [Relevant background information]
**Inputs**: [Provided data/resources]
**Expected Output**: [Format and content requirements]
**Success Criteria**: [How to know it's done well]
**Constraints**: [Limitations or requirements]
**Deadline**: [If time-sensitive]

Parallel Delegation

**Parallel Execution**: [N agents]

**Agent 1**: [Agent name]
- Task: [Task 1]
- Output: [Output 1]

**Agent 2**: [Agent name]
- Task: [Task 2]
- Output: [Output 2]

**Integration**: [How to combine outputs]

Pipeline Delegation

**Pipeline**: [Agent A] → [Agent B] → [Agent C]

**Stage 1**: [Agent A]
- Input: [Initial data]
- Task: [Transform 1]
- Output: [Intermediate 1]

**Stage 2**: [Agent B]
- Input: [Intermediate 1]
- Task: [Transform 2]
- Output: [Intermediate 2]

**Stage 3**: [Agent C]
- Input: [Intermediate 2]
- Task: [Transform 3]
- Output: [Final output]

Coordination Strategies

Real-Time Coordination

Batch Coordination

Hierarchical Coordination

Peer-to-Peer Coordination

Conflict Resolution

When agents produce conflicting outputs:

  1. Identify the conflict:
  1. Evaluate sources:
  1. Resolve using strategy:
  1. Document resolution:

Performance Optimization

Reduce Overhead

Load Balancing

Failure Isolation

Monitoring & Observability

Track these metrics:

Example Orchestrations

Feature Development Workflow

**Orchestrator**: Coordinate feature development

1. **Requirements Analysis** (Operations Manager)
   - Clarify requirements
   - Define scope
   - Identify constraints

2. **Parallel Design Phase**
   - **UI Builder**: Design components
   - **Database Designer**: Design schema
   - **API Designer**: Design endpoints

3. **Integration Review** (Orchestrator)
   - Ensure designs are compatible
   - Resolve conflicts
   - Approve for implementation

4. **Implementation** (General-Purpose)
   - Build based on approved designs

5. **Quality Assurance** (Testing QA)
   - Generate E2E tests
   - Run test suite
   - Report issues

6. **Fix Issues** (General-Purpose)
   - Address failing tests

7. **Deployment** (Deployment Automation)
   - Deploy to staging
   - Verify deployment
   - Deploy to production

Content Creation Pipeline

**Orchestrator**: Create technical blog post

1. **Research** (General-Purpose + Firecrawl)
   - Gather sources
   - Extract key information

2. **Parallel Analysis**
   - **Prompt Engineer**: Analyze for clarity
   - **Workflow Designer**: Identify structure
   - **Output Formatter**: Determine format

3. **Draft** (General-Purpose)
   - Write based on research and analysis

4. **Review & Edit** (Prompt Engineer)
   - Review for quality
   - Suggest improvements

5. **Revise** (General-Purpose)
   - Apply feedback

6. **Format** (Output Formatter)
   - Format for target platform

7. **Generate Metadata** (General-Purpose)
   - SEO metadata
   - Social snippets
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.