# santonear/ai-agent-book architecture

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

- Interactive diagram: https://gitdiagram.com/santonear/ai-agent-book
- Repository: https://github.com/santonear/ai-agent-book

## Overview

This repository is an open-source Chinese AI-agent engineering book, with translated editions and chapter-specific companion experiments—not one integrated runtime application. The main user journey is to read the book’s chapters and optionally run their corresponding experiments. The graph groups chapters by subject and includes the shared provider package as a small internal support layer. Relationships are based on the README and source index; most experiment implementations were not inspected, so no finer internal execution flow is asserted.

Main entry points: [`book`](https://github.com/santonear/ai-agent-book/tree/main/book) (Chinese book), [`chapter7`](https://github.com/santonear/ai-agent-book/tree/main/chapter7) (Agent evaluation), [`book-en`](https://github.com/santonear/ai-agent-book/tree/main/book-en) (Translations), [`chapter1`](https://github.com/santonear/ai-agent-book/tree/main/chapter1) (Agent basics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_publication["Book editions"]
  node_book_zh["Chinese book"]
  node_translations["Translations"]
end

subgraph group_foundations["Agent foundations"]
  node_ch1["Agent basics"]
  node_ch2["Context engineering"]
end

subgraph group_knowledge["Context and knowledge"]
  node_ch3["Memory and RAG"]
end

subgraph group_systems["Tools and interaction"]
  node_ch4["Agent tools"]
  node_ch5["Coding agents"]
  node_ch6["Interaction modes"]
end

subgraph group_evaluation["Evaluation and evolution"]
  node_ch7["Agent evaluation"]
  node_ch8["Model post-training"]
  node_ch9["Agent evolution"]
  node_ch10["Advanced agents"]
  node_providers["Provider adapters"]
end

node_reader(("Reader"))

node_reader -->|"reads"| node_book_zh
node_reader -->|"reads"| node_translations
node_book_zh -->|"covers"| node_ch1
node_book_zh -->|"covers"| node_ch2
node_book_zh -->|"covers"| node_ch3
node_book_zh -->|"covers"| node_ch4
node_book_zh -->|"covers"| node_ch5
node_book_zh -->|"covers"| node_ch6
node_book_zh -->|"covers"| node_ch7
node_book_zh -->|"covers"| node_ch8
node_book_zh -->|"covers"| node_ch9
node_book_zh -->|"covers"| node_ch10
node_ch7 -->|"uses adapters"| node_providers

click node_book_zh "https://github.com/santonear/ai-agent-book/tree/main/book"
click node_translations "https://github.com/santonear/ai-agent-book/tree/main/book-en"
click node_ch1 "https://github.com/santonear/ai-agent-book/tree/main/chapter1"
click node_ch2 "https://github.com/santonear/ai-agent-book/tree/main/chapter2"
click node_ch3 "https://github.com/santonear/ai-agent-book/tree/main/chapter3"
click node_ch4 "https://github.com/santonear/ai-agent-book/tree/main/chapter4"
click node_ch5 "https://github.com/santonear/ai-agent-book/tree/main/chapter5"
click node_ch6 "https://github.com/santonear/ai-agent-book/tree/main/chapter6"
click node_ch7 "https://github.com/santonear/ai-agent-book/tree/main/chapter7"
click node_ch8 "https://github.com/santonear/ai-agent-book/tree/main/chapter8"
click node_ch9 "https://github.com/santonear/ai-agent-book/tree/main/chapter9"
click node_ch10 "https://github.com/santonear/ai-agent-book/tree/main/chapter10"
click node_providers "https://github.com/santonear/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_zh,node_translations toneBlue
class node_ch1,node_ch2 toneAmber
class node_ch3 toneMint
class node_ch4,node_ch5,node_ch6 toneRose
class node_ch7,node_ch8,node_ch9,node_ch10,node_providers,node_reader toneIndigo
```

## Components

### Book editions

- [Chinese book](https://github.com/santonear/ai-agent-book/tree/main/book): `book`
- [Translations](https://github.com/santonear/ai-agent-book/tree/main/book-en): `book-en`

### Agent foundations

- [Agent basics](https://github.com/santonear/ai-agent-book/tree/main/chapter1): `chapter1`
- [Context engineering](https://github.com/santonear/ai-agent-book/tree/main/chapter2): `chapter2`

### Context and knowledge

- [Memory and RAG](https://github.com/santonear/ai-agent-book/tree/main/chapter3): `chapter3`

### Tools and interaction

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

### Evaluation and evolution

- [Agent evaluation](https://github.com/santonear/ai-agent-book/tree/main/chapter7): `chapter7`
- [Model post-training](https://github.com/santonear/ai-agent-book/tree/main/chapter8): `chapter8`
- [Agent evolution](https://github.com/santonear/ai-agent-book/tree/main/chapter9): `chapter9`
- [Advanced agents](https://github.com/santonear/ai-agent-book/tree/main/chapter10): `chapter10`
- [Provider adapters](https://github.com/santonear/ai-agent-book/tree/main/agentbook/providers): `agentbook/providers`

### Other components

- **Reader**

## Connections

- Reader → Chinese book: reads (evidence: `README.md`)
- Reader → Translations: reads (evidence: `README.md`)
- Chinese book → Agent basics: covers (evidence: `README.md`)
- Chinese book → Context engineering: covers (evidence: `README.md`)
- Chinese book → Memory and RAG: covers (evidence: `README.md`)
- Chinese book → Agent tools: covers (evidence: `README.md`)
- Chinese book → Coding agents: covers (evidence: `README.md`)
- Chinese book → Interaction modes: covers (evidence: `README.md`)
- Chinese book → Agent evaluation: covers (evidence: `README.md`)
- Chinese book → Model post-training: covers (evidence: `README.md`)
- Chinese book → Agent evolution: covers (evidence: `README.md`)
- Chinese book → Advanced agents: covers (evidence: `README.md`)
- Agent evaluation → Provider adapters: uses adapters
