Skip to main content

An Illustrated Guide to AI Agents

Welcome! Here, you will find the code for the book An Illustrated Guide to AI Agents written by Maarten Grootendorst and Jay Alammar. In this repository, you will:

"Build an Agent From Scratch!"

You will build your own Agentic Framework from the ground up in pure Python!

Through the visually educational nature of this book and with more than 300 custom made figures, learn the practical tools and concepts you need to use AI Agents today!


The book is available on:

Table of Contents - Build a TinyAgent from Scratch!

The code examples in this repo are used for you to start building a TinyAgent entirely from scratch, using nothing more than LLM calls. You will learn how to create your own Agent that has memory, tools, and autonomy!

All examples can be run in Google Colab for free using their T4 GPU. You have options for running everything either locally or on the cloud without any additional costs involved.

Chapter Notebook
Chapter 1: Introduction to AI Agents Open In Colab
Chapter 2: Large Language Models Open In Colab
Chapter 3: Reasoning Large Language Models Open In Colab
Chapter 4: Memory Open In Colab
Chapter 5: Tools Open In Colab
Chapter 6: Planning Open In Colab
Chapter 7: Evaluation Open In Colab
Chapter 8: Multi-Agent Collaboration Open In Colab
Chapter 9: Multimodal Understanding Open In Colab
Chapter 10: Coding Agents Open In Colab

[!TIP] You can check the setup folder for a quick-start guide to install all packages locally.

Reviews

TBA

A Unique Way of Learning

We wanted to do something special this time around and allow readers to Build an Agent From Scratch! However, we did not stop there and wanted the act of building the Agent to be a modular experience that enhances the learning experience. By iteratively adding components, one at a time, it becomes much more intuitive how an Agent actually works.

We decided to combine this with creative (if we say so ourselves) ways to explain what is happening and how each added component affects your TinyAgent!

images/diffs.png

images/diffs.png

images/annotated.png

Citation

Please consider citing the book if you consider it useful for your research:

@book{illustrated-agents-book,
  author       = {Maarten Grootendorst and Jay Alammar},
  title        = {An Illustrated Guide to AI Agents},
  publisher    = {O'Reilly},
  year         = {2026},
  isbn         = {},
  url          = {https://www.oreilly.com/library/view/an-illustrated-guide/9798341662681/},
  github       = {}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

illustrated_agents-0.1.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

illustrated_agents-0.1.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file illustrated_agents-0.1.0.tar.gz.

File metadata

  • Download URL: illustrated_agents-0.1.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for illustrated_agents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 816ee9f5a53c9f36ba3cbf6f553d8778241f54fb41f43cfed9ac8b7996ed2473
MD5 be96025c2194df8196f29d4b6c9740f7
BLAKE2b-256 368a66b31c9f62677cacd776d5e667b76ca34d223e70ad187c959c51c2b26f3b

See more details on using hashes here.

File details

Details for the file illustrated_agents-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for illustrated_agents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46e17c2e82ca6a52c0df7fc6a4a7b173405fb66e7e960e011c8370d57aa86389
MD5 aa49cc292b7b4e4a7a08a530cd410e36
BLAKE2b-256 5f98e51b9316a41c4e9c3efc46136119191c4db8ceb3216ad62e1777066474b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page