
AI Agents Foundations
Build an AI agent step by step — messages, tools, memory, guardrails and evals, all runnable in your browser. Needs basic Python (variables, lists, dicts, functions) — new to code? Start with Python Foundations.
1→2→3→4→5→6→7→8→9→10→11→12→13→14→15→16→17→18→19→20→21→22→23→24→25→
Lesson 1 — What an agent is
basics · 6 min
Lesson 2 — Messages as a list of dicts
basics · 6 min
Lesson 3 — Prompts and system messages
easy · 7 min
Lesson 4 — Calling a (fake) model
easy · 8 min
Lesson 5 — Structured output with JSON
easy · 8 min
Lesson 6 — Parsing and validating model output
easy · 9 min
Lesson 7 — Tools as Python functions
easy · 8 min
Lesson 8 — Tool schemas
medium · 9 min
Lesson 9 — Dispatching a tool call
medium · 9 min
Lesson 10 — Talking to a real model API
medium · 12 min
Lesson 11 — Tool calling with a real API (shape)
medium · 13 min
Lesson 12 — Streaming and stop reasons
medium · 12 min
Lesson 13 — What MCP is
medium · 13 min
Lesson 14 — Build a mini MCP-style tool server
medium · 15 min
Lesson 15 — The agent loop with a step limit
medium · 10 min
Lesson 16 — Observations back into the conversation
medium · 10 min
Lesson 17 — Multiple tools
medium · 11 min
Lesson 18 — Short-term memory: the conversation window
medium · 10 min
Lesson 19 — Long-term memory: keyword retrieval
medium · 12 min
Lesson 20 — Planning: break a goal into steps
hard · 12 min
Lesson 21 — Error handling and retries
hard · 12 min
Lesson 22 — Guardrails
hard · 12 min
Lesson 23 — Evaluating an agent with test cases
hard · 11 min
Lesson 24 — Multi-agent: planner and worker
hard · 13 min
Lesson 25 — Capstone: a study-buddy agent
very hard · 15 min