# bojieli/ai-agent-book architecture

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

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

## Overview

This repository is an AI-agent engineering book accompanied by runnable experiments, not a single deployed agent. The main user journey is to read a chapter and follow its linked experiment to explore the corresponding technique. The README establishes the ten-chapter topics, book locations, and companion-experiment structure; the tree shows their implementation areas. Sampled source confirms selected experiment internals, but not wiring across the unsampled projects, so the graph avoids inferring those connections.

Main entry points: [`book`](https://github.com/bojieli/ai-agent-book/tree/main/book) (Chinese book), [`book-en`](https://github.com/bojieli/ai-agent-book/tree/main/book-en) (English book), [`book-es`](https://github.com/bojieli/ai-agent-book/tree/main/book-es) (Other translations), [`chapter1`](https://github.com/bojieli/ai-agent-book/tree/main/chapter1) (Agent introduction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_books["Book editions"]
  node_zhbook["Chinese book"]
  node_enbook["English book"]
  node_translations["Other translations"]
end

subgraph group_foundations["Agent foundations"]
  node_ch1["Agent introduction"]
  node_ch2["Context engineering"]
  node_providers["Provider plumbing"]
end

subgraph group_knowledge["Memory and tools"]
  node_ch3["Memory and knowledge"]
  node_ch4["Agent tools"]
  node_ch5["Coding agents"]
end

subgraph group_interaction["Interaction and evaluation"]
  node_ch6["Interaction"]
  node_ch7["Agent evaluation"]
end

subgraph group_learning["Training and evolution"]
  node_ch8["Model post-training"]
  node_ch9["Agent evolution"]
  node_ch10["Production agents"]
end

node_reader(("Reader"))

node_reader -->|"reads"| node_zhbook
node_reader -->|"reads"| node_enbook
node_reader -->|"reads"| node_translations
node_zhbook -->|"links experiments"| node_ch1
node_zhbook -->|"links experiments"| node_ch2
node_zhbook -->|"links experiments"| node_ch3
node_zhbook -->|"links experiments"| node_ch4
node_zhbook -->|"links experiments"| node_ch5
node_zhbook -->|"links experiments"| node_ch6
node_zhbook -->|"links experiments"| node_ch7
node_zhbook -->|"links experiments"| node_ch8
node_zhbook -->|"links experiments"| node_ch9
node_zhbook -->|"links experiments"| node_ch10

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

## Components

### Book editions

- [Chinese book](https://github.com/bojieli/ai-agent-book/tree/main/book): `book`
- [English book](https://github.com/bojieli/ai-agent-book/tree/main/book-en): `book-en`
- [Other translations](https://github.com/bojieli/ai-agent-book/tree/main/book-es): `book-es`

### Agent foundations

- [Agent introduction](https://github.com/bojieli/ai-agent-book/tree/main/chapter1): `chapter1`
- [Context engineering](https://github.com/bojieli/ai-agent-book/tree/main/chapter2): `chapter2`
- [Provider plumbing](https://github.com/bojieli/ai-agent-book/tree/main/agentbook/providers): `agentbook/providers`

### Memory and tools

- [Memory and knowledge](https://github.com/bojieli/ai-agent-book/tree/main/chapter3): `chapter3`
- [Agent tools](https://github.com/bojieli/ai-agent-book/tree/main/chapter4): `chapter4`
- [Coding agents](https://github.com/bojieli/ai-agent-book/tree/main/chapter5): `chapter5`

### Interaction and evaluation

- [Interaction](https://github.com/bojieli/ai-agent-book/tree/main/chapter6): `chapter6`
- [Agent evaluation](https://github.com/bojieli/ai-agent-book/tree/main/chapter7): `chapter7`

### Training and evolution

- [Model post-training](https://github.com/bojieli/ai-agent-book/tree/main/chapter8): `chapter8`
- [Agent evolution](https://github.com/bojieli/ai-agent-book/tree/main/chapter9): `chapter9`
- [Production agents](https://github.com/bojieli/ai-agent-book/tree/main/chapter10): `chapter10`

### Other components

- **Reader**

## Connections

- Reader → Chinese book: reads
- Reader → English book: reads
- Reader → Other translations: reads
- Chinese book → Agent introduction: links experiments
- Chinese book → Context engineering: links experiments
- Chinese book → Memory and knowledge: links experiments
- Chinese book → Agent tools: links experiments
- Chinese book → Coding agents: links experiments
- Chinese book → Interaction: links experiments
- Chinese book → Agent evaluation: links experiments
- Chinese book → Model post-training: links experiments
- Chinese book → Agent evolution: links experiments
- Chinese book → Production agents: links experiments
