How didilili/ai-agents-from-zero works
1. Repository shape: a documentation-first knowledge base
- This repo is primarily a Chinese AI agent tutorial site, not a single application.
- Its core assets are Markdown lessons, worked examples, project walk-throughs, images, and a static site shell for publishing and reading online.
2. Two main content domains
- The top-level numbered Markdown files (1-1...md through 27...md) form the concept and framework curriculum: LLM basics, prompt engineering, RAG, LangChain, LangGraph, MCP, Agents, deployment, and related engineering topics.
- The subdirectories under **案例与源码-* and 实战项目-* contain hands-on case studies and end-to-end project materials**.
3. Static site / documentation delivery layer
- index.html, _sidebar.md, .nojekyll, sitemap.xml, and lib/plugins/* indicate a static documentation site built for browser reading and likely hosted on GitHub Pages.
- The site shell is responsible for navigation, rendering Markdown, and optional enhancements such as analytics and Mermaid diagram viewing.
4. Learning content boundary
- The repo separates concept explanations from project execution paths:
- Concept chapters explain the framework and theory.
- Case-study directories provide concrete artifacts like workflow definitions, sample data, screenshots, and runnable code snippets.
- This separation makes the repo usable both as a study guide and as a reference library.
5. Python example runtime boundary
- requirements.txt and pyproject.toml define the Python execution environment for the sample code.
- The README’s quick start points to running examples directly from the repository root, which means the code examples depend on root-level environment loading via .env.
6. LangChain / LangGraph example subsystem
- 案例与源码-2-LangChain框架 and 案例与源码-3-LangGraph框架 are the main code-example clusters.
- They are organized by topic: model I/O, prompt templates, output parsers, LCEL, memory, tools, embeddings, RAG, MCP, agents, graph/state/edge/node design, persistence, streaming, and multi-agent coordination.
- These folders represent the repo’s framework architecture teaching layer.
7. Project-simulation subsystem
- 实战项目-电商问数 and 实战项目-深度研搜 are the two most complete “enterprise-style” project tracks in the repo.
- The embedded lesson files show the intended architecture of each project:
- 电商问数: MySQL + metadata knowledge base + Qdrant + Elasticsearch + LangGraph + FastAPI.
- 深度研搜: DeepAgents-style multi-agent orchestration + network search + database querying + RAGFlow knowledge base + file generation + FastAPI/WebSocket.
- These are described as project blueprints and walkthroughs; their actual runnable source lives in external repositories linked from the README.
8. Data and artifact layer
- images/ and the project-specific images/ folders store diagrams, screenshots, and explanatory visuals used throughout the lessons.
- Some projects also include structured artifacts:
- yaml/ in the e-commerce question-answering project for metadata tables and metrics.
- Sample files in example folders (csv, json, pdf, docx, txt, xlsx, mp4) used to demonstrate ingestion, parsing, retrieval, or generation workflows.
- These assets act as the input corpus for tutorial pipelines.
9. External service and platform dependencies
- The repo references several outside systems that materially shape the architecture:
- LLM providers such as OpenAI, DeepSeek, Qwen.
- Ollama for local model deployment.
- Redis, Qdrant, Elasticsearch, MySQL, and FastAPI in the project tracks.
- Coze, Dify, RAGFlow, MCP servers/clients, and other agent tooling in the tutorial branches.
- These dependencies matter because the repo is teaching integration architecture, not just isolated code patterns.
10. Configuration and secrets boundary
- .env-example indicates environment-specific configuration is expected to be copied into a local .env.
- The README emphasizes API keys and environment setup, so the architecture assumes local developer configuration rather than checked-in secrets.
- This boundary cleanly separates documentation/code from runtime credentials and machine-specific settings.
11. Developer workflow / repository hygiene
- .husky/commit-msg and commitlint.config.js show a commit-message validation workflow.
- CONTRIBUTING.md suggests the repo is maintained like an evolving knowledge product, with contributor guidelines and update cadence.
- This is a documentation engineering workflow, not a product CI/CD pipeline.
12. Repository-level navigation model
- The content is intentionally hierarchical:
- fundamentals → framework tutorials → platform tutorials → project cases → interview prep.
- _sidebar.md and the numbered lesson structure support that navigation model.
- For architecture diagramming, think of this repo as a content platform with layered learning paths, where the central flow is “concepts → examples → project systems → reference materials.”
13. What is not here
- There is no single monolithic backend service, database schema, or deployed application in this repo.
- Instead, it is a meta-repository that teaches how to build such systems, while delegating some runnable projects to linked external repos.
- That distinction is important for any architecture diagram: the repo itself is the knowledge and example hub, not the production system.
Main entry points: _sidebar.md Sidebar nav · 案例与源码-3-LangGraph框架 LangGraph examples · images Images · 案例与源码-2-LangChain框架 LangChain examples
Components 19
Docs site
Static documentation shell and navigation for reading the knowledge base in the browser.
- Site shell · Browser-facing documentation entry point with sidebar navigation and Markdown rendering.
index.html - Sidebar nav · Repository-wide navigation structure for the learning paths.
_sidebar.md - Site plugins · Optional browser enhancements such as analytics and Mermaid viewing.
lib/plugins
Curriculum
Top-level conceptual and framework lessons that form the main learning path.
- Fundamentals · Core theory on LLMs, prompting, RAG choices, and agent selection.
1-1-大模型认知与工程概览.md - RAG path · Knowledge-base, RAG, and deployment-related lessons.
2-RAG-搭建企业私有&个人知识库.md - Platform agents · Coze and Dify workflow-based agent tutorials and deployment notes.
3-基于Coze&Dify平台的智能体开发.md - LangChain path · LangChain overview, model I/O, prompts, memory, tools, embeddings, RAG, MCP, and agents.
9-LangChain概述与架构.md - LangGraph path · LangGraph concepts from graph and state APIs through advanced multi-agent patterns.
22-LangGraph概述与快速入门.md - Skills & tools · AI coding tools and skill-oriented practices near the end of the curriculum.
27-Skills技能与AI编程工具实践.md
Example suites
Runnable framework examples and case-study materials organized by topic.
- Coze&Dify cases · Workflow-oriented case studies for Coze and Dify, including generated artifacts and sample data.
案例与源码-1-Coze&Dify工作流智能体 - LangChain examples · Topic-based Python examples covering the LangChain stack from hello world to agents.
案例与源码-2-LangChain框架 - LangGraph examples · Graph, state, node, edge, persistence, streaming, subgraph, and multi-agent examples.
案例与源码-3-LangGraph框架
Project tracks
End-to-end project walkthroughs that model real-world agent system architectures.
Assets
Images and structured sample data used to explain and drive the tutorial pipelines.
- Images · Repo-wide diagrams, screenshots, and illustrations supporting the lessons.
images - Sample files · CSV, JSON, PDF, DOCX, TXT, XLSX, and MP4 materials used in ingestion and generation demos.
案例与源码-2-LangChain框架/10-rag/docloads/assets - Metadata YAML · Table and metric metadata used by the e-commerce question-answering project.
实战项目-电商问数/yaml
Ops & workflow
Repository hygiene, environment setup, and contribution workflow files.
- Env config · Local environment template and Python project settings for running examples.
.env-example - Dev workflow · Contribution guidance and commit-message validation for maintaining the knowledge base.
CONTRIBUTING.md
Connections 27
- Site shell → Sidebar nav: navigates · The static site is organized through the sidebar navigation.
- Site shell → Site plugins: extends with · Browser-side enhancements are loaded through the plugin layer.
- Sidebar nav → Fundamentals: routes to · Navigation exposes the foundational learning path.
- Sidebar nav → RAG path: routes to · Navigation exposes the RAG and deployment path.
- Sidebar nav → Platform agents: routes to · Navigation exposes platform-based agent tutorials.
- Sidebar nav → LangChain path: routes to · Navigation exposes the LangChain framework path.
- Sidebar nav → LangGraph path: routes to · Navigation exposes the LangGraph framework path.
- Sidebar nav → Skills & tools: routes to · Navigation exposes the skills and tools section.
- Fundamentals → LangChain path: leads into · Foundational concepts prepare readers for LangChain patterns.
- Fundamentals → LangGraph path: leads into · Foundational concepts prepare readers for graph-based agents.
- LangChain path → LangChain examples: anchors · The framework curriculum is reinforced by the LangChain code suite.
- LangGraph path → LangGraph examples: anchors · The framework curriculum is reinforced by the LangGraph code suite.
- Platform agents → Coze&Dify cases: anchors · Platform tutorials are backed by workflow cases and artifacts.
- LangChain examples → Sample files: consumes · RAG and document-loading demos use bundled sample files.
- LangChain examples → Env config: depends on · Examples rely on local environment and Python setup.
- LangGraph examples → Env config: depends on · Graph examples rely on local environment and Python setup.
- LangGraph examples → Metadata YAML: mirrors · Project-style metadata and persistence patterns inform the example flow.
- 电商问数 → Metadata YAML: uses · The e-commerce track builds its metadata knowledge base from YAML artifacts.
- 电商问数 → LangGraph examples: builds on · The project architecture is taught using LangGraph-style components and flows.
- 深度研搜 → LangGraph examples: builds on · The deep research track follows multi-agent and graph orchestration patterns.
- Coze&Dify cases → Images: illustrates with · Case studies rely on screenshots and diagrams to explain workflows.
- LangChain examples → Images: illustrates with · Framework lessons are accompanied by explanatory visuals.
- LangGraph examples → Images: illustrates with · Graph lessons are accompanied by explanatory visuals.
- 电商问数 → Images: illustrates with · The project walkthrough uses diagrams and screenshots.
- 深度研搜 → Images: illustrates with · The project walkthrough uses diagrams and screenshots.
- Dev workflow → Site shell: maintains · Repository hygiene supports the documentation site and content updates.
- Env config → Coze&Dify cases: configures · Local environment setup supports running and reproducing examples.