A visual companion to the freeCodeCamp course

Learn the flow.
Build the agent.

LangGraph clicks when you can see how state moves. Explore five small graphs, then follow the same patterns into tools, memory, and RAG.

05 guided graphs 04 flow shapes 03h 09m source course

01 / The foundation

Four shapes explain the five graphs.

Graph II adds richer input to a single-node graph. The others change the route that state takes.

01

Single node

One function receives state, does a job, and returns an update.

Graph I & II
02

Sequence

Each node uses the state produced by the one before it.

Graph III
03

Branch

A routing function chooses which node runs next.

Graph IV
04

Loop

A conditional edge repeats a node until a stop rule is met.

Graph V

02 / Interactive graph lab

Step through the state.

Choose a graph, then move through its execution. The highlighted node and state snapshot show what just happened.

GRAPH 01 / SINGLE NODE

Hello World

The smallest possible LangGraph flow: read state, update it once, then finish.

EXECUTION MAPSTART → greeter → END
STATE INSPECTOR01 / 03
INPUT

The graph receives a message

State begins with a single field: the name to greet.

KEY IDEA

A node is a Python function. The graph determines when it runs.

03 / The crucial distinction

The router is a node.
The route is a decision.

Graph IV is where the course moves from a fixed sequence to a graph that chooses its next step.

01 / PASS THROUGH

router

A named node receives the state. In this example it does no arithmetic.

02 / CHOOSE

decide_next_node

The routing function reads operation and returns a route label.

03 / ARRIVE

add_node or subtract_node

The route map sends execution to exactly one calculation node.

GRAPH IIif statement inside one node

The calculation changes, but the graph still takes the same path.

GRAPH IVconditional edge between nodes

The path itself changes. Only the selected operation node runs.

04 / From graph to agent

Same structure. New capability.

Once state and routing make sense, the rest of the video adds model calls and tools to those same paths.

01

Simple bot

A model sits inside one node and answers a human message.

Human → Model → Answer
1:31:01 ↗
02

Conversation history

Earlier human and AI messages are sent again so later replies have context.

History → Model → New turn
1:42:54 ↗
03

ReAct tools

The model requests a tool. The tool returns a result. The model decides whether to continue.

Model ↔ Tools
2:03:20 ↗
04

Drafter

A person reviews the draft, requests changes, and finishes by saving it.

Draft ↔ Review → Save
2:28:46 ↗

05 / Final project

RAG: answer from the document.

The last agent uses retrieval as a tool. A question leads to relevant PDF passages, then to a response informed by those passages.

01Load PDFRead the source pages
02Split + embedPrepare searchable chunks
03RetrieveFind five relevant chunks
04AnswerUse the retrieved context

The learning check: Compare the answer with the actual PDF passage. A retrieval result can be irrelevant, and a fluent answer can still be wrong.

Watch RAG lesson ↗

Make it stick

Watch. Rebuild. Explain.

After each graph, predict its final state, recreate its edges, then explain why it reaches that result. That is the fastest way to turn the course into working knowledge.

Return to graph lab