TwinEdgeAI
Course home

Engineering AI Agents

18 lecture packs with notes, readings, a hands-on lab, a quiz and an assignment each.

Author: Grok Bot Lectures: 18 Lab tests: 2795

CreditThis course is built from Stanford CS329Z: Engineering AI Agents (Diyi Yang, Michael Ryan, John Yang). It is adapted from, and inspired by, that course. It is not an official Stanford document. The lab code, the tests, the figures and every made-up number are mine.

About this course

Each lecture pack follows one week of the Stanford course. A pack has lecture notes. It has a guide to the readings. It has a small lab that you can run on your own computer. It ends with discussion questions, a quiz, an assignment and a glossary.

Every lab is plain Python. It uses only the standard library. It needs no network and no model API key. The agents in the labs are small and scripted, and the numbers are made up. They are there to teach an idea, not to measure a real system.

Each page is one file. It reads offline. Print any page for a clean paper copy.

All lectures

The table is in the order of the packs. Click a title to open the lecture. Click a file name to download the lab. To run a lab, put the toolkit and its test file in one folder, then run python3 -m unittest test_name there, using the test file name without .py.

WeekTitleOriginal schedule dateLab toolkitLab testsTestsReferences
Week 1What Are Agentic Systems?Wed Sep 23, 2026agent.pytest_agent.py98
Week 2LLMs for BuildersMon Sep 28, 2026llm_toolkit.pytest_llm_toolkit.py2126
Week 2bRetrieval-Augmented GenerationWed Sep 30, 2026rag_toolkit.pytest_rag_toolkit.py3430
Week 3Tool Use and Function CallingMon Oct 5, 2026tool_toolkit.pytest_tool_toolkit.py8830
Week 3bFrameworks and OrchestrationWed Oct 7, 2026frameworks_toolkit.pytest_frameworks_toolkit.py15042
Week 4aAgent Design Patterns and ScaffoldsMon Oct 12, 2026patterns_toolkit.pytest_patterns_toolkit.py15534
Week 4bAgent Memory ArchitecturesWed Oct 14, 2026memory_toolkit.pytest_memory_toolkit.py22433
Week 5aMulti-Agent SystemsMon Oct 19, 2026multi_agent_toolkit.pytest_multi_agent_toolkit.py17031
Week 5bOptimizationWed Oct 21, 2026optimization_toolkit.pytest_optimization_toolkit.py28832
Week 6aTerminal-BenchMon Oct 26, 2026terminal_bench_toolkit.pytest_terminal_bench_toolkit.py27034
Week 6bData for AgentsWed Oct 28, 2026agent_data_toolkit.pytest_agent_data_toolkit.py26636
Week 7aData Selection & QualityMon Nov 2, 2026selection_quality_toolkit.pytest_selection_quality_toolkit.py19729
Week 7bEvaluation Fundamentals & Benchmark DesignWed Nov 4, 2026eval_fundamentals_toolkit.pytest_eval_fundamentals_toolkit.py12423
Week 8aLLM-as-Judge & Evaluation InfrastructureWed Nov 11, 2026judge_infra_toolkit.pytest_judge_infra_toolkit.py19222
Week 8bAgent Safety & GuardrailsWed Nov 18, 2026agent_safety_toolkit.pytest_agent_safety_toolkit.py14328
Week 9aSWE-bench (Guest Lecture)Mon Nov 16, 2026swe_bench_toolkit.pytest_swe_bench_toolkit.py15116
Week 10Coding & Software AgentsMon Nov 30, 2026coding_agents_toolkit.py
also needs swe_bench_toolkit.py
test_coding_agents_toolkit.py14822
Week 11Proactive AgentsWed Dec 2, 2026proactive_agents_toolkit.pytest_proactive_agents_toolkit.py16517

Totals: 18 lectures, 2795 tests, 493 references. The dates are from the Stanford schedule, which says it is tentative. Week 9a is a guest lecture on Mon Nov 16, so on the calendar it comes before Week 8b (Wed Nov 18). The packs are kept in the order in which they were written. Week 10 reuses the Week 9a toolkit. There is no pack for Finals Week (Dec 7 to 11), because the schedule lists no readings or topics for it.

How to read a pack

  1. Read the box at the top. It says where the pack differs from the course.
  2. Read the notes and look at the figures.
  3. Read the guide to the readings, then the readings themselves.
  4. Download the lab. Run the demo and the tests. Do the exercises.
  5. Answer every quiz question, then check which answers are right and which are wrong.