The Hitchhiker's Guide to Agentic AI: From Foundations to Systems

LLM RLHF Agent Agent Planning Tool Learning Agent Memory Multi-agent Collaboration Agent Eval Benchmarks
《面向智能体的AI实践指南》是一本面向从业者的全面参考手册,专为构建自主式人工智能系统而编写。本书覆盖了从基础原理到生产部署的完整技术栈,并围绕一个核心论点展开:要构建卓越的智能体系统,必须深入理解整个技术流水线的每一层,而不能仅局限于某一层。全书首先介绍大语言模型(LLM)这一底层基础——包括Transformer架构、GPU计算系统、模型预训练与微调(监督微调SFT、低秩适配LoRA、混合专家MoE)、模型压缩技术以及推理优化方法;这些内容被视作不可或缺的基础支撑,而非全书的首要关注焦点。随后,本书深入探讨对齐与推理层:涵盖基于人类反馈的强化学习(RLHF)、近端策略优化(PPO)、直接偏好优化(DPO)及其各类变体、生成式强化策略优化(GRPO)、奖励建模,以及面向大规模推理模型的强化学习方法(包括思维链推理和测试时缩放)。全书后半部分则聚焦于智能体AI本身,涵盖智能体训练与基于轨迹的强化学习、检索增强生成(RAG及智能体式RAG)、记忆系统(上下文内记忆、外部记忆、情节记忆与语义记忆)、智能体运行时框架设计与上下文管理、循环工程(推理时强化学习、生成—验证—重试优化、自适应预算控制),以及一套系统的智能体设计模式分类体系。书中还深入剖析了智能体间的协同机制:包括模型上下文协议(MCP)、智能体能力与工具调用、智能体间通信协议(A2A),以及涵盖中心化、去中心化与分层结构的多智能体系统架构。最后,本书以智能体开发框架、智能体用户界面(UI)设计、面向智能体任务的评估方法论,以及生产环境部署收尾。每一章均兼顾严谨的理论基础与切实可行的工程实践指导,辅以可运行的代码示例,并引用相关领域的前沿原始文献。
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, loop engineering (inference-time RL, generate-verify-retry optimization, and adaptive budget control), 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.
许愿