AI Agents — Overview
This section is a self-contained course on building and understanding LLM-based agents, from the basic loop to self-improvement, evaluation, security and production operations.
Reference course and disclaimer
Section titled “Reference course and disclaimer”The structure is modeled on Stanford’s CS329A: Self-Improving AI Agents (taught by Azalia Mirhoseini and colleagues; I used the Autumn 2025 offering). I could not open the official syllabus directly from my environment, so I verified the course and its arc only through search-result summaries: self-improvement techniques for LLMs (constitutional AI, verifiers, test-time compute scaling, search with LLMs, train-time scaling with RL), then tool use, code and memory, multimodal interaction, and multi-step planning and evaluation, plus guest lectures on reasoning and agentic systems. Anything beyond that is my own curriculum design, not a claim about the course’s exact schedule. Check the course website for the authoritative syllabus.
This wiki is an independent study guide, not affiliated with or endorsed by Stanford or the course staff. All explanations are original; consult the cited papers for primary sources. The field moves quickly, so benchmark numbers and product details are given qualitatively and may be outdated.
Roadmap
Section titled “Roadmap”- What Is an Agent? — model, tools, memory, loop; workflows versus agents.
- Agent Design Patterns — chaining, routing, orchestrator-workers, evaluator-optimizer, ReAct, planning, reflection.
- Tool Use, Function Calling and MCP — tool interfaces and the Model Context Protocol.
- Memory and Context Engineering — what the model sees at each step.
- Code Agents — software-engineering agents, sandboxes, verification.
- Computer-Use and Browser Agents — GUIs, grounding, web agents.
- Multi-Agent Systems — topologies, delegation, when it helps.
- Self-Refinement and Learning from Feedback — Self-Refine, Reflexion, Constitutional AI, verifiers.
- Test-Time Compute, Search and Verification — sampling, best-of-N, search, reasoning models.
- RL and Synthetic Data for Agents — verifiable rewards, GRPO, trajectory learning, reward hacking.
- Evaluating Agents and Benchmarks — SWE-bench, tau-bench, WebArena, pitfalls, your own evals.
- Reliability, Safety and Security — prompt injection, sandboxing, permissions, human-in-the-loop.
- Project: Build an Agent from Scratch — about 150 lines of Python, with tests.
- Production, Observability and Cost Engineering — tracing, caching, routing, operations.
Prerequisites
Section titled “Prerequisites”- Comfortable Python and basic command-line use.
- Working knowledge of how LLMs are used (prompting, context windows, sampling). Helpful background in this wiki: Agents and tool use, Post-training, RAG and Evaluation.
- Lectures 8-10 use basic probability and reinforcement-learning notation (policy, reward, expectation); an API key for any LLM provider helps for the hands-on parts but is not required, since the project uses a scripted fake model for tests.
Suggested study plan (about 6 weeks, 5-6 hours per week)
Section titled “Suggested study plan (about 6 weeks, 5-6 hours per week)”| Week | Lectures | Focus |
|---|---|---|
| 1 | 1, 2 | Concepts and patterns; implement the loop |
| 2 | 3, 4 | Tools, MCP, context management |
| 3 | 5, 6, 7 | Applied agents: code, GUI, multi-agent |
| 4 | 8, 9, 10 | Self-improvement, test-time compute, RL |
| 5 | 11, 12 | Evaluation and security |
| 6 | 13, 14 | Build the project, add tracing, write your own eval |
A faster practical route: 1, 2, 3, 13, 11, 12, 14. Do the exercises; the most valuable habit the course teaches is reading failed trajectories.