Back to directory

LLM Agents From Scratch

A companion code library for a Manning book that teaches how LLM agents and multi-agent systems work by building one from first principles, without relying on an existing framework.

LLM Agents From Scratch

LLM Agents From Scratch is the companion library for the book Build a Multi-Agent System, With MCP and A2A, available through Manning's Early Access Program. Rather than teaching an existing agent framework, the book has readers build their own, hand-rolled agent framework step by step, primarily for educational understanding rather than production use.

The first part covers building a first LLM agent, including working with tools and language models and writing the core agent class; the second part adds MCP tools, skills, memory, and human-in-the-loop review; and the third part assembles multi-agent systems, including interoperable systems that communicate over A2A. Capstone projects apply the material to larger examples, such as orchestrating parallel tool calls to estimate pi by Monte Carlo methods. The included notebooks default to running a 14-billion-parameter open model locally through Ollama, recommending at least 16 GB of RAM and a discrete GPU.

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.