# zhangdaxie/ai-agent-book architecture

> Architecture diagram of the GitHub repository zhangdaxie/ai-agent-book, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zhangdaxie/ai-agent-book
- Repository: https://github.com/zhangdaxie/ai-agent-book
- Video tour (about a minute): https://gitdiagram.com/zhangdaxie/ai-agent-book/video

## Overview

This repository is the companion codebase for a ten-chapter AI-agent engineering book, with experiments illustrating its concepts. The main user journey is to study the book’s progression from agent fundamentals through production practice and explore the corresponding chapter experiments. The README documents chapter topics and experiment counts; source excerpts show selected implementation examples, not a unified application runtime. Chapter nodes therefore represent documented subject areas, while the shared provider package is included as an internal support layer.

Main entry points: [`book`](https://github.com/zhangdaxie/ai-agent-book/tree/main/book) (Book manuscript), [`chapter7`](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter7) (Agent evaluation), [`chapter1`](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter1) (Agent basics), [`chapter2`](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter2) (Context engineering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["Agent foundations"]
  node_book["Book manuscript"]
  node_ch1["Agent basics"]
  node_ch2["Context engineering"]
  node_ch3["Memory and knowledge"]
end

subgraph group_engineering["Agent engineering"]
  node_ch4["Agent tools"]
  node_ch5["Coding agents"]
  node_ch6["Agent interaction"]
end

subgraph group_evaluation["Evaluation and learning"]
  node_ch7["Agent evaluation"]
  node_ch8["Model post-training"]
  node_ch9["Agent evolution"]
end

subgraph group_advanced["Advanced agents"]
  node_ch10["Multi-agent systems"]
  node_providers["Model providers"]
end

node_reader(("Reader"))

node_reader -->|"reads"| node_book
node_book -->|"introduces"| node_ch1
node_book -->|"covers"| node_ch2
node_book -->|"covers"| node_ch3
node_book -->|"covers"| node_ch4
node_book -->|"covers"| node_ch5
node_book -->|"covers"| node_ch6
node_book -->|"covers"| node_ch7
node_book -->|"covers"| node_ch8
node_book -->|"covers"| node_ch9
node_book -->|"covers"| node_ch10
node_ch7 -->|"uses"| node_providers

click node_book "https://github.com/zhangdaxie/ai-agent-book/tree/main/book"
click node_ch1 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter1"
click node_ch2 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter2"
click node_ch3 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter3"
click node_ch4 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter4"
click node_ch5 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter5"
click node_ch6 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter6"
click node_ch7 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter7"
click node_ch8 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter8"
click node_ch9 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter9"
click node_ch10 "https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter10"
click node_providers "https://github.com/zhangdaxie/ai-agent-book/tree/main/agentbook/providers"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_book,node_ch1,node_ch2,node_ch3 toneBlue
class node_ch4,node_ch5,node_ch6 toneAmber
class node_ch7,node_ch8,node_ch9 toneMint
class node_ch10,node_providers toneRose
class node_reader toneIndigo
```

## Components

### Agent foundations

- [Book manuscript](https://github.com/zhangdaxie/ai-agent-book/tree/main/book): `book`
- [Agent basics](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter1): `chapter1`
- [Context engineering](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter2): `chapter2`
- [Memory and knowledge](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter3): `chapter3`

### Agent engineering

- [Agent tools](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter4): `chapter4`
- [Coding agents](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter5): `chapter5`
- [Agent interaction](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter6): `chapter6`

### Evaluation and learning

- [Agent evaluation](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter7): `chapter7`
- [Model post-training](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter8): `chapter8`
- [Agent evolution](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter9): `chapter9`

### Advanced agents

- [Multi-agent systems](https://github.com/zhangdaxie/ai-agent-book/tree/main/chapter10): `chapter10`
- [Model providers](https://github.com/zhangdaxie/ai-agent-book/tree/main/agentbook/providers): `agentbook/providers`

### Other components

- **Reader**

## Connections

- Reader → Book manuscript: reads (evidence: `README.md`)
- Book manuscript → Agent basics: introduces (evidence: `README.md`)
- Book manuscript → Context engineering: covers (evidence: `README.md`)
- Book manuscript → Memory and knowledge: covers (evidence: `README.md`)
- Book manuscript → Agent tools: covers (evidence: `README.md`)
- Book manuscript → Coding agents: covers (evidence: `README.md`)
- Book manuscript → Agent interaction: covers (evidence: `README.md`)
- Book manuscript → Agent evaluation: covers (evidence: `README.md`)
- Book manuscript → Model post-training: covers (evidence: `README.md`)
- Book manuscript → Agent evolution: covers (evidence: `README.md`)
- Book manuscript → Multi-agent systems: covers (evidence: `README.md`)
- Agent evaluation → Model providers: uses
