Advanced level · Module 2: Agent Orchestration · Lesson 1 of 4
From Hand-Built Loops to Graphs
Learners map their Intermediate state machine onto a graph and see what an orchestration framework adds: explicit structure, persistence, streaming and interrupts.
In this lesson you will
- Represent an agent workflow as a graph
- Explain what an orchestration framework provides
Key concepts
graphnodeedgeconditional edgeframework trade-offs
The lesson
The state machine from the Intermediate level is already a graph: statuses become nodes, allowed transitions become edges, and decisions become conditional edges. Orchestration frameworks make this structure explicit and add persistence, streaming of progress and pause-and-resume.
LangGraph (MIT licence) is used in this programme because it models agents as explicit state graphs, which suits institutional control. Other frameworks exist (for example smolagents), and plain Python remains a valid choice for small systems.
Using a framework does not remove the need to understand the control flow. Learners first build orchestration by hand so they can debug what the framework does.
Step by step
- Redraw the Intermediate state machine as a graph.
- Mark nodes, edges and conditional edges.
- List what you implemented by hand that a framework would provide.
- Read the LangGraph overview and note its core concepts.
Practice activity
Map the hand-built research agent onto a graph design.
Expected result: A correct graph diagram and a list of framework benefits and costs.
Check your understanding
-
What becomes a conditional edge in a graph?
Show answer
A decision that chooses between next steps.
-
Why build orchestration by hand first?
Show answer
To understand and debug what the framework does.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.