lintsinghua/claude-code-book
《御舆:解码 Agent Harness》42万字拆解 AI Agent 的Harness骨架与神经 —— Claude Code 架构深度剖析,15 章从对话循环到构建你自己的 Agent Harness。在线阅读网站:
What it solves
This project provides a deep architectural analysis of the "Agent Harness"—the underlying runtime framework that powers AI agents. It demystifies how complex systems like Claude Code manage the continuous loop of conversation, tool execution, security permissions, and memory to function effectively.
How it works
The book breaks down the agent runtime into four logical layers: foundational concepts (like the main execution loop), core subsystems (memory, configuration, and context management), advanced patterns (multi-agent orchestration and plugin architectures), and engineering practices (performance optimization and system building). It uses architectural diagrams, design trade-off analysis, and practical exercises to explain how these components collaborate.
Who it’s for
It is designed for developers and engineers who want to understand the internal mechanics of AI agent frameworks, move beyond high-level usage, and learn how to build or extend their own agent runtimes.
Highlights
- Comprehensive breakdown of the Agent Harness architecture, including 16 core modules and 10 design patterns.
- Detailed exploration of critical systems like permission pipelines, context window compression, and long-term memory management.
- Practical guidance on multi-agent orchestration, including coordinator-worker patterns and MCP (Model Context Protocol) integration.
- A step-by-step roadmap for building a custom agent runtime from scratch.
- Extensive reference materials, including a 100-term glossary and a complete inventory of agent tools and configuration flags.
Related
- Project
- Project
- Project
- Project