5 deep dives · line by line · runnable

Every line of the agent, explained

Each week's code, taken apart one line at a time for someone who has never built an agent. Tap a line → plain English. Then hit ▶ Run code to execute real Python in your browser — no install, no API key, no account. Do these after the matching week; they're the “how does the code actually work?” companion.

How to use these. Each deep dive is a self-contained ~2-hour session: read every line, tap for the plain-English explanation, run each cell in order, and clear the checkpoint after each one. The agent code runs on a hand-written mock LLM so it works offline — every deep dive shows the one-line swap to a real Claude/GPT API for Colab.

1DEEP DIVE

From Chatbot to Agent

The ReAct loop, tools, and a mock brain — the four steps that make an agent.
Open →
2DEEP DIVE

Memory & Tools

Short- and long-term memory, and a tool schema the model can route on.
Open →
3DEEP DIVE

Agents That Read (RAG)

Chunks, embeddings, cosine similarity, and top-k — with real numpy.
Open →
4DEEP DIVE

Many Minds (Multi-Agent)

A researcher → writer → critic pipeline, plus tree-of-thought.
Open →
5DEEP DIVE

Guardrails & Ship It

A guardrail, a trace log, and an eval harness — the trust checklist in code.
Open →
◆ Course home Start with Deep Dive 1 →