AI Agent Book: An Open Source Deep Dive into Agent Design and Engineering
Open-source main repository for 'Understanding AI Agents in Depth: Design Principles and Engineering Practice' by Li Bojie: the full text, a compiled PDF, and per-chapter sample code.
At a glance
- What is it?
- Bojieli's ai-agent-book is an open source, multi-language technical book with 109 companion experiments, covering AI agent principles from first principles to engineering practice. It is a substantial educational resource, but its value depends on how current and complete you need the material to be.
- Who is it for?
- Adopt this repository if you are a developer or engineer who wants a structured, hands-on introduction to AI agent design, especially if you read Chinese and value the 109 accompanying experiments. Skip it if you need a vendor-neutral, framework-agnostic reference with frequent updates or if you rely on English-only material, since community translations may lag behind the Chinese original.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 38 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- bojieli/ai-agent-book58,175 ★ · +19,171
| Repository | 2026-08-18 | 2026-11-15 |
|---|---|---|
| bojieli/ai-agent-book | 39k | 58.2k |
19,171 Stars in the last 89 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What This Book Actually Covers
The repository is the source for a 10-chapter book titled "深入理解 AI Agent:设计原理与工程实践" (Understanding AI Agents: Design Principles and Engineering Practice). The README states the core formula as Agent = LLM + context + tools. In the 2.0 numbering, chapter 6 covers interaction and the expansion of observation and action spaces, chapter 7 evaluation, chapter 8 model post-training and chapter 9 continuous evolution. This is not a shallow overview. The book claims to take readers from fundamentals to production. The intended audience is clearly engineers who want to build agents, not just use them. The presence of 109 companion experiments, spread across directories per chapter, suggests a hands-on orientation that is rare in technical books.
The 2.0 Restructure and What It Means for Readers
The README announces a version change from 1.4 to 2.0. The key structural change is that the asynchronous interaction part of the original chapter 4 and the multimodal agent content of the original chapter 9 were merged into a new chapter 6, titled "Interaction: Expansion of Observation and Action Spaces." The original chapters on evaluation, model post-training, and continuous evolution shifted back by one position. This is a significant reorganization. It means that any reader who has seen an older PDF or older chapter references will find different chapter numbers. The README explicitly warns that if you have an old PDF, you should download the latest version. This is a practical consideration: the book is a living document, and the version you read matters. The rolling release named "latest" (2026-07-21) suggests that builds are regenerated on each push to main, so the PDF you download today may differ from one downloaded next week.
How the Repository Is Organized and How to Build It
The repository layout is straightforward. The Chinese source text lives in the book/ directory, with files like book/introduction.md and book/chapter1.md through book/chapter10.md. Each chapter has a corresponding directory (chapter1/, chapter2/, and so on) that contains experiments. To build the PDF yourself, you need pandoc, xelatex, and the ElegantBook document class. The README gives a specific command: cd book && bash build_pdf.sh. The EPUB has its own build script, documented in EPUB.md. Images are stored as SVG files in book/images/. This is a conventional documentation-plus-code setup. If you do not want to build, you can download prebuilt PDF and EPUB files from the Releases page. The build process is not trivial, but it is well documented, which is a plus for a technical book.
The Multi-Language Translation Model and Its Caveats
The book is available in 15 languages: Chinese, English, Spanish, Indonesian, Arabic, Traditional Chinese, Russian, Tamil, Vietnamese, Japanese, Turkish, Korean, Hungarian, Hebrew and Portuguese (Brazil). The README is explicit that these translations are community contributions and may lag behind the Chinese original. This is an important caveat. If you read English, you are relying on a translation that might not reflect the latest 2.0 changes. The English translation is credited to two contributors, which suggests a smaller maintenance effort compared to the original. The online reading site supports language switching, chapter folding, highlights and notes, and it is rebuilt automatically on each push to main. For a non-Chinese reader, the practical question is whether the English version is current enough. The README does not state the exact lag, so you would need to compare the English chapter list against the Chinese one to verify.
What the Companion Experiments Add and What They Do Not
The README counts 109 companion experiments. The experiments are described as including local projects and external reproduction tracks. This is a strong educational feature, but it also means that the quality and reproducibility of each experiment may vary. Some experiments need provider API keys: .env.example lists OpenRouter with a free model and a local Ollama as zero-cost options, and a Moonshot / Kimi key is required for chapter 1's live $web_search experiment.
Licensing, Maintenance, and Upgrade Cost
The repository is licensed under Apache-2.0. This is a permissive license that allows commercial use, modification, and redistribution, with the condition of retaining copyright notices. For an engineer evaluating whether to adopt this material in a company training program, this is favorable: you can adapt the book and experiments internally without open-sourcing your changes. However, the book is a living document. The last push was on 2026-10-08, and the rolling release is updated on each push. This means that if you fork the repository, you will need to regularly pull changes to stay current. The upgrade cost is not zero: the 2.0 restructure changed chapter numbers, so any internal documentation that references chapters will need updating. The only release is the rolling "latest" build, so there is no tagged version to pin for reproducibility, even though the README says fixed versions are on the Releases page.
Alternatives and How This Book Differs
The most direct alternative is the official documentation and tutorials from agent frameworks like LangChain, LlamaIndex, or AutoGen. Those resources are framework-specific and focus on API usage, whereas this book is organised around the formula Agent = LLM + context + tools. Another alternative is academic survey papers on LLM-based agents, which provide a more theoretical and up-to-date view of research trends, but they lack the hands-on experiments and engineering focus. A third option is to build your own curriculum from blog posts and papers, which is more flexible but lacks the coherent structure of a 10-chapter book. The trade-off is clear: this book offers a curated, structured path with experiments, but it may not cover the very latest developments in a fast-moving field. The README's emphasis on the 2.0 restructure indicates that the author is actively maintaining the content, but the pace of AI agent research is such that any book will have some lag.
Who Should Adopt This and What to Verify First
This repository is best suited for engineers who prefer learning by doing and who want a broad, structured introduction to AI agents. The experiments are a differentiator. Before adopting it, verify the following: check that the PDF you download reflects the 2.0 structure, because older versions have different chapter numbers. Compare the English translation's table of contents against the Chinese original to see if it is current. Browse the experiment directories for the chapters you care about, and confirm that the experiments run in your environment; the root pyproject.toml defines per-chapter extras such as ch1 and ch7, and .env.example lists the provider keys. If you need a reference that is always aligned with the latest research, this book will not replace papers and framework docs. But as a starting point for a team that wants to understand agent design from first principles, it is a solid, freely available resource with a permissive license.
Editorial conclusion
Adopt this repository if you are a developer or engineer who wants a structured, hands-on introduction to AI agent design, especially if you read Chinese and value the 109 accompanying experiments. Skip it if you need a vendor-neutral, framework-agnostic reference with frequent updates or if you rely on English-only material, since community translations may lag behind the Chinese original. Before using it, verify that the version you download matches the latest 2.0 structure, and check the chapter list and experiment directories for the topics you care about, because the book's focus is broad but not exhaustive.
Frequently asked questions
What is the best book on AI agents?
The repository does not rank books; it publishes one. Understanding AI Agent by Li Bojie runs to ten chapters organised around Agent = LLM + context + tools, ships 109 companion experiments, and is free as PDF and EPUB in fifteen languages.
How to build an AI agent book?
The closest the repository comes to that is its own build path. The source is book/introduction.md, book/chapter1.md through book/chapter10.md, and book/afterword.md, compiled with cd book && bash build_pdf.sh, which needs pandoc, xelatex, the ElegantBook class, and the right fonts, with SVG figures in book/images/.
Which AI agent is the best to learn?
Nothing here is a tool comparison. The ten chapters build from the formula Agent = LLM + context + tools up to production practice, and each chapter has experiments in a matching chapter directory, with a sister volume on AI infrastructure linked for the underlying systems.
What is Bill Gates' favorite book on AI?
It documents one book, its own Chinese original plus community translations, and links a companion title on AI infrastructure, where parameters and context state are stored and how accelerators cooperate.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/bojieli-ai-agent-book)Star history chart for your README
[](https://hysenlabs.com/projects/bojieli-ai-agent-book)Was this useful?