Skip to content

Module 4: Activities

Carlos Lizarraga-Celaya edited this page Oct 15, 2026 · 20 revisions

a. Self-Check Prompts (~30 minutes)

Before moving on, answer the three prompts in a notes document or on a piece of paper. These won't be submitted or graded, they're meant to help you recall what you've learned. If you're unsure how to answer, revisit the relevant reading before continuing.

Prompt 1 - When Not to Use Multi-Agent Architecture

Describe one concrete scenario where a single ReAct agent would be a better choice than a multi-agent pipeline. What characteristic of that task makes it unsuitable for multi-agent decomposition?

Prompt 2 - Coordination Architectures

Compare two of the four coordination architectures, hierarchical supervisor-worker and role-based sequential pipeline. For each, identify a workflow from your own domain that would naturally fit and explain why in two to three sentences.

Prompt 3 - Coordination Failure Diagnosis

A three-agent pipeline (Researcher → Analyst → Critic) runs indefinitely: the Critic keeps rejecting the Analyst's output and sending it back for revision, but the Analyst's revisions never satisfy the Critic's criteria. Diagnose what is most likely causing this failure, and suggest one structural remediation (a change to routing, state design, or termination conditions) that would prevent it.


b. Lab Exercise (~2 hrs)

PLATFORM SETUP — READ BEFORE STARTING
All lab work runs in Google Colab (free tier). You do not need a paid subscription. You will need: (1) a Google account to access Colab; (2) a Hugging Face token for inference providers (free tier available), or an OpenAI/Groq API key, or a locally hosted Ollama model as a free alternative — setup instructions are included in the notebook.

In this lab, you will specify, implement, and run a three-role sequential pipeline (Researcher → Analyst → Critic) in LangGraph. The pipeline uses a typed state schema, a deterministic quality gate, and critic-triggered revision cycles capped at two iterations. This is the Role-Based Sequential Pipeline pattern from Chapter 2, extended with a bounded feedback loop.

Open the lab notebook: Module4_Learner_Starter.ipynb

Notebook Flow Summary

The notebook walks you through a complete multi-agent pipeline build sequence in two phases:

  • Phase 1: Role specification. Define all three roles (name, input/output format, handoff condition, failure mode) before writing code.
  • Phase 2: LangGraph implementation. Define the state schema, implement the nodes with structured logging, wire conditional routing with a hard revision limit, and run the pipeline on a complex topic of your choice.

All detailed instructions, checks, and logging prompts are embedded directly in the notebook.

WHAT TO SUBMIT
Add to github: Submit the .ipynb file with your completed LangGraph implementation (sections 1–2), all cells executed with output visible, and all three debrief questions answered (minimum two sentences each). Filename: Module4_Lab_[YourName].ipynb.

c. Hands-On Project: Framework Comparison (~2 hours)

In this project, you will continue in the same notebook from the guided lab to implement an equivalent three-role pipeline in CrewAI and write an evidence-based comparison between the two frameworks.

Notebook Flow Summary

The notebook walks you through a controlled framework comparison:

  1. CrewAI implementation. Build the same Researcher → Analyst → Critic pipeline with CrewAI's Agent, Task, and Crew abstractions, using the same topic, model, and quality criteria as the LangGraph version.
  2. Framework comparison report. At least 200 words on implementation verbosity (measured lines of code), observability, customization flexibility, and developer experience.
  3. Single-agent baseline. Run one ReAct agent on the same topic and model. Record the results for the LangGraph pipeline and the single-agent run in a table:
Measure LangGraph pipeline Single agent
Task accuracy (1–5 rubric below)    
Total tokens    
Wall-clock latency (s)    
Relative token cost n/a  

Score accuracy with this rubric: 1 = incorrect or hallucinated; 2 = partially correct; 3 = correct but incomplete; 4 = complete; 5 = complete, well-structured, and evidence-grounded. 4. Qualified recommendation. In 3–5 sentences, state whether the multi-agent pipeline is justified for this task. Cite your metric values, state the conditions under which your conclusion holds, and say what result would change it. A statement that "both approaches have trade-offs" is not a recommendation.

Note: with a single run per configuration, state this as a limitation (scores can vary between runs).

WHAT TO SUBMIT
Add to github:
Lab: Module4_Lab_[YourName].ipynb (sections 1–2).
Project: Module4_Project_[YourName].ipynb (sections 1–4: Lab sections plus CrewAI, comparison, and baseline). Both frameworks must use the same topic and model.

d. Peer Discussion

Part A: Discussion Post (~30 minutes)

For this discussion post, identify a complex workflow from your domain that you think would translate well to a multi-agent system. Choose one that you understand deeply enough to analyze its structure. Your post should include the following:

  • Workflow description: Briefly describe the workflow and why it is a good candidate for a multi-agent system.
  • Coordination architecture: Name the coordination pattern you would use and justify it in two sentences, grounded in the workflow's decomposability (can it be divided into independent or sequential sub-tasks?) and interdependency structure (do sub-tasks feed into each other, or contribute independently to the final output?).
  • Agent roles: List each agent role with a one-sentence responsibility, what it receives as input, and what it passes as output.
  • Failure modes: Identify at least two coordination failure modes specific to your workflow, named using the MAST taxonomy. For each, describe at least one structural mitigation (a change to routing logic, state schema design, or termination conditions). If you also propose a prompt-level fix, explain why it is not sufficient on its own.

Optional: Feel free to mention anything surprising or unexpected about the multi-agent systems you built in the lab/hands-on.

Part B: Peer Response

Reply to at least one classmate's post with substantive feedback to their proposal. Consider: does their mitigation strategy actually prevent the failure they described, or does a structural gap remain? Would a different agent division or coordination pattern serve their workflow better, and why?

DISCUSSION SUBMISSION
* Forum post: MAS Architecture Outline. Post directly in LMS Discussion Forum - no file attachment needed for the post itself.
* Forum reply: substantive critique of one classmate's outline - failure mode gap or alternative architecture argument.

Created: 05/14/2026 (C. Lizárraga)
Updated: 10/14/2026 (M. Yung)

Clone this wiki locally