bojieli/ai-agent-book · 24 Jul 2026 · Feature

The Open-Source Engineering Manual the 'Year of Agents' Actually Needed

Mateo Vargas
Mateo Vargas
Contributing Editor

A fully open-source textbook and executable curriculum that treats agent engineering as systems architecture, not prompt wizardry.

bojieli/ai-agent-book
18.3k stars Velocity · 7d +2445 ★/day
star history

The Hype and the Vacuum

2025 has been widely called the “year of agents,” yet the educational landscape has not kept pace. As Victor Dibia noted in a survey of the year’s agent literature, few books specifically cover agents; most content remains scattered across blogs and research papers [1]. The titles that do exist tend to cluster around specific frameworks—LangGraph, LangChain, AutoGen—or high-level pattern catalogs. Dibia’s own Designing Multi-Agent Systems explores orchestration patterns and UX principles through a from-scratch library called PicoAgents, while Michael Albada’s Building Applications with AI Agents implements identical scenarios across three frameworks to compare trade-offs, a choice the author admits risks rapid obsolescence [1]. Lakshmanan and Hapke’s Generative AI Design Patterns casts a wider net with thirty-two patterns, yet dedicates only a single chapter to agent-specific behaviors like tool calling [1]. Into this fragmented market arrives a Chinese-language repository that bundles a ten-chapter book, full PDF source, and more than forty standalone executable projects. It does not ask readers to choose a framework. It asks them to reconsider what an agent actually is.

bojieli/ai-agent-book

The Formula That Reframes the Problem

The repository’s governing equation is almost aggressively simple: Agent equals LLM plus context plus tools. The book insists that the model is merely the brain, while context functions as the operating system and tools serve as the hands. This framing is not semantic hairsplitting. By elevating context engineering and tool design to equal status with model selection, the author argues that harness engineering—everything outside the weights—is the true competitive advantage. The ten chapters spiral outward from this core, covering context compression, KV cache-friendly design, user memory systems, retrieval pipelines, MCP servers, coding agents, evaluation benchmarks, post-training, self-evolution, multimodal interaction, and multi-agent collaboration. It is a scope that dwarfs the five functional layers described in Manning’s AI Agents in Action—persona, actions and tools, reasoning and planning, knowledge and memory, and evaluation and feedback—by adding explicit treatment of model post-training and agentic self-improvement without gradient updates [10]. Where many guides treat the model as a black box to be prompted, this repository treats the model as one component in a larger sociotechnical system.

Recent surveys of enterprise LLM adoption highlight a consistent pattern: the base model is rarely the bottleneck. Integration complexity, data security, governance, and the gap between demonstration and production deployment consume the majority of engineering hours [3][9][12]. By devoting entire chapters to context compression, log sanitization, evaluation benchmarks, and asynchronous tool orchestration, the repository implicitly argues that the hard problems of agent engineering are infrastructural, not algorithmic.

A Curriculum Disguised as a Repository

What separates this project from a conventional textbook is that every chapter ships with runnable code. The second chapter alone contains six distinct projects, ranging from attention visualization and KV cache optimization to systematic prompt-engineering ablation studies. These are not toy examples. The context-compression project benchmarks multiple strategies for reducing token load while preserving capability. The local LLM serving module demonstrates that a 0.6 billion parameter model can achieve competent tool calling when the surrounding system is carefully designed. The third chapter pushes deeper into retrieval architecture, implementing dense and sparse embedding services, hybrid retrieval with neural reranking, RAPTOR and GraphRAG structured indices, and Anthropic’s contextual retrieval technique, which the author reports can cut retrieval failure rates by roughly half. An Agentic RAG implementation shows how iterative ReAct loops can outperform flat text retrieval on complex legal question answering. A structured knowledge extraction project mines implicit patterns from judicial datasets, converting raw case law into factor models that an agent can query as structured decision logic.

The user memory systems in chapter three go beyond simple key-value storage, exploring how Agentic RAG can manage cross-session dialogue history and how contextual retrieval can anchor fragmented memories to broader conversational context. These are not theoretical niceties; they address the cold-start problem that plagues production assistants every time a user returns after a break.

The fourth chapter treats tools as first-class infrastructure. It delivers three complete MCP servers—perception, execution, and collaboration—packaged with container deployment references and an event-driven async agent built on a modern Python web framework with automatic API documentation. The execution server includes a language-model-mediated safety review for dangerous operations, while the collaboration server channels browser automation, human-in-the-loop approval, and multi-channel notifications. This aligns with the human-centric design principles Microsoft has advocated for agentic systems, which stress transparency, user control, and fluid foreground-to-background transitions [5][11], though the repository approaches them from a systems perspective rather than a UX one. The fifth chapter then presents a production-grade coding agent implemented entirely in Python without external shell dependencies, complete with seventeen tools, persistent shell environments, and automatic lint detection. It is the kind of artifact that looks less like a tutorial and more like an internal tool from a working engineering team.

The sixth and seventh chapters address the chasm between demo and production. Evaluation covers Terminal-Bench, SWE-bench, GAIA, OSWorld, and Tau2-Bench, alongside an ELO leaderboard system. Post-training moves beyond prompt tricks into supervised fine-tuning, reinforcement learning from human feedback, and distributed training frameworks. There are projects on adaptive reasoning depth that claim forty-five to sixty-nine percent cost reductions by teaching the model when to think and when not to, tool-augmented mathematical reasoning with sandboxed code execution, and embodied agent training. A direct comparison project systematically evaluates where SFT ends and RL begins. The eighth chapter turns inward, asking how an agent can improve without ever touching its weights. The answer given is a triad: learn from successful trajectories, externalize repetitive workflows into new tools, and distill observations into parameters through prompt distillation. A browser-use robotic process automation project reportedly achieves three- to five-fold speed-ups by converting expensive language model reasoning into deterministic automation.

The final two chapters extend the agent into physical and social space. Real-time voice agents integrate voice activity detection, WebSocket streaming, and multi-provider speech recognition and synthesis, spanning cascaded, end-to-end multimodal, and full-duplex paradigms. Browser automation and computer-use agents handle graphical interface interaction. Multi-agent collaboration is demonstrated through a pair of agents—one handling voice calls, the other driving browser automation—that communicate directly over WebSocket without a central orchestrator. Recent academic formalizations of multi-agent systems identify five architectural dimensions—flow control, interaction styles, history sharing, agent network configurations, and human interaction—with network configurations including supervisor, swarm, hierarchical, and single-information-environment architectures [8]. The repository’s choice to let agents negotiate directly sidesteps these taxonomies entirely, suggesting a more pragmatic, less architecturally rigid future.

The Open-Source Gambit

Perhaps the most disruptive aspect of the project is its licensing model. The full book text, illustrations, and compiled PDF are open-sourced alongside the code. In a category where Amazon lists thousands of agent books—ranging from Thomas Caldwell’s Agentic AI Bible to the cookbook-style 30 Agents Every AI Engineer Must Build—most volumes are static commercial products [7]. This repository treats the book as living software, accepting issues and pull requests. It also represents a notable Chinese-language contribution to a discourse dominated by English texts; Dibia, Albada, Lanham, and Caldwell all write primarily for Western audiences [1][7][10]. The repository’s own API key recommendations point to domestic Chinese providers alongside international ones, reflecting a genuinely global view of the model layer.

Where the Edges Show

The project’s ambition is also its liability. The span from 0.6 billion parameter local deployment to distributed reinforcement learning is vast, and not every reader will need both. Some projects, such as the miniature pretraining exercise, are clearly pedagogical. The claim to framework agnosticism is occasionally strained by implementation choices—specific web frameworks, browser automation libraries, and vector stores appear throughout. And like any print-equivalent artifact in a field where protocols evolve and model releases accelerate, the version one PDF is a snapshot of a moving target.

The Outlook

The repository’s real contribution to the AI landscape is not any single algorithm, but the insistence that agent engineering is systems engineering. As enterprise adoption accelerates—across automated customer service, legal copilots, supply chain simulation, and HR automation—the failures that matter are rarely in the base model [3][9][12]. They are in context management, retrieval accuracy, tool safety, evaluation rigor, and observability. By open-sourcing a complete, opinionated stack that treats these concerns as coequal with the LLM itself, the project offers something the scattered blog posts and framework-specific tutorials of 2025 have not: a unified field theory for building agents that can survive contact with production. Whether the field will converge on its formula or fragment further remains an open question. For now, it is one of the few places where the entire agent stack—from cache lines to multi-agent society—lives in a single, coherent narrative.

Sources

  1. Top Books on AI Agents in 2026 - Designing with AI - Victor Dibia
  2. Part 2. Unified Design Principles for AI Agent Framework
  3. LLM agents: 4 applications to transform your enterprise
  4. Can someone suggest a few good books on understanding and ...
  5. AI Agentic Design Principles
  6. Integrating Large Language Models into Enterprise Applications
  7. Ai Agents Book
  8. Six Core Design Principles for Multi-AI Agent Systems
  9. LLM Agents for Enterprises: The Ultimate Guide in 2025
  10. AI Agents in Action, Second Edition - Micheal Lanham
  11. AI Agents: Key Principles and Guidelines - Part 3
  12. Top Enterprise Applications of Large Language Models (LLMs) in 2025

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.