ai-agent-book: Learn how AI agents work from a free book with 109 experiments
Added · Updated
Made by Bojie Li
View profile on GitHub (opens in a new tab)A complete book on building AI agents, published free and in the open by Bojie Li, organised around one formula: an agent is a language model plus context plus tools.
Ten chapters take it from underlying principles to engineering practice, and 109 hands-on experiments are published alongside the text so you can run each idea rather than only read about it. The original is in Chinese; community translations into English, Spanish, Japanese, Korean, Portuguese, Russian, Arabic and several other languages are included, and the whole book downloads as PDF or EPUB.
What it does
The book treats agents as an engineering subject rather than a demo. Its spine is the formula the author repeats throughout — model, context, tools — and the ten chapters build outward from it: how a model reasons, how context is managed and compacted, how tools are described and called, how an agent observes and acts, how you evaluate one, how post-training changes its behaviour, and how an agent improves over time. The 109 experiments are what separates it from a survey: each chapter names its own, and each is marked by whether it runs as-is, reproduces a published result, or exists as a design to reason about, with the prose, figures and code kept in the same repository. The author has also published a companion volume on the infrastructure underneath — where parameters and context live, how computation is scheduled, how accelerators cooperate.
You could use it to…
- Read a free book on how AI agents actually work
- Run any of 109 hands-on experiments instead of just reading
- Read it in English, Spanish, Japanese or seven other languages
Can I use this?
You'll need Reading time, and Python for the experiments · Ready to use
Worth knowing The Chinese text is the original and the translations are community contributions that the project says may lag behind it, so a translated chapter can be out of date. The book was recently reorganised from version 1.4 to 2.0 with chapters renumbered, so older references may not line up. The experiments are labelled by type — runnable, reproduction, or design only — so not every one is something you can execute. Apache 2.0. Licensed under Apache License 2.0.
Why it's here
Not trending this week
Last seen on the GitHub trending list on 25 September 2026. It stays on BuildTube so you can still find it.
- 57,450 people have starred it on GitHub.
Numbers checked on 8 November 2026; not refreshed since.
Behind it
View sourceBuildTube has not run or verified this project. Everything above is written from what the creator published.
Made this?
Quick questions
- What is ai-agent-book?
- The book treats agents as an engineering subject rather than a demo.
- What can I use ai-agent-book for?
- Read a free book on how AI agents actually work; Run any of 109 hands-on experiments instead of just reading; Read it in English, Spanish, Japanese or seven other languages
- Can I run ai-agent-book on my computer?
- No install needed: it runs in your web browser.
- What do I need to use ai-agent-book?
- The PDF or EPUB for reading, which the project recommends over the web version for layout. For the experiments, a Python environment and access to whichever model each one calls.
- What license does ai-agent-book use?
- Licensed under Apache License 2.0.
More from this week
- Garden Skills Give your coding agent video and web design skills
Install ready-made skills so Claude Code, Cursor or Codex can make short videos, web pages and articles.
- RAGFlow Ask questions about your documents and get cited answers
Upload documents and ask questions with traceable citations.
- agent-desktop Let AI agents read and click desktop apps
For developers building computer-use agents: agent-desktop lets an AI agent read and operate desktop apps on Mac, Windows or Linux from a command line.
Explore by topic
Post this
Download share imageFor makers
Made this? Show it’s on BuildTube — add the badge to your README or embed the card on your site.
README badge (Markdown)
[](https://buildtube.app/p/gh-bojieli-ai-agent-book/)Embed card (HTML)
<iframe src="https://buildtube.app/embed/gh-bojieli-ai-agent-book/" width="560" height="240" style="border:0;max-width:100%" loading="lazy" title="ai-agent-book on BuildTube"></iframe>