ai-agents-the-definitive-guide README

The project's README from github.com/Nicolepcx/ai-agents-the-definitive-guide. As one markdown file: README.md.

⭐ If you find this repository helpful, please consider giving it a ⭐ here on GitHub (click the star button in the top right corner) It's a quick way to show support for this openly available code. ⭐

OReilly_logo_rgb.png

AI Agents - The definitive Guide

This is the corresponding code for the book AI Agents - The Definitive Guide the book can be found here and on Amazon. The book has an accompanying website with quizzes and additional material, as well as a Discord channel.

TOC

Instructions and Navigation

All of the code is organized into folders. Each folder starts with CH followed by the chapter number. For example, CH01. The notebooks are then organized as follows: ch01_attention_mechanism_variations.ipynb, where ch01 indicates the chapter and attention_mechanism_variations what is done in the notebook.

Repo structure

├── LICENSE
├── README.md             <- The top-level README for developers using this project.
├── CH01                  <- Per chapter folder with Jupyter notebooks.
    ├── [name].ipynb      <- Jupyter notebooks with naming as mentioned above.
├── CH02                  <- Per chapter folder with Jupyter notebooks.
...                       <- Same structure for all chapters.
├── utils                 <- Custom classes and functions and utility functions.
├── resources             <- Some miscellaneous resources.

Running the Notebooks

Every notebook can be opened and run on Google Colab directly from the links below. Just click the Open In Colab badge next to the notebook you want to run.

Chapter 1 — From LLMs to Agents: The Foundational Blueprint

Notebook Colab
Code Examples Open In Colab

Chapter 2 — Architectures and Patterns: Planning, Reactivity, and Multi-Agent-Systems

Notebook Colab
Chain-of-Thought (CoT) Open In Colab
Tree-of-Thought (ToT) Open In Colab
ReAct Open In Colab
Human-in-the-Loop (HITL) Open In Colab
Hierarchical Agent Teams Open In Colab
Swarms Open In Colab

Chapter 3 — Advanced Planning, Reasoning, and Scalable Execution in Agents

Notebook Colab
ART + RULER Open In Colab
RULER Cat Poems Open In Colab
TreeQuest (AB-MCTS) Open In Colab

Chapter 4 — Models Behind the Agents: Capabilities and Optimization

Notebook Colab
Supervisor Agent Team Open In Colab

Chapter 5 — From Prototypes to Production: Contracts, Tools, and Reliable Execution

Notebook Colab
Deep Agents Open In Colab
MCP with LangGraph Open In Colab
Product Reliability Rule Open In Colab
Pydantic Agent Consistency Open In Colab

Chapter 6 — Secure Execution and Tool Governance

Notebook Colab
A2A + MCP Governed Open In Colab
MCP Server with Composio Open In Colab
LangGraph + E2B Sandbox Open In Colab
Programmatic Tool Calling (Monty) Open In Colab

Chapter 7 — Deploying Agents in Real Products

Notebook Colab
Hardening Backbone Open In Colab
Inference Backends Open In Colab
Model Fallback Open In Colab

Chapter 8 — Foundational Evaluation and Operational Observation of Agentic Systems

Notebook Colab
OWASP ASI 2026 Open In Colab
Evaluation Harness Open In Colab

Chapter 9 — Customized and Advanced Evaluation of Agentic Systems

Notebook Colab
AgentVista Open In Colab
External Evaluation Pipelines (Langfuse) Open In Colab
External Evaluation Pipelines (LangSmith) Open In Colab
RULER Trace Answer Ranking (LangSmith) Open In Colab

Chapter 10 — Agent Memory: How Persistence Turns Agents Into Evolving Systems

Notebook Colab
Agent Memory with LangGraph Open In Colab
Memory vs. No Memory Open In Colab
Memory Topologies Open In Colab

Chapter 11 — From Compute to Cost: Designing Efficient Agentic Systems

Notebook Colab
Agent Cost Estimator by Topology Open In Colab
Memoizing Swarm Research Engine Open In Colab
Memory Footprint, Throughput & GPU Requirements Open In Colab

Chapter 12 — Threat Modeling for AI Agents

Notebook Colab
LlamaFirewall Open In Colab

ai-agents-the-definitive-guide (Nicolepcx/ai-agents-the-definitive-guide)

Searching Database…

Что это такое?Это репозиторий с кодом, который сопровождает книгу 'AI Agents - The Definitive Guide': набор запускаемых Jupyter-ноутбуков, которые проходят по каждой главе — от базовых паттернов агентов до развертывания в продакшене и моделирования угроз.
Это библиотека, которую я устанавливаю в проект, или что-то другое?Ни то, ни другое — это коллекция Jupyter-ноутбуков, по одной папке на каждую главу книги (CH01-CH12), с названиями вроде ch01attentionmechanismvariations.ipynb. Их запускают, а не устанавливают.
Как мне на самом деле запустить один из этих ноутбуков?У каждого ноутбука в README есть значок 'Open In Colab' — нажмите на него, и ноутбук откроется и запустится прямо на Google Colab, так что ничего настраивать локально не нужно.
Мне нужно уже строить агентов, чтобы разобраться в материале?Материал начинается с основ — в главе 1 путь от LLM к агентам — и доходит до развертывания в продакшене, оценки и моделирования угроз, поэтому он рассчитан на разработчиков, которые превращают агентов из прототипов в реальные системы.
К книге прилагается что-то, кроме кода?Да. У книги есть сайт с викторинами и дополнительными материалами, а также Discord-канал для читателей.
Какие фреймворки и инструменты используют ноутбуки?LangChain и LangGraph встречаются по всему тексту, а ноутбуки также затрагивают Pydantic, MCP, Composio, E2B-песочницы, Monty для программного вызова инструментов, Langfuse, LangSmith и LlamaFirewall.
С чего начать тому, кто вообще новичок в агентах?С главы 1, 'From LLMs to Agents: The Foundational Blueprint', затем с ноутбуков главы 2 (CoT, ToT, ReAct, HITL, команды агентов, рои) — главы выстраиваются по порядку чтения.
Creator
Nicolepcx
Size
1.8 MB
Stars
2.8K
Updated
CommitAug 01
Age
1y
Commits · 90 Days