# little51/agent-dev architecture

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

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

## Overview

This repository is a book companion containing independent examples, not one integrated application. Its common user-to-result pattern is a prompt or image entering an agent, model service, or retrieval demo and producing a response; the specific stages differ by chapter. The graph preserves the README’s major capability areas and highlights runtime relationships visible in sampled code. Several chapter subsystems are represented by their exact chapter directories because their implementation files were not sampled; those relationships are not inferred.

Main entry points: [`chapter08/glm4-functioncalling.py`](https://github.com/little51/agent-dev/blob/main/chapter08/glm4-functioncalling.py) (Function calling), [`chapter10/langchain-plan-execute.py`](https://github.com/little51/agent-dev/blob/main/chapter10/langchain-plan-execute.py) (Plan and execute), [`chapter11/langgraph-sample.py`](https://github.com/little51/agent-dev/blob/main/chapter11/langgraph-sample.py) (LangGraph workflow), [`chapter13/llamaindex-sample.py`](https://github.com/little51/agent-dev/blob/main/chapter13/llamaindex-sample.py) (LlamaIndex RAG)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent_apps["Agent applications"]
  node_general_agents["General agents"]
  node_task_agents["Task agents"]
  node_developer_agents["Developer agents"]
  node_rag_apps["RAG applications"]
  node_function_calling["Function calling"]
end

subgraph group_frameworks["Agent frameworks"]
  node_agentscope_react["Agentscope ReAct"]
  node_langchain_plan["Plan and execute"]
  node_langgraph_flow["LangGraph workflow"]
  node_autogen_agents["Autogen coding<br/>[autogen-sample.py]"]
  node_llamaindex_rag["LlamaIndex RAG"]
  node_crewai_team["CrewAI team<br/>[crewai-sample.py]"]
  node_qwen_vision["Qwen-Agent vision"]
  node_langgraph_db[("User database")]
end

subgraph group_model_services["Model services"]
  node_glm_service["GLM-4 service"]
  node_glm_legacy["GLM-4 legacy service"]
  node_glm_gradio["GLM-4 Gradio<br/>[glm4-gradio.py]"]
  node_llama_api["Llama 3 API<br/>[llama3-api.py]"]
  node_llama_gradio["Llama 3 Gradio<br/>[llama3-gradio.py]"]
  node_llama_training["Llama 3 training<br/>[llama3-train.py]"]
  node_lora_merge["LoRA merging"]
  node_vllm_api["vLLM API<br/>[vllm_api_server.py]"]
  node_qwen_api["Qwen API"]
end

subgraph group_retrieval_vision["Retrieval and vision"]
  node_cogvlm["CogVLM2 inference<br/>[cogvlm2_chat.py]"]
  node_image_search["Image search demo<br/>[image_search.py]"]
  node_documents[("Document index")]
end

node_reader(("Reader"))
node_bing["Bing search"]

node_reader -->|"submits prompt"| node_function_calling
node_function_calling -->|"requests completion"| node_glm_service
node_function_calling -->|"dispatches tool"| node_function_calling
node_reader -->|"submits query"| node_langchain_plan
node_langchain_plan -->|"searches web"| node_bing
node_reader -->|"submits query"| node_langgraph_flow
node_langgraph_flow -->|"queries SQL"| node_langgraph_db
node_reader -->|"asks question"| node_llamaindex_rag
node_llamaindex_rag -->|"builds and queries"| node_documents
node_reader -->|"submits task"| node_crewai_team
node_reader -->|"searches images"| node_image_search
node_image_search -->|"describes images"| node_cogvlm

click node_general_agents "https://github.com/little51/agent-dev/tree/main/chapter03"
click node_task_agents "https://github.com/little51/agent-dev/tree/main/chapter04"
click node_developer_agents "https://github.com/little51/agent-dev/tree/main/chapter05"
click node_rag_apps "https://github.com/little51/agent-dev/tree/main/chapter06"
click node_function_calling "https://github.com/little51/agent-dev/blob/main/chapter08/glm4-functioncalling.py"
click node_agentscope_react "https://github.com/little51/agent-dev/blob/main/chapter09/agentscope-sample.py"
click node_langchain_plan "https://github.com/little51/agent-dev/blob/main/chapter10/langchain-plan-execute.py"
click node_langgraph_flow "https://github.com/little51/agent-dev/blob/main/chapter11/langgraph-sample.py"
click node_autogen_agents "https://github.com/little51/agent-dev/blob/main/chapter12/autogen-sample.py"
click node_llamaindex_rag "https://github.com/little51/agent-dev/blob/main/chapter13/llamaindex-sample.py"
click node_crewai_team "https://github.com/little51/agent-dev/blob/main/chapter14/crewai-sample.py"
click node_qwen_vision "https://github.com/little51/agent-dev/blob/main/chapter15/qwen-agent-sample.py"
click node_glm_service "https://github.com/little51/agent-dev/blob/main/chapter07/glm-4/openai_api_server.py"
click node_glm_legacy "https://github.com/little51/agent-dev/blob/main/chapter07/glm-4/openai_api_server_old.py"
click node_glm_gradio "https://github.com/little51/agent-dev/blob/main/chapter07/glm-4/glm4-gradio.py"
click node_llama_api "https://github.com/little51/agent-dev/blob/main/chapter07/llama3/llama3-api.py"
click node_llama_gradio "https://github.com/little51/agent-dev/blob/main/chapter07/llama3/llama3-gradio.py"
click node_llama_training "https://github.com/little51/agent-dev/blob/main/chapter07/llama3/llama3-train.py"
click node_lora_merge "https://github.com/little51/agent-dev/blob/main/chapter07/llama3/merge_lora_weights.py"
click node_vllm_api "https://github.com/little51/agent-dev/blob/main/chapter04/BabyAGI/vllm_api_server.py"
click node_qwen_api "https://github.com/little51/agent-dev/blob/main/chapter15/qwenvl-openai-api.py"
click node_cogvlm "https://github.com/little51/agent-dev/blob/main/chapter16/cogvlm2_chat.py"
click node_image_search "https://github.com/little51/agent-dev/blob/main/chapter16/image_search.py"
click node_documents "https://github.com/little51/agent-dev/blob/main/chapter13/llamaindex-sample.py"
click node_langgraph_db "https://github.com/little51/agent-dev/blob/main/chapter11/langgraph-sample.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_general_agents,node_task_agents,node_developer_agents,node_rag_apps,node_function_calling toneBlue
class node_agentscope_react,node_langchain_plan,node_langgraph_flow,node_autogen_agents,node_llamaindex_rag,node_crewai_team,node_qwen_vision,node_langgraph_db toneAmber
class node_glm_service,node_glm_legacy,node_glm_gradio,node_llama_api,node_llama_gradio,node_llama_training,node_lora_merge,node_vllm_api,node_qwen_api toneMint
class node_cogvlm,node_image_search,node_documents toneRose
class node_reader,node_bing toneIndigo
```

## Components

### Agent applications

- [General agents](https://github.com/little51/agent-dev/tree/main/chapter03): `chapter03`
- [Task agents](https://github.com/little51/agent-dev/tree/main/chapter04): `chapter04`
- [Developer agents](https://github.com/little51/agent-dev/tree/main/chapter05): `chapter05`
- [RAG applications](https://github.com/little51/agent-dev/tree/main/chapter06): `chapter06`
- [Function calling](https://github.com/little51/agent-dev/blob/main/chapter08/glm4-functioncalling.py): `chapter08/glm4-functioncalling.py`

### Agent frameworks

- [Agentscope ReAct](https://github.com/little51/agent-dev/blob/main/chapter09/agentscope-sample.py): `chapter09/agentscope-sample.py`
- [Plan and execute](https://github.com/little51/agent-dev/blob/main/chapter10/langchain-plan-execute.py): `chapter10/langchain-plan-execute.py`
- [LangGraph workflow](https://github.com/little51/agent-dev/blob/main/chapter11/langgraph-sample.py): `chapter11/langgraph-sample.py`
- [Autogen coding](https://github.com/little51/agent-dev/blob/main/chapter12/autogen-sample.py): `chapter12/autogen-sample.py`
- [LlamaIndex RAG](https://github.com/little51/agent-dev/blob/main/chapter13/llamaindex-sample.py): `chapter13/llamaindex-sample.py`
- [CrewAI team](https://github.com/little51/agent-dev/blob/main/chapter14/crewai-sample.py): `chapter14/crewai-sample.py`
- [Qwen-Agent vision](https://github.com/little51/agent-dev/blob/main/chapter15/qwen-agent-sample.py): `chapter15/qwen-agent-sample.py`
- [User database](https://github.com/little51/agent-dev/blob/main/chapter11/langgraph-sample.py): `chapter11/langgraph-sample.py`

### Model services

- [GLM-4 service](https://github.com/little51/agent-dev/blob/main/chapter07/glm-4/openai_api_server.py): `chapter07/glm-4/openai_api_server.py`
- [GLM-4 legacy service](https://github.com/little51/agent-dev/blob/main/chapter07/glm-4/openai_api_server_old.py): `chapter07/glm-4/openai_api_server_old.py`
- [GLM-4 Gradio](https://github.com/little51/agent-dev/blob/main/chapter07/glm-4/glm4-gradio.py): `chapter07/glm-4/glm4-gradio.py`
- [Llama 3 API](https://github.com/little51/agent-dev/blob/main/chapter07/llama3/llama3-api.py): `chapter07/llama3/llama3-api.py`
- [Llama 3 Gradio](https://github.com/little51/agent-dev/blob/main/chapter07/llama3/llama3-gradio.py): `chapter07/llama3/llama3-gradio.py`
- [Llama 3 training](https://github.com/little51/agent-dev/blob/main/chapter07/llama3/llama3-train.py): `chapter07/llama3/llama3-train.py`
- [LoRA merging](https://github.com/little51/agent-dev/blob/main/chapter07/llama3/merge_lora_weights.py): `chapter07/llama3/merge_lora_weights.py`
- [vLLM API](https://github.com/little51/agent-dev/blob/main/chapter04/BabyAGI/vllm_api_server.py): `chapter04/BabyAGI/vllm_api_server.py`
- [Qwen API](https://github.com/little51/agent-dev/blob/main/chapter15/qwenvl-openai-api.py): `chapter15/qwenvl-openai-api.py`

### Retrieval and vision

- [CogVLM2 inference](https://github.com/little51/agent-dev/blob/main/chapter16/cogvlm2_chat.py): `chapter16/cogvlm2_chat.py`
- [Image search demo](https://github.com/little51/agent-dev/blob/main/chapter16/image_search.py): `chapter16/image_search.py`
- [Document index](https://github.com/little51/agent-dev/blob/main/chapter13/llamaindex-sample.py): `chapter13/llamaindex-sample.py`

### Other components

- **Reader**
- **Bing search**

## Connections

- Reader → Function calling: submits prompt (evidence: `chapter08/glm4-functioncalling.py`)
- Function calling → GLM-4 service: requests completion (evidence: `chapter08/glm4-functioncalling.py`)
- Function calling → Function calling: dispatches tool (evidence: `chapter08/glm4-functioncalling.py`)
- Reader → Plan and execute: submits query (evidence: `chapter10/langchain-plan-execute.py`)
- Plan and execute → Bing search: searches web (evidence: `chapter10/langchain-plan-execute.py`)
- Reader → LangGraph workflow: submits query (evidence: `chapter11/langgraph-sample.py`)
- LangGraph workflow → User database: queries SQL (evidence: `chapter11/langgraph-sample.py`)
- Reader → LlamaIndex RAG: asks question (evidence: `chapter13/llamaindex-sample.py`)
- LlamaIndex RAG → Document index: builds and queries (evidence: `chapter13/llamaindex-sample.py`)
- Reader → CrewAI team: submits task (evidence: `chapter14/crewai-sample.py`)
- Reader → Image search demo: searches images (evidence: `chapter16/image_search.py`)
- Image search demo → CogVLM2 inference: describes images (evidence: `chapter16/image_search.py`)
