Frameworks and Orchestration: LangGraph, CrewAI, and Multi-Agent Β· Milestone Companion: Earn the Framework by Drawing the Graph
What this milestone asks
Take the knowledge-base agent you built in Stage 2 and rebuild it in LangGraph β same corpus, same citation requirement, same refusal behavior β expressed now as an explicit state machine: typed state, named nodes (retrieve, draft, validate, β¦), and edges you can draw on paper. Then add the two things that separate a graph from a script: a human approval node that genuinely interrupts execution and waits for a person's decision, and bounded retries on the nodes that can fail.
The functional bar is identical to Stage 2 β your golden questions should still pass, citations intact. What changes is the shape of the system: the loop you once wrote by hand is now a declared structure, with checkpoints, interrupts, and state you can inspect mid-flight.
Why this milestone
Anthropic's Building Effective Agents (December 19, 2024) draws the line this entire stage is about: workflows are systems where LLMs follow predefined paths; agents are systems where the model directs its own process β and the most successful implementations use simple, composable patterns rather than complex frameworks. You hand-wrote your agent in Stage 1 and extended it in Stage 2 precisely so that a framework is now a deliberate trade, not an act of faith. LangGraph buys you durable state, interrupts, checkpointing, and a visualizable execution graph. It costs you a black box, a fast-moving dependency, and a debugging model you must learn. This milestone exists to make you feel both sides of that trade inside one codebase.
The approval node matters more than it looks. Human-in-the-loop is the dividing line between a toy and a production system, and it is trivial to describe yet surprisingly fiddly to implement β persisting state across an interrupt, resuming cleanly, recording who approved what. Multi-agent, by contrast, is present mostly as a warning: every additional agent is a new error-propagation surface. Meet the idea with skepticism before enthusiasm; split only when the bottleneck is provably "one context cannot hold this" or "one role cannot switch fast enough."
How to use the resources
- Start with the essay, not the framework. Read (or re-read) Building Effective Agents before touching LangGraph. Its workflow-versus-agent taxonomy is the lens for every design decision this stage; notice how differently it reads now that you have built Stages 1β2.
- Then the LangGraph official documentation and tutorials. Work the quickstart, then the persistence and human-in-the-loop guides β those two features are your milestone. Do this with your Stage-2 code open beside you, porting piece by piece rather than rewriting from a tutorial.
- Supplement with the DeepLearning.AI short course AI Agents in LangGraph for a compact walkthrough, and Sam Witteveen's LangGraph video series for code-level current practice β he tracks framework changes quickly, which matters because LangGraph moves fast.
- For the multi-agent question, watch the multi-agent lectures of the Berkeley LLM Agents MOOC and, for the role-based alternative, the DeepLearning.AI short course on CrewAI. The goal is comparative judgment: what does role-based orchestration give you, and at what complexity cost? Do not rebuild the milestone in CrewAI; a notebook sketch is enough.
- For depth, the prompting and agents lectures of CMU 11-711 (Advanced NLP, Graham Neubig β slides and assignments public) supply the research framing behind the patterns you are now using.
Common failure modes
- Graph maximalism. Twelve nodes with conditional routing because the framework allows it. Your Stage-2 agent needed four or five nodes; if the graph grew, justify every addition in writing.
- State schema bloat. Dumping the entire message history plus retrieved documents plus intermediate drafts into untyped state. Define a minimal typed state; pass bulky content by reference.
- Cycles without guards. A retry edge that loops back to the same node with no counter is the framework version of
while True. Every cycle gets a maximum-iteration guard. - The auto-approving human. An approval node that programmatically continues after two seconds is not human-in-the-loop; it is a sleep statement. The interrupt must persist and wait β across process restarts, if you want to be strict.
- Silent node failures. An exception inside a node that the graph converts into a generic state transition. Nodes should raise loudly, and the retry policy must be explicit about which errors are retryable.
- Not being able to draw it. If you cannot sketch the exact graph your code generates β every node, every edge condition β you have adopted the framework without earning it.
Acceptance checklist
- Stage-2 golden questions still pass, with citations intact and refusal behavior unchanged.
- A hand-drawn graph of the system matches the code exactly β node for node, edge for edge.
- The approval node genuinely blocks: execution persists, waits for external input, and resumes on decision.
- Retry logic is bounded (a counter in state) and observable (every attempt logged).
- The state schema is typed and minimal; you can justify every field in one sentence.
- One deliberately injected tool failure demonstrates: retry fires, then fallback, then graceful degradation.
- You can articulate, unprompted, three things LangGraph gives you that your 100-line loop did not β and one thing it took away.
Going further
Turn on checkpointing against a real database and restart a run mid-approval. Add a re-ranking node between retrieve and draft, and measure whether it earns its latency. Sketch β on paper only β how you would split the system into two agents, and list the new failure modes the split introduces; if that list is longer than the benefits, stay single-agent. You are now ready to connect your agent to systems that actually matter. That is Stage 4.