M10-B — Task Distribution and Orchestration

How to read this note

Orchestration is a fancy word for who does what, in what order, with what information. This is the control room of every multi-agent system.


🎛️ What is orchestration?

BIG GOAL
    ↓
Orchestrator splits into TASKS
    ↓
Tasks assigned to AGENTS
    ↓
Results merged into FINAL OUTPUT

Without orchestration, agents talk over each other or repeat work.


📋 Task distribution — step by step

Step 1 — Decompose the goal

Goal: "Create weekly coaching newsletter"

Tasks:
  T1 — Collect updates from syllabus PDF
  T2 — Write 3 student success blurbs (from uploaded stories)
  T3 — Draft HTML email
  T4 — Check dates and fees against official doc

Often the manager LLM writes this task list first.

Step 2 — Assign agents

Task Agent Why this agent
T1 Researcher Good at finding facts in files
T2 Storyteller Good at warm writing
T3 Formatter Good at structure
T4 Fact-checker Good at catching errors

Step 3 — Run order

T1 and T2 can run parallel
        ↓
T3 needs T1 + T2 outputs
        ↓
T4 runs last on full draft

Parallel = faster. Sequential = when later step needs earlier result.

Step 4 — Merge

Orchestrator combines outputs into one package for human review.


⚙️ Backend flow (technical but simple)

User: "Run newsletter workflow"
         ↓
┌─────────────────────┐
│ Orchestrator engine │
│  - task graph       │
│  - agent registry   │
│  - message bus      │
└─────────┬───────────┘
          │
    ┌─────┴─────┐
    ▼           ▼
 Agent A      Agent B     ← may run at same time
    │           │
    └─────┬─────┘
          ▼
     Shared memory / message queue
          ↓
     Agent C (final merge)
          ↓
     Output to user
Term Kid-friendly meaning
Task graph Flowchart of steps
Agent registry List of available agents + their roles
Message bus Shared inbox where agents pass notes

Frameworks like CrewAI and AutoGen ship with orchestration built in — you define roles and tasks; they run the loop.


🔀 Orchestration patterns

Pattern When to use
Pipeline Fixed order A → B → C
Map-reduce Same task on 10 files, then merge summaries
Hierarchical Manager delegates to sub-managers
Human gate Pause before send/publish step

🎯 Brochure topics covered

Module 10 in brochure:

Module 11 next: CrewAI / AutoGen — tools that implement this for you.


✅ Design exercise

Goal: "AI Study Assistant generates weekly quiz from my notes"

Draw on paper:

  1. List tasks (minimum 3)
  2. Which run parallel?
  3. Which agent role per task?
  4. Where does human review?
  5. What memory is shared?

Bring drawing to class — this becomes your CrewAI project plan.


Previous: M10-A — When One Agent Is Not Enough
Next: M11-A — CrewAI How It Works