Learn AI Agents from Scratch
A bilingual, engineering-first online textbook covering LLM agent fundamentals, tool use, memory, planning, retrieval-augmented generation, multi-agent systems, agentic reinforcement learning, evaluation, security and deployment.
Learn AI Agents from Scratch is an open-source textbook and learning repository for building, evaluating, securing and deploying large-language-model agent systems, aimed at the gap between calling an LLM API and shipping a production agent. Rather than teaching isolated framework APIs, it builds one connected path from LLM fundamentals through tools, memory, planning, retrieval-augmented generation, context engineering, harness engineering, skills, agentic reinforcement learning, multi-agent systems, evaluation, security and deployment.
It has 23 chapters across foundations, core capabilities, framework practice, multi-agent systems, production engineering and capstone projects, maintained in parallel English and Chinese mdBook sources with more than 330 original diagrams and five interactive demos. Framework chapters cover LangChain, LangGraph, other agent frameworks and Claude Code, and capstone chapters walk through building a coding agent, a data agent and a multimodal agent.
The repository also includes a small runnable reference agent with tools, memory, security gates, evaluation, an MCP server, a FastAPI service and its own test suite.