Skip to main content
Architecture

Master Orchestrators

The coordination layer that routes tasks to specialized sub-agents using intelligent prompt composition.

What is a Master Orchestrator?

A Master Orchestrator is the central coordination agent in the Pegasus architecture. It receives high-level tasks, decomposes them into subtasks, routes each to the appropriate specialized sub-agent, and synthesizes results.

Key insight: The orchestrator never performs domain-specific work directly. It delegates to sub-agents with scoped credentials, maintaining privilege separation.

12-Step Prompt Composition

The orchestrator builds context using a 12-step composition pipeline:

01 Base System Prompt Core identity and constraints
02 Available Cubes Enabled feature modules
03 Available Sub-Agents Registry-discovered agents
04 Current Context Session state and history
05 User Preferences Personalization settings
06 Security Boundaries Permission constraints
07 Task Decomposition Breaking down the request
08 Agent Selection Matching tasks to agents
09 Execution Plan Ordered action sequence
10 Result Synthesis Combining agent outputs
11 Quality Check Validation and retry logic
12 Response Format Output structure for caller

Registry-Based Agent Discovery

Orchestrators don't hard-code sub-agent references. Instead, they query capability registries at runtime:

  • Dynamic Discovery: Query registries by capability (e.g., "payment-ops") to find available agents
  • Ranked Selection: Registries return agents ranked by usage-proof voting scores
  • Hot-Swappable: New agents can be added without orchestrator code changes

Why Orchestrator Pattern?

Privilege Separation

Each sub-agent has scoped credentials. Orchestrator can't access what it doesn't delegate.

Auditability

Every delegation generates a cryptographic receipt for complete audit trails.

Modularity

Sub-agents can be updated, replaced, or scaled independently.

Specialization

Each agent optimized for its domain—payments, storage, auth, etc.