# brokenuper/agent-dev architecture

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

- Interactive diagram: https://gitdiagram.com/brokenuper/agent-dev
- Repository: https://github.com/brokenuper/agent-dev

## Overview

This repository is a Chinese-language companion to a book on LLM agents, not one integrated application. Its user journey is chapter-based: readers study concepts, then explore standalone examples for agent applications, model serving and tuning, orchestration, retrieval, and multimodal tasks. The sampled LangChain example connects a chat UI to a plan-and-execute agent and search/calculator tools; other examples are independently implemented. The graph preserves major README topics, but does not imply a shared runtime. Some chapter capabilities are represented by their exact enclosing directories because their implementation was not sampled.

Main entry points: [`chapter10/langchain-plan-execute.py`](https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py) (Plan-execute chat), [`chapter16/cogvlm2_chat.py`](https://github.com/brokenuper/agent-dev/blob/main/chapter16/cogvlm2_chat.py) (CogVLM2 vision), [`chapter16/image_search.py`](https://github.com/brokenuper/agent-dev/blob/main/chapter16/image_search.py) (Image search), [`chapter01`](https://github.com/brokenuper/agent-dev/tree/main/chapter01) (Agent foundations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["Foundations"]
  node_intro["Agent foundations"]
  node_setup["Environment setup"]
end

subgraph group_applications["Agent applications"]
  node_general_agents["General agents"]
  node_autogpt["AutoGPT<br/>[README.md]"]
  node_memgpt["MemGPT<br/>[README.md]"]
  node_task_agents["Task agents"]
  node_babyagi_server["BabyAGI API server<br/>[vllm_api_server.py]"]
  node_coding_agents["Coding assistants"]
  node_devika["Devika"]
  node_rag_apps["Retrieval applications"]
  node_db_gpt["DB-GPT<br/>[README.md]"]
  node_qanything["QAnything<br/>[README.md]"]
end

subgraph group_development["Agent development"]
  node_glm_tools["GLM function calling"]
  node_agentscope["Agentscope ReAct"]
  node_langchain_chat["Plan-execute chat"]
  node_bing_tool["Bing search tool"]
  node_calculator_tool["Math tool"]
  node_langgraph_flow["LangGraph workflow"]
  node_autogen_sample["Autogen coding agent<br/>[autogen-sample.py]"]
  node_llamaindex_rag["LlamaIndex retrieval"]
  node_crewai_chat["CrewAI chat<br/>[crewai-sample.py]"]
  node_qwen_agent["Qwen-Agent vision"]
end

subgraph group_models["Model and multimodal"]
  node_model_serving["Model serving"]
  node_glm_server["GLM-4 API"]
  node_llama_api["Llama 3 API<br/>[llama3-api.py]"]
  node_llama_tuning["Llama 3 tuning<br/>[llama3-train.py]"]
  node_qwen_api["Qwen-VL API"]
  node_cogvlm["CogVLM2 vision<br/>[cogvlm2_chat.py]"]
  node_image_search["Image search<br/>[image_search.py]"]
end

node_reader(("Book reader"))
node_bing["Bing search"]

node_reader -->|"studies"| node_intro
node_reader -->|"studies"| node_setup
node_reader -->|"explores"| node_general_agents
node_reader -->|"explores"| node_task_agents
node_reader -->|"explores"| node_coding_agents
node_reader -->|"explores"| node_rag_apps
node_reader -->|"studies"| node_model_serving
node_reader -->|"explores"| node_glm_tools
node_reader -->|"explores"| node_agentscope
node_reader -->|"explores"| node_langchain_chat
node_reader -->|"explores"| node_langgraph_flow
node_reader -->|"explores"| node_autogen_sample
node_reader -->|"explores"| node_llamaindex_rag
node_reader -->|"explores"| node_crewai_chat
node_reader -->|"explores"| node_qwen_agent
node_reader -->|"explores"| node_qwen_api
node_reader -->|"explores"| node_cogvlm
node_langchain_chat -->|"invokes"| node_bing_tool
node_langchain_chat -->|"configures"| node_calculator_tool
node_bing_tool -->|"searches"| node_bing
node_image_search -->|"calls"| node_cogvlm

click node_intro "https://github.com/brokenuper/agent-dev/tree/main/chapter01"
click node_setup "https://github.com/brokenuper/agent-dev/tree/main/chapter02"
click node_general_agents "https://github.com/brokenuper/agent-dev/tree/main/chapter03"
click node_autogpt "https://github.com/brokenuper/agent-dev/blob/main/chapter03/AutoGPT/README.md"
click node_memgpt "https://github.com/brokenuper/agent-dev/blob/main/chapter03/MemGPT/README.md"
click node_task_agents "https://github.com/brokenuper/agent-dev/tree/main/chapter04"
click node_babyagi_server "https://github.com/brokenuper/agent-dev/blob/main/chapter04/BabyAGI/vllm_api_server.py"
click node_coding_agents "https://github.com/brokenuper/agent-dev/tree/main/chapter05"
click node_devika "https://github.com/brokenuper/agent-dev/tree/main/chapter05/Devika"
click node_rag_apps "https://github.com/brokenuper/agent-dev/tree/main/chapter06"
click node_db_gpt "https://github.com/brokenuper/agent-dev/blob/main/chapter06/DB-GPT/README.md"
click node_qanything "https://github.com/brokenuper/agent-dev/blob/main/chapter06/QAnything/README.md"
click node_model_serving "https://github.com/brokenuper/agent-dev/tree/main/chapter07"
click node_glm_server "https://github.com/brokenuper/agent-dev/blob/main/chapter07/glm-4/openai_api_server.py"
click node_llama_api "https://github.com/brokenuper/agent-dev/blob/main/chapter07/llama3/llama3-api.py"
click node_llama_tuning "https://github.com/brokenuper/agent-dev/blob/main/chapter07/llama3/llama3-train.py"
click node_glm_tools "https://github.com/brokenuper/agent-dev/blob/main/chapter08/glm4-functioncalling.py"
click node_agentscope "https://github.com/brokenuper/agent-dev/blob/main/chapter09/agentscope-sample.py"
click node_langchain_chat "https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py"
click node_bing_tool "https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py"
click node_calculator_tool "https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py"
click node_langgraph_flow "https://github.com/brokenuper/agent-dev/blob/main/chapter11/langgraph-sample.py"
click node_autogen_sample "https://github.com/brokenuper/agent-dev/blob/main/chapter12/autogen-sample.py"
click node_llamaindex_rag "https://github.com/brokenuper/agent-dev/blob/main/chapter13/llamaindex-sample.py"
click node_crewai_chat "https://github.com/brokenuper/agent-dev/blob/main/chapter14/crewai-sample.py"
click node_qwen_agent "https://github.com/brokenuper/agent-dev/blob/main/chapter15/qwen-agent-sample.py"
click node_qwen_api "https://github.com/brokenuper/agent-dev/blob/main/chapter15/qwenvl-openai-api.py"
click node_cogvlm "https://github.com/brokenuper/agent-dev/blob/main/chapter16/cogvlm2_chat.py"
click node_image_search "https://github.com/brokenuper/agent-dev/blob/main/chapter16/image_search.py"

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_intro,node_setup toneBlue
class node_general_agents,node_autogpt,node_memgpt,node_task_agents,node_babyagi_server,node_coding_agents,node_devika,node_rag_apps,node_db_gpt,node_qanything toneAmber
class node_glm_tools,node_agentscope,node_langchain_chat,node_bing_tool,node_calculator_tool,node_langgraph_flow,node_autogen_sample,node_llamaindex_rag,node_crewai_chat,node_qwen_agent toneMint
class node_model_serving,node_glm_server,node_llama_api,node_llama_tuning,node_qwen_api,node_cogvlm,node_image_search toneRose
class node_reader,node_bing toneIndigo
```

## Components

### Foundations

- [Agent foundations](https://github.com/brokenuper/agent-dev/tree/main/chapter01): `chapter01`
- [Environment setup](https://github.com/brokenuper/agent-dev/tree/main/chapter02): `chapter02`

### Agent applications

- [General agents](https://github.com/brokenuper/agent-dev/tree/main/chapter03): `chapter03`
- [AutoGPT](https://github.com/brokenuper/agent-dev/blob/main/chapter03/AutoGPT/README.md): `chapter03/AutoGPT/README.md`
- [MemGPT](https://github.com/brokenuper/agent-dev/blob/main/chapter03/MemGPT/README.md): `chapter03/MemGPT/README.md`
- [Task agents](https://github.com/brokenuper/agent-dev/tree/main/chapter04): `chapter04`
- [BabyAGI API server](https://github.com/brokenuper/agent-dev/blob/main/chapter04/BabyAGI/vllm_api_server.py): `chapter04/BabyAGI/vllm_api_server.py`
- [Coding assistants](https://github.com/brokenuper/agent-dev/tree/main/chapter05): `chapter05`
- [Devika](https://github.com/brokenuper/agent-dev/tree/main/chapter05/Devika): `chapter05/Devika`
- [Retrieval applications](https://github.com/brokenuper/agent-dev/tree/main/chapter06): `chapter06`
- [DB-GPT](https://github.com/brokenuper/agent-dev/blob/main/chapter06/DB-GPT/README.md): `chapter06/DB-GPT/README.md`
- [QAnything](https://github.com/brokenuper/agent-dev/blob/main/chapter06/QAnything/README.md): `chapter06/QAnything/README.md`

### Agent development

- [GLM function calling](https://github.com/brokenuper/agent-dev/blob/main/chapter08/glm4-functioncalling.py): `chapter08/glm4-functioncalling.py`
- [Agentscope ReAct](https://github.com/brokenuper/agent-dev/blob/main/chapter09/agentscope-sample.py): `chapter09/agentscope-sample.py`
- [Plan-execute chat](https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py): `chapter10/langchain-plan-execute.py`
- [Bing search tool](https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py): `chapter10/langchain-plan-execute.py`
- [Math tool](https://github.com/brokenuper/agent-dev/blob/main/chapter10/langchain-plan-execute.py): `chapter10/langchain-plan-execute.py`
- [LangGraph workflow](https://github.com/brokenuper/agent-dev/blob/main/chapter11/langgraph-sample.py): `chapter11/langgraph-sample.py`
- [Autogen coding agent](https://github.com/brokenuper/agent-dev/blob/main/chapter12/autogen-sample.py): `chapter12/autogen-sample.py`
- [LlamaIndex retrieval](https://github.com/brokenuper/agent-dev/blob/main/chapter13/llamaindex-sample.py): `chapter13/llamaindex-sample.py`
- [CrewAI chat](https://github.com/brokenuper/agent-dev/blob/main/chapter14/crewai-sample.py): `chapter14/crewai-sample.py`
- [Qwen-Agent vision](https://github.com/brokenuper/agent-dev/blob/main/chapter15/qwen-agent-sample.py): `chapter15/qwen-agent-sample.py`

### Model and multimodal

- [Model serving](https://github.com/brokenuper/agent-dev/tree/main/chapter07): `chapter07`
- [GLM-4 API](https://github.com/brokenuper/agent-dev/blob/main/chapter07/glm-4/openai_api_server.py): `chapter07/glm-4/openai_api_server.py`
- [Llama 3 API](https://github.com/brokenuper/agent-dev/blob/main/chapter07/llama3/llama3-api.py): `chapter07/llama3/llama3-api.py`
- [Llama 3 tuning](https://github.com/brokenuper/agent-dev/blob/main/chapter07/llama3/llama3-train.py): `chapter07/llama3/llama3-train.py`
- [Qwen-VL API](https://github.com/brokenuper/agent-dev/blob/main/chapter15/qwenvl-openai-api.py): `chapter15/qwenvl-openai-api.py`
- [CogVLM2 vision](https://github.com/brokenuper/agent-dev/blob/main/chapter16/cogvlm2_chat.py): `chapter16/cogvlm2_chat.py`
- [Image search](https://github.com/brokenuper/agent-dev/blob/main/chapter16/image_search.py): `chapter16/image_search.py`

### Other components

- **Book reader**
- **Bing search**

## Connections

- Book reader → Agent foundations: studies (evidence: `README.md`)
- Book reader → Environment setup: studies (evidence: `README.md`)
- Book reader → General agents: explores (evidence: `README.md`)
- Book reader → Task agents: explores (evidence: `README.md`)
- Book reader → Coding assistants: explores (evidence: `README.md`)
- Book reader → Retrieval applications: explores (evidence: `README.md`)
- Book reader → Model serving: studies (evidence: `README.md`)
- Book reader → GLM function calling: explores (evidence: `README.md`)
- Book reader → Agentscope ReAct: explores (evidence: `README.md`)
- Book reader → Plan-execute chat: explores (evidence: `README.md`)
- Book reader → LangGraph workflow: explores (evidence: `README.md`)
- Book reader → Autogen coding agent: explores (evidence: `README.md`)
- Book reader → LlamaIndex retrieval: explores (evidence: `README.md`)
- Book reader → CrewAI chat: explores (evidence: `README.md`)
- Book reader → Qwen-Agent vision: explores (evidence: `README.md`)
- Book reader → Qwen-VL API: explores (evidence: `README.md`)
- Book reader → CogVLM2 vision: explores (evidence: `README.md`)
- Plan-execute chat → Bing search tool: invokes (evidence: `chapter10/langchain-plan-execute.py`)
- Plan-execute chat → Math tool: configures (evidence: `chapter10/langchain-plan-execute.py`)
- Bing search tool → Bing search: searches (evidence: `chapter10/langchain-plan-execute.py`)
- Image search → CogVLM2 vision: calls (evidence: `chapter16/image_search.py`)
