Back to directory

Learn AI Agents from Scratch

A bilingual, engineering-first online textbook covering LLM agent fundamentals, tool use, memory, planning, retrieval-augmented generation, multi-agent systems, agentic reinforcement learning, evaluation, security and deployment.

Learn AI Agents from Scratch

Learn AI Agents from Scratch is an open-source textbook and learning repository for building, evaluating, securing and deploying large-language-model agent systems, aimed at the gap between calling an LLM API and shipping a production agent. Rather than teaching isolated framework APIs, it builds one connected path from LLM fundamentals through tools, memory, planning, retrieval-augmented generation, context engineering, harness engineering, skills, agentic reinforcement learning, multi-agent systems, evaluation, security and deployment.

It has 23 chapters across foundations, core capabilities, framework practice, multi-agent systems, production engineering and capstone projects, maintained in parallel English and Chinese mdBook sources with more than 330 original diagrams and five interactive demos. Framework chapters cover LangChain, LangGraph, other agent frameworks and Claude Code, and capstone chapters walk through building a coding agent, a data agent and a multimodal agent.

The repository also includes a small runnable reference agent with tools, memory, security gates, evaluation, an MCP server, a FastAPI service and its own test suite.

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.