Metadata-Version: 2.4
Name: illustrated-agents
Version: 0.1.0
Summary: The code for the book 'An Illustrated Guide to AI Agents'
Author: Maarten Grootendorst, Jay Alammar
License-Expression: MIT
Project-URL: Homepage, https://github.com/HandsOnLLM/An-Illustrated-Guide-To-AI-Agents
Project-URL: Repository, https://github.com/HandsOnLLM/An-Illustrated-Guide-To-AI-Agents
Project-URL: Issues, https://github.com/HandsOnLLM/An-Illustrated-Guide-To-AI-Agents/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Provides-Extra: terminal
Requires-Dist: rich>=14.3.2; extra == "terminal"
Provides-Extra: jupyter
Requires-Dist: jupyterlab>=4.1.5; extra == "jupyter"
Requires-Dist: ipywidgets>=8.1.8; extra == "jupyter"
Requires-Dist: pygments>=2.19.2; extra == "jupyter"
Requires-Dist: rich>=14.3.2; extra == "jupyter"
Requires-Dist: openai>=2.0.0; extra == "jupyter"
Requires-Dist: mcp>=1.26.0; extra == "jupyter"
Provides-Extra: all
Requires-Dist: illustrated-agents[jupyter,terminal]; extra == "all"

# An Illustrated Guide to AI Agents

<a href="https://www.linkedin.com/in/mgrootendorst/"><img src="https://img.shields.io/badge/Follow%20Maarten-blue.svg?logo=linkedin"></a>
<a href="https://www.linkedin.com/in/jalammar/"><img src="https://img.shields.io/badge/Follow%20Jay-blue.svg?logo=linkedin"></a>

Welcome! Here, you will find the code for the book [An Illustrated Guide to AI Agents](https://www.amazon.com/Hands-Large-Language-Models-Understanding/dp/1098150961) written by [Maarten Grootendorst](https://www.linkedin.com/in/mgrootendorst/) and [Jay Alammar](https://www.linkedin.com/in/jalammar/). In this repository, you will:<br> 

<p align="center"><b><i>"Build an Agent From Scratch!"</i></b></p>

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!

<a href=""><img src="https://learning.oreilly.com/covers/urn:orm:book:9798341662681/400w/" width="50%" ></a>

<br>

The book is available on:

* [Amazon](...)
* [Shroff Publishers (India)](...)
* [O'Reilly](https://learning.oreilly.com/library/view/an-illustrated-guide/9798341662681/)
* [Kindle](...)
* [Barnes and Noble](...)
* [Goodreads](...)

## 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](https://colab.research.google.com/assets/colab-badge.svg)](...)   |
| Chapter 2: Large Language Models  | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 3: Reasoning Large Language Models  |  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 4: Memory  | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 5: Tools  | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 6: Planning  | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 7: Evaluation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 8: Multi-Agent Collaboration  | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 9: Multimodal Understanding  | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |
| Chapter 10: Coding Agents  |  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](...)  |


> [!TIP]
> You can check the [setup](.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/tinyagents.png)

![images/diffs.png](images/diffs.png)

![images/annotated.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       = {}
}
```
