<aside> ๐ŸŽ™๏ธ

Date: Wednesday, October 14, 2026 ยท Week 3, Day 17 ยท Type: Build Day + Live Session 5 (7:30 PM IST, 90 min)

</aside>

Learning Manual

17.1 Why Multi-Agent Systems โ€” how separating complex tasks into specialized roles (e.g., Writer + Critic) improves output quality.

17.2 Inter-Agent Communication โ€” passing state messages, critique loops, and validation checks between independent agents.

17.3 Consensus & Approval Gates โ€” structuring a workflow where a Reviewer agent must approve a draft before output is released.

The Daily Build

Build a two-agent collaboration system: a Researcher/Coder Agent drafts a solution to a problem, and a Reviewer Agent critiques the code against specific quality criteria, sending it back for edits until approved (max 3 rounds).

Architecture Diagram

+-----------------------+
| Coder Agent (Drafts)  | <----+
+-----------------------+      |
            |                  |
    [Draft Output]        [Critique]
            |                  |
            v                  |
+-----------------------+      |
| Reviewer Agent (Eval) | -----+ (If Rejected)
+-----------------------+
            |
     (If Approved)
            v
   [Final Solution]

Interview Questions

  1. When is a multi-agent system genuinely better than a single well-prompted model with few-shot examples?
  2. How do you prevent multi-agent loops from blowing up token budgets and accumulating massive API costs?
  3. What is the difference between a hierarchical multi-agent system (manager โ†’ workers) and a choreographed system (state machine)?

Problem Statement

Problem 17. Write a multi-agent coordinator loop in Python that alternates between a Generator agent and an Evaluator agent, tracks revision history in a shared state list, and terminates either when the evaluator returns "APPROVED" or after 3 revision attempts.

AI-DSA Primitive

Data Structure: Message Passing State Graph.

Mechanics: Graph node structure where state variables are updated sequentially across agent transitions.

Real-World Production Use: Core architectural engine of LangGraph and CrewAI.

Software Design Pattern