← All prompt collections

The full post, ready to copy

Stanford's Free AI Agents Course: Every Lecture Link (CS329Z)

Slide 1

Stanford's CS329Z, Engineering AI Agents, is a Fall 2026 course taught by Diyi Yang, Michael Ryan and John Yang. Stanford Online is putting the lectures on YouTube, free to watch. As of 29 November 2026 there are 13 lectures up, about 17 hours in total, plus a guest lecture and a fireside chat with Andrew Ng. Stanford is still adding more. Two links worth saving: - Course page, with every video, the slides and the reading list: https://cs329z.stanford.edu - YouTube playlist: https://www.youtube.com/playlist?list=PLPRcF5HR02_U The playlist was missing the three newest videos when this was written. Every link in this guide goes straight to the video.

Slide 2

These are full university lectures, each over an hour. If you can't watch all of them, this is the order I'd pick: 1. Lecture 1 for the big picture. 2. Lecture 4 on tools and MCP. 3. Lecture 3 on searching your own documents. 4. Lecture 6 on design patterns. 5. Lecture 8 on when to use more than one agent. Lectures 9 to 13 are about tuning and testing agents, so they matter most once you've built one. The Andrew Ng session is a conversation, not a lecture.

Slide 3

What Are AI Agents? Agentic Systems Explained Diyi Yang · 1 h 10 min A short history of agents and the parts of one: the model at the core, reasoning, memory, tools and the environment it works in. Also workflows versus agents, and the hard problems: reliability, training, safety and evaluation. Watch: https://youtu.be/DGI4vucR71w

Slide 4

LLMs for Agent Builders: Context Engineering Michael Ryan · 1 h 18 min What agent builders need to know about the model itself: decoding, attention and context length, how models are trained, structured output, and context engineering, which is deciding what the model sees at each step. Watch: https://youtu.be/Vr1NzH8bT44

Slide 5

RAG Explained: From BM25 to Agentic RAG Diyi Yang · 1 h 17 min How an agent looks things up so its answers come from real sources. Covers splitting and indexing documents, keyword search, vector search and combining the two, reranking, agentic RAG, and the common ways it goes wrong. Watch: https://youtu.be/psLc-46GqY0

Slide 6

How AI Agents Use Tools: Function Calling & MCP Diyi Yang · 1 h 19 min Why language models need tools and how they learn to use them, scaling up to thousands of APIs, the standard ways to connect tools (function calling and MCP), how tool use is tested, and common failures. Watch: https://youtu.be/s0S38lz6O7M

Slide 7

DSPy vs. LangGraph: AI Agent Frameworks Explained Michael Ryan · 1 h 17 min Live demos of two frameworks, DSPy and LangGraph, a tour of open-source agent harnesses (mini-SWE-agent, OpenHands, Pi), and tools for running and monitoring agents. Demo code: https://github.com/cs329z/lecture5-frameworks Watch: https://youtu.be/q0Q-Hy8TTps

Slide 8

AI Agent Design Patterns: ReAct, CodeAct & More Michael Ryan · 1 h 17 min Workflows versus agents and the patterns for each: five workflow patterns you can combine, reasoning-and-acting patterns (ReAct, Reflexion, CodeAct, ReWOO), and ways to manage context such as compaction and context isolation. Watch: https://youtu.be/JC_pLC5EX_w

Slide 9

How AI Agent Memory Works: MemGPT & Memory Types Michael Ryan · 1 h 19 min Why agents need memory and the four kinds: working, episodic, semantic and procedural. Four ways to build it, including skill libraries and tiered memory like MemGPT, plus open problems such as forgetting and privacy. Watch: https://youtu.be/qh5tP6PBZ6U

Slide 10

Multi-Agent Systems: When More Agents Help or Hurt Michael Ryan · 1 h 19 min When to use one agent and when to use several. How to organise them (an orchestrator, a swarm or a mix), how they hand work to each other and share memory, and why multi-agent systems fail. Watch: https://youtu.be/TlX_ft_PQIM

Slide 11

Optimizing AI Agents: Prompts vs. Weights (GEPA, GRPO) Michael Ryan · 1 h 21 min When tuning an agent pays off and how to do it: improving prompts automatically (MIPROv2, OPRO, TextGrad, GEPA), training the model's weights, agents that improve other agents, and how to choose between prompts and weights. Watch: https://youtu.be/e_m99aR7_3Q

Slide 12

What Data Do AI Agents Need? John Yang · 1 h 25 min The data an agent produces and needs: traces, demonstrations and feedback. Data for improving an agent versus data for testing it, data flywheels, synthetic data, and collecting data from people using the agent. Watch: https://youtu.be/HbgZFwWj4vY

Slide 13

Better Data for AI Agents: Data Selection & Quality John Yang · 1 h 15 min Finding the most informative data, filtering and selecting it, small targeted benchmarks, annotation, quality checks, and building datasets from agent traces. Watch: https://youtu.be/y2cwbmOy12U

Slide 14

How to Evaluate AI Agents: Benchmark Design John Yang · 1 h 21 min Why evaluating agents is hard, a four-part way to design a test (the request, the environment, when to stop, and the scorer), and what makes a benchmark good and reliable. Watch: https://youtu.be/_iVIugwpiUI

Slide 15

LLM-as-a-Judge: How to Grade AI Agents John Yang · 1 h 20 min Using a model to grade an agent: the three types of grader, writing judge prompts, known biases, comparing answers in pairs versus scoring one at a time, and measuring how consistent an agent is across runs. Watch: https://youtu.be/J61-q-mk9y0

Slide 16

Guest lecture: Terminal-Bench Alex Shaw and Ryan Marten, co-creators of Terminal-Bench · 1 h 13 min How to measure whether an agent can finish real tasks in a terminal. Watch: https://youtu.be/7GW-9ug2nvw Fireside chat with Andrew Ng Hosted by Diyi Yang · 1 h 11 min Andrew Ng founded DeepLearning.AI and co-founded Coursera. Watch: https://youtu.be/aDHf1r6ZZRA

Slide 17

The course schedule also lists these sessions, which had no video when this was written: - Guest lecture on SWE-bench - Agent safety and guardrails - Coding and software agents - Personal agents Stanford marks the schedule as tentative. New videos get linked on the course page first: https://cs329z.stanford.edu