ai-agent-book: a Chinese book on AI agent design, with 110 companion experiments
ai-agent-book is an open-source Chinese book on designing AI agents, published with its full text, PDF and EPUB builds, and runnable code for each chapter.
The repository holds the source of 《深入理解 AI Agent:设计原理与工程实践》, a ten-chapter book by 李博杰. The README builds the book around the formula Agent = LLM + 上下文 + 工具. It covers context engineering, memory, tools and MCP, coding agents, interaction, evaluation, post-training, self-improvement and multi-agent collaboration. Each chapter has its own folder of experiments, 110 in all. The book is also published as PDF and EPUB in Chinese and in 14 other languages, most of them community translations.
To run an experiment, the README says to clone the repository, install a chapter's dependencies with uv or pip on Python 3.11 to 3.13, and copy .env.example to .env with at least one provider key. The listed providers include DeepSeek, Kimi, Siliconflow and OpenRouter. Some experiments need more: CUDA, FFmpeg, a browser, or external repositories pinned to specific commits.
The FAQ says the companion code was generated by coding agents from the manuscript, and that the author does not read it line by line. The method it describes is to settle the architecture first, then let an AI write, test and fix the code, with a person doing the design and final review. The README lists the license as Apache-2.0.
In the author's words
**Agent = LLM + 上下文 + 工具**——本书围绕这个核心公式,用 10 章把 AI Agent 从原理讲到工程实战。全书正文、配图、**110 个配套实验**全部开源,欢迎亲手把实验跑一遍。
From the README or the author's post. We checked that the sentence is there, not that it is true.
When to reach for it
A reader who wants to build an agent can read one chapter, then rebuild its core in a small project, treating the matching experiment as a reference rather than a finished answer. The README's suggested scope is a coding agent from chapters 1 to 5, plus a small evaluation set of about ten to twenty tasks from chapter 7.
Works with
See it
AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it. How this list is made