AI Agent, LLM, MCP, RAG, Rust2026
大话 Agent
An open book about AI agents, told in plain language — the concepts, a real framework's source, and building your own from scratch. Free to read online.

An open book about AI agents, told in plain language — concepts, source code, and building one yourself.
Most writing about AI agents is either marketing or math. I wanted the middle path: plain words for the concepts, a real framework opened up to see how it actually runs, then the source closed and one built from scratch.
The whole book is free to read online, in three parts:
- Part I · Concepts — 17 chapters that build a shared vocabulary: the LLM as a component, chain-of-thought, providers, system prompts, function calling, agents, tools, the agent loop, memory, hooks, MCP, skills, multi-agent, RAG, workflows and security
- Part II · Source code — follow the call chain through a real agent framework (pi-mono): where the entry point is, how the scheduler dispatches work, how tools get registered and called, how sessions survive restarts
- Part III · Implementation — close the source and build your own runnable agent, chapter by chapter
The narrative starts with 小a, a new colleague taking over a failure review — because the questions that matter in practice come from logs, not from theory.
Still being written — chapters go live as they're finished.