《搭车客指南:代理式人工智能指南:从基础到系统》
The Hitchhiker's Guide to Agentic AI: From Foundations to Systems
摘要
《Hitchhiker’s Guide to Agentic AI》是一本关于构建自主AI系统的全面实践指南。本书涵盖了从基础原理到实际部署的整个流程,其核心观点是:要构建优秀的代理式AI系统,必须理解整个系统中的每一层结构,而不仅仅关注其中某一层。书中首先介绍了LLM的基础技术——Transformer架构、GPU系统、训练与微调方法(如SFT、LoRA、MoE)、模型压缩以及推理优化等,这些都被视为重要的基础要素,而非主要关注点。接着,书中详细讨论了代理式AI中的对齐与推理机制:基于人类反馈的强化学习、PPO、DPO及其变体、GRPO、奖励建模,以及用于大型推理模型的强化学习技术,包括“思维链”技术和测试时扩展技术。后半部分则重点探讨了真正的代理式AI技术。内容包括代理式训练、基于轨迹的强化学习、检索增强生成技术、内存系统(包括上下文内、外部、事件驱动和语义型内存系统)、代理设计模式及上下文管理,还有各种代理设计模式的分类。书中还深入探讨了代理之间的协作机制:模型上下文协议、代理技能与工具使用、代理间通信协议,以及集中式、分散式和层次化等多代理架构。最后,书中介绍了代理开发框架、代理式UI设计、代理任务评估方法以及生产部署相关内容。每章都结合严谨的理论基础与实施指导、代码示例以及相关文献引用。
English Abstract
The Hitchhiker's Guide to Agentic AI is a comprehensive practitioner's reference for building autonomous AI systems. The book covers the full stack from first principles to production deployment, organized around a central thesis: building great agentic systems requires understanding every layer of the pipeline, not just one. The book opens with the LLM substrate -- transformer architecture, GPU systems, training and fine-tuning (SFT,LoRA, MoE), model compression, and inference optimization -- treated as essential foundations rather than the primary focus. It then develops the alignment and reasoning layer: reinforcement learning from human feedback (RLHF), PPO, DPO and its variants, GRPO, reward modeling, and RL for large reasoning models including chain-of-thought and test-time scaling. The second half is devoted to agentic AI proper. Topics include agentic training and trajectory-based RL, retrieval-augmented generation (RAG and Agentic RAG), memory systems (in-context, external, episodic, and semantic), agent harness design and context management, and a taxonomy of agent design patterns. Inter-agent coordination is covered in depth: the Model Context Protocol (MCP), agent skills and tool use, the Agent-to-Agent (A2A) communication protocol, and multi-agent architectures spanning centralized, decentralized, and hierarchical topologies. The book concludes with agent development frameworks, agentic UI design, evaluation methodology for agentic tasks, and production deployment. Each chapter pairs rigorous theoretical foundations with implementation guidance, code examples, and references to the primary literature.