Back to directory

AI Agents from Beginner to Practice

A Chinese-language tutorial that builds an AI agent from scratch in plain Python, covering the agent loop, tools, memory and planning, before introducing frameworks such as LangChain, LangGraph and Dify.

AI Agents from Beginner to Practice

The tutorial is organized into four parts: understanding what an agent is and its core components, the language model, its tools, its memory and its planning; hand-writing a first agent with a working ReAct loop and then adding memory, tool use and planning to it; agent behavior engineering followed by chapters on the LangChain, LangGraph and Dify frameworks; and a final practical part.

That practical part builds a retrieval-augmented-generation knowledge-base agent, a multi-agent collaboration system, and a capstone 'intelligent research assistant' project that combines everything covered earlier. Each chapter follows the same structure: a plain-language explanation of the concept, complete and annotated runnable code, a demonstration of the expected output, practice exercises, and notes on common mistakes and how to find them. It is licensed MIT.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.