AI Agent has blown up this year, but anyone trying to learn it systematically hits an awkward gap: what is available is either scattered vendor-blog tutorials or theoretical paper frameworks. The middle layer, something that runs all the way from principles to engineering practice and lets you run things by hand, has been missing. Through the second half of 2025 the Agent framework war mostly settled, and components like tooling, memory, and evaluation each found de facto standards, but the one book a developer could pick up, read end-to-end, and know how to build afterward had still not been written. bojieli/ai-agent-book fills that gap: an open-source AI Agent book, 10 chapters of main text with 95 experiments, free downloads in 13 languages, still pushing today.
What It Is
ai-agent-book (github.com/bojieli/ai-agent-book) is an open-source project by Li Bojie, corresponding to the book "In-Depth Understanding of AI Agent: Design Principles and Engineering Practice". It has 33,213 GitHub stars, 3,565 forks, primary language Python, Apache-2.0 license, created on 2025-09-09, with its latest push today (2026-08-06). It has been a GitHub Trending Project of the Day and currently sits at #2 on the OpenGithubs weekly rank.
The whole book is built around one core formula: Agent = LLM + Context + Tools. The line looks simple, but the author breaks it into 10 progressively deeper chapters, starting from the judgment that "Harness engineering is the real competitiveness" and walking through context, memory, tools, coding agents, evaluation, post-training, continuous evolution, multimodality, and multi-agent collaboration. What separates it from scattered tutorials is "book-level coherence": a complete narrative line, each chapter backed by runnable experiments, not a slide deck mashup.
Core Capabilities
Three pillars: 10 chapters of main text, 95 companion experiments, and 13 languages. The chapter skeleton (per-chapter project counts come from the repo README):
| Ch | Topic | One-line core | Projects |
|---|---|---|---|
| 1 | Agent fundamentals | Agent = LLM + Context + Tools; Harness engineering is the real competitiveness | 4 |
| 2 | Context engineering | Context sets the capability ceiling: KV Cache, prompt engineering, Agent Skills, context compression | 9 |
| 3 | User memory and knowledge bases | Remember users across sessions, plug in external knowledge: user memory, RAG, structured indexing, knowledge graphs | 13 |
| 4 | Tools | Tools are the agent's hands: MCP protocol, perception/action/collaboration tool types, event-driven async agents, proactive tool discovery | 7 |
| 5 | Coding agents and code generation | Code is "a tool that can create new tools"; a production-grade coding agent landscape | 12 |
| 6 | Agent evaluation | Turn performance into comparable signals: eval environments, metrics, statistical significance, eval-driven selection | 12 |
| 7 | Model post-training | Pretraining / SFT / RL in three stages: when to choose SFT, when to choose RL, tool-call internalization, sample efficiency | 16 |
| 8 | Continuous evolution of agents | Extract learning signals from trajectories, update knowledge, instructions, programs, and parameters | 9 |
| 9 | Multimodality and real-time interaction | Extend from text to voice, GUI, the physical world: three voice paradigms, Computer Use, robotics | 10 |
| 10 | Multi-agent collaboration | Collective intelligence above the individual: collaboration frameworks, context sharing/isolation, an emergent "agent society" | 8 |
The 95 experiments run on two tracks: local projects (built into the repo, installable via uv sync) and external reproduction tracks (22 external repos + 1 helper cookbook mapped to chapters 6, 7, 9, and 10, which you clone into the corresponding directories yourself). Each experiment carries one of three status marks: ✅ runnable (config the environment and it produces the expected result), 📖 reproduction (reproduces a published paper or project result), and 🚧 design (gives the design idea and code skeleton, not yet fully implemented), so you can see at a glance how far it can go. Execution status, evidence, and unfinished gates are tracked separately in docs/EXPERIMENT_STATUS.md; cloning the repo does not mean the experiments are done, the README is explicit about this.
The 13 languages: Chinese (original), English, Spanish, Indonesian, Arabic, Traditional Chinese (Taiwan), Russian, Tamil, Vietnamese, Japanese, Turkish, Korean, Hungarian. Everything except the Chinese original is a community translation.
How to Use
Three paths, ordered by barrier to entry:
- Download PDF / EPUB directly (least hassle). The repo Release always points to the latest build on the main branch; both the Chinese original and the 12 community translations have PDF + EPUB, open-source and free. Fixed versions live on the Releases page.
- Read online: bojieli.github.io/ai-agent-book supports multilingual switching, chapter folding, full-text search, and direct links to companion experiments, automatically rebuilt after every push to main.
- Compile it yourself: to edit content or produce a local PDF, install pandoc, xelatex, the ElegantBook document class, and the relevant fonts, then run
bash build_pdf.shinsidebook/. Source lives inbook/introduction.md,book/chapter1.mdthroughchapter10.md, andbook/afterword.md; figures inbook/images/; layout details inpreamble.texand*.lua.
To run experiments: Python 3.10+ is required, uv is recommended (uv sync --locked --extra ch1, swapping ch1 for ch2 through ch10 to install a given chapter), and pip works too (python -m pip install -e ".[ch1]"). Experiments that call models need you to configure an API key (copy .env.example to .env and fill in at least one provider key; some experiments want a .env in their own directory or an exported env var).
Pitfalls
- Community translations lag the Chinese original. The README states explicitly that the 12 non-Chinese editions (English, Spanish, Indonesian, Arabic, Traditional Chinese, Russian, Tamil, Vietnamese, Japanese, Turkish, Korean, Hungarian) are community contributions and "may lag behind the Chinese original." For the latest content, read Chinese; treat the others as backups.
- The build environment has a threshold. The pandoc + xelatex + ElegantBook + Chinese-fonts combo can stall someone who has never touched LaTeX for half a day. If you only want to read, do not compile; just download the PDF.
- External reproduction tracks depend on third-party environments. The 22 external repos (AndroidWorld, GAIA, OSWorld, SWE-bench, tau2-bench, terminal-bench, MiniMind, verl, SandboxFusion, claude-quickstarts, and others) are not built-in dependencies; you have to clone them into the right directories yourself, and some training projects also pull models, datasets, and simulators per their own READMEs. The hardware bar is not low.
- Python version fragmentation. The baseline is 3.10+, but some browser and memory experiments need 3.11+, and some built-in third-party components in chapter 8 need 3.12+. A single environment will not run every experiment; you have to configure per chapter.
- Experiments ≠ completed.
EXPERIMENT_STATUS.mdtracks execution status separately; pinned source only establishes a reproduction starting point and does not mean training, hardware, browser, or multi-agent experiments have been run. Do not assume cloning is the finish line.
Take
ai-agent-book hits a genuine void: AI Agent has lacked a book you can read end-to-end and also run by hand. Its moat is not any single chapter being deep, but the four-pack of "systematic main text + runnable experiments + multilingual + open-source free": 10 chapters complete the narrative from principles to engineering, 95 experiments let readers touch instead of just read, 13 languages push the barrier down globally, and Apache-2.0 plus free PDF downloads let it spread. The line in chapter 1, "Harness engineering is the real competitiveness," is the eye of the book; the author is not teaching how to use some framework but laying out the full landscape of agent engineering.
It fits two crowds: developers who want to learn AI Agent systematically and are not satisfied with scattered tutorials, and researchers working on agents who need a reproducible starting point for experiments. The barrier is that you need a Python environment, willingness to configure API keys, and, if you actually want to run the chapter 7 training experiments, GPUs. Against vendor docs, its edge is that it is not tied to one framework and is not selling anything: chapter 4 on tools does not just push the author's own MCP implementation, and chapter 6 on evaluation lines up the mainstream benchmarks side by side. Against papers, its edge is that every chapter lands in a runnable experiment instead of stopping at concepts. If you only want a popular-science intro to agents, this book is a bit hard; but if the one you want is "can land, can reproduce, can ask why," 33,213 stars and today's push say it is the one.
References
- ai-agent-book GitHub repo: https://github.com/bojieli/ai-agent-book
- Online reading (multilingual / chapter folding / full-text search): https://bojieli.github.io/ai-agent-book/
- OpenGithubs weekly rank: https://github.com/OpenGithubs/github-weekly-rank
- Stars / forks / language / license / creation and push times per GitHub API (verified 2026-08-06, 33,213 stars)
- Chapter topics, per-chapter project counts, experiment tracks, build flow, and multilingual list per the repo README (2026-08-06)