An open-source book
AI Agents
in Depth.
Design principles.
Engineering practice.
For developers and curious builders learning how AI agents work.
Basic programming helps with the experiments. Chapter 1 introduces the concepts.
By Bojie Li and the open-source community
observations
APIs
Decide. Act.
Observe what changed.
Context informs the model. Tools act on the world.
A path from understanding to building
Inside the book.
Start with the fundamentals.
Follow your curiosity from there.
Getting Started with AI Agents
The model, the context, the tools—and the loop that brings them together.
START HEREContext Engineering
Build the working context that makes an agent effective.
User Memory and Knowledge Base
Connect agents to what they know and what they remember.
Tools
Give agents reliable interfaces to act on the world.
Coding Agent and Code Generation
Use code as a tool for creating new capabilities.
Interaction: Expanding the Observation and Action Spaces
Extend agents across voice, vision, interfaces, and time.
Evaluating Agents
Measure behavior, compare systems, and learn from failures.
Model Post-Training
Understand how supervised learning and reinforcement learning shape models.
Continual Evolution of Agents
Turn execution experience into lasting improvements.
Multi-Agent Collaboration
Coordinate agents, share context, and divide complex work.
Ideas become clearer when you run them
Read it. Then build it.
Explore the companion experiments, inspect the code, and make it your own.