0Pricing
AI Prompt Engineering · Lesson

Orchestrator and Workers

Hierarchical coordination.

The Orchestrator Pattern

In the orchestrator-workers pattern, a single orchestrator agent owns the plan and the goal; worker agents execute scoped subtasks and report back. The orchestrator decomposes, dispatches, integrates, and decides when the task is done.

  • Orchestrator: planning, routing, synthesis, control flow.
  • Workers: focused execution within a tight contract.

This hierarchy concentrates judgment in one place and parallelizable labor in many.

Separation of Planning and Execution

The key discipline is keeping planning separate from doing. The orchestrator reasons about strategy with a small, high-level context; workers operate with detailed but narrow context. Mixing the two recreates the overloaded generalist.

The orchestrator should rarely touch raw tool output directly — it reasons over worker summaries.

plan = orchestrator.decompose(goal)        # high-level
results = [worker.run(sub) for sub in plan] # detailed, scoped
final = orchestrator.integrate(results)     # over summaries

All lessons in this course

  1. Roles and Specialization
  2. Orchestrator and Workers
  3. Inter-Agent Communication
  4. Debating and Voting Agents
← Back to AI Prompt Engineering