Back to directory

The Architecture of AI Agents and LLM Systems

A free, openly licensed engineering book and companion course on building and running large language model systems, covering tokenization, serving and fine-tuning models rather than only calling a hosted API.

The Architecture of AI Agents and LLM Systems

The book is organized as a pattern language, with eight parts, twenty-six chapters and five appendices covering roughly 258 printed pages, plus a hands-on companion course. Each significant pattern follows a fixed template covering its context, problem, forces, solution, mechanics, a worked example, the resulting context, when to use it or not, related patterns and sources.

Its stated aim is to move engineers from depending entirely on a hosted model API toward understanding how attention scales, what a KV-cache costs, when retrieval beats fine-tuning, how to serve an open model on their own hardware, and what an evaluation suite needs to prove before a release ships. It is written in English and Russian editions, released under a share-alike license, with a dedicated part of the book devoted to fine-tuning, serving and pre-training models directly.

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.