A collection of 28 code-first tutorials for taking GenAI agents from prototype to production, covering memory, RAG, deployment, security and observability.
Nicolepcx/ai-agents-the-definitive-guide
Companion code repository for the book AI Agents: The Definitive Guide, with Jupyter notebooks covering agent patterns, tooling, evaluation, memory, and security.
- Stars
- 2,761
- Forks
- 538
- Open issues
- 0
- Last commit
- 3 months ago
What is it?
This repository holds the example code for the O'Reilly book AI Agents: The Definitive Guide. The code is organized into twelve chapter folders, each containing Jupyter notebooks that can be opened and run directly in Google Colab. Topics include chain-of-thought, tree-of-thought, ReAct, human-in-the-loop workflows, hierarchical agent teams, swarms, and reinforcement-style training with ART and RULER.
Later chapters move toward production concerns. Notebooks cover MCP and A2A integrations with LangGraph, sandboxed tool execution with E2B, programmatic tool calling, inference backends and model fallback, an evaluation harness, external evaluation pipelines with Langfuse and LangSmith, agent memory topologies, cost estimation by topology, and threat modeling with LlamaFirewall and OWASP's agentic security list.
The notebooks are named by chapter and topic, and a shared utils folder holds helper classes and functions used across them.
Key features
- 01Notebooks cover agent patterns such as ReAct, tree-of-thought, and multi-agent swarms.
- 02Each notebook has a Colab badge for running without local setup.
- 03Covers MCP and A2A integrations built on LangGraph.
- 04Includes evaluation harnesses and integrations with Langfuse and LangSmith.
- 05Provides examples for agent memory, cost estimation, and threat modeling.
Use cases
- Following along with the book's chapters while experimenting with agent code.
- Learning how to build and evaluate LangGraph-based agents.
- Exploring tool governance and sandboxed execution for agents.
Quick start
- 1
Open a notebook in Google Colab using the badge
- 2
Open the Chapter 1 code examples notebook in Colab
https://colab.research.google.com/github/Nicolepcx/ai-agents-the-definitive-guide/blob/main/CH01/ch01_code_examples.ipynb
Things to know
- The repository is a companion to a book and is organized as Jupyter notebooks rather than a reusable library.
- No license is specified in the repository metadata.
Topics
FAQ
- What is ai-agents-the-definitive-guide?
- Companion code repository for the book AI Agents: The Definitive Guide, with Jupyter notebooks covering agent patterns, tooling, evaluation, memory, and security. This repository holds the example code for the O'Reilly book AI Agents: The Definitive Guide. The code is organized into twelve chapter folders, each containing Jupyter notebooks that can be opened and run directly in Google Colab. Topics include chain-of-thought, tree-of-thought, ReAct, human-in-the-loop workflows, hierarchical agent teams, swarms, and reinforcement-style training with ART and RULER.
- Is ai-agents-the-definitive-guide free to use? What license does it have?
- ai-agents-the-definitive-guide has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
- Is ai-agents-the-definitive-guide still maintained?
- Updated within 6 months. The last commit to ai-agents-the-definitive-guide was on Aug 1, 2026.
- What can I use ai-agents-the-definitive-guide for?
- Following along with the book's chapters while experimenting with agent code. Learning how to build and evaluate LangGraph-based agents. Exploring tool governance and sandboxed execution for agents.
- How do I install ai-agents-the-definitive-guide?
- Open a notebook in Google Colab using the badge Open the Chapter 1 code examples notebook in Colab: https://colab.research.google.com/github/Nicolepcx/ai-agents-the-definitive-guide/blob/main/CH01/ch01_code_examples.ipynb
- Where can I get ai-agents-the-definitive-guide?
- The source code and installation instructions are on GitHub: https://github.com/Nicolepcx/ai-agents-the-definitive-guide
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A collection of 50+ runnable Jupyter notebook tutorials covering GenAI agent techniques, from simple chatbots to multi-agent systems.
A memory layer for AI agents and apps that stores and retrieves user, session, and agent context across conversations.
A curated hub of generative AI learning courses, research paper roundups, interview prep materials, and code notebooks, organized by journey and skill level.
Agent memory system that stores, recalls and reflects on memories so AI agents learn over time instead of only replaying chat history.
Code-first Python framework from Google for building, evaluating, and deploying AI agents, optimized for Gemini but model-agnostic.