lecture + exercises + lab + tutorials
Agentic AI systems combine language models with tools, memory, and autonomous loops. This course builds them from first principles — foregrounding the mathematics and algorithms / data structures — before any framework. But in the lab: pydantic-ai.
Prerequisites: Mathematics (probability and linear algebra), plus prior courses in data science and machine learning.
Status: Alpha - Work in progress
| Lecture | Topic | Slides | Exercises | Lab | |
|---|---|---|---|---|---|
| 1 | L-Intro |
Introduction to Agents & the Training Ladder | lecture | exercises | lab |
| 2 | L-ReAct |
The ReAct Loop & Tool Use | lecture | exercises | lab |
| Lecture | Topic | Slides | Exercises | Lab | |
|---|---|---|---|---|---|
| 3 | L-Decomp |
Task Decomposition & Planning | lecture | exercises | lab |
| 4 | L-ToT |
Tree-of-Thoughts & Search | lecture |
| Lecture | Topic | Slides | Exercises | Lab | |
|---|---|---|---|---|---|
| 5 | L-Att |
Inside the Model: Tokenization, Attention & Context Window | lecture | ||
| 6 | L-Embed |
Embeddings & Vector Arithmetic | lecture | ||
| 7 | L-RAG |
Vector Databases & (Agentic) RAG | lecture | ||
| 8 | L-Memory |
Sessions, Memory & Compaction | lecture |
| Lecture | Topic | Slides | Exercises | Lab | |
|---|---|---|---|---|---|
| 9 | L-Orch |
State Machines & Workflow Orchestration | lecture | ||
| 10 | L-Eval |
Observability & Evaluation | |||
| 11 | L-MAS |
Multi-Agent Systems: Organization & Coordination |
| Lecture | Topic | Slides | Exercises | Lab | |
|---|---|---|---|---|---|
| 12 | L-Gateway |
Gateway, Security & Guardrails | |||
| 13 | L-Practice |
Agents in Practice (Production) | |||
| 14 | L-Outlook |
Outlook & Ethics |
| Lecture | Topic | Slides | Exercises | Lab | |
|---|---|---|---|---|---|
| 15 | L-MDP |
Agents as Markov Decision Processes | lecture | ||
| 16 | L-Game |
Game Theory for Multi-Agent Systems | |||
| 17 | L-Collective |
Collective Decisions & Agent Populations |
A fundamentals notebook recaps the mathematics the lectures needed. It carries no exercises; the exercises on the material are part of the lectures that use it.
| Topic | Content | Used in | Notes |
|---|---|---|---|
| Probability | sample space, random variables, joint, marginal and conditional distributions, conditional independence | L-Intro, L-Att |
notes |
| Statistics | standard error of a success rate, 95 % interval, Wald test for two success rates | L-Eval |
notes |
| Linear Algebra | vectors, dot product, norms, angle between two vectors | L-Embed, L-RAG |
notes |
A tutorial is a self-contained jupyter notebook.
| Tutorial | Content | Requires | Notebook |
|---|---|---|---|
| Building a SWE Agent from Scratch | a software-engineering agent in plain Python — model call, action parsing, a sandboxed shell and the loop — extended step by step into mini-swe-agent | Ollama, podman | notebook |
A Python basics notebook explains one Python construct that the exercises, labs and tutorials use without explaining it. No notebook needs a language model or a network connection; each ends with tasks and their solutions. The numbers give a reading order in which each notebook uses only constructs of earlier ones. Requirements: Python ≥ 3.12.
| Topic | Content | Requires | Notebook |
|---|---|---|---|
| Functions as Values | first-class functions, lambda, closures and late binding, factory functions, *args / **kwargs, the tool registry |
— | notebook |
| Decorators | @dec as f = dec(f), wrapper functions, decorators with arguments, registration decorators, registration by a call |
— | notebook |
| Dataclasses | generated methods, mutable defaults, derived and frozen fields, asdict, NamedTuple, choice of record type |
— | |
| Type Hints | built-in generic types, X \| None, Literal, Callable, TypedDict, Annotated, annotations read at run time |
— | |
| Pydantic Models | validation at the boundary, Field constraints, validators, nested models, JSON Schema, structured output with retry |
pydantic | |
| Generics | type variables, generic functions and classes, bounded type variables, generic pydantic models; reading guide for PydanticAI | pydantic | |
| JSON and Tool Schemas | JSON and JSON Lines, tool schema from a function, extraction of JSON from a reply, argument check, substitution with re.sub, arithmetic expressions without eval |
— | |
| Coroutines and asyncio | async / await, the event loop, gather, asynchronous context managers and iterators, manual iteration with anext |
— | notebook |
| Tasks, Cancellation and Concurrency Limits | tasks, cancellation, TaskGroup, time limits, blocking calls and to_thread, the event loop of a thread, semaphores |
— | |
| Exceptions, Retries and Context Managers | the exception hierarchy, errors as observations, user-defined exceptions, retry with exponential backoff, the with statement |
— | |
| Processes and Threads | subprocess.run with exit status and time limit, threads and shared state, the global interpreter lock, choice of mechanism |
— | |
| NumPy for the Course | arrays, matrix products, axes and reductions, cosine similarity, broadcasting, top-$k$, softmax, powers of a transition matrix | numpy |
Agentic patterns & engineering
Multi-agent, protocols & MCP
L-MAS, L-Game).L-RAG, L-MAS, L-Practice).Foundations & "inside the LLM"
L-Decomp, L-ToT), sequential
decisions / MDPs (L-MDP), and Multiagent Decision Making (Ch. 18; Ch. 17 in the Global Edition — game theory; L-Game).L-MDP).L-Att).L-Embed).Frameworks & agentic software engineering
L-Orch).L-ASE).L-ASE).