This repository contains code for the O'Reilly Live Online Training for AI Agents A-Z
This course provides a comprehensive guide to understanding, implementing, and managing AI agents both at the prototype stage and in production. Attendees will start with foundational concepts and progressively delve into more advanced topics, including various frameworks like CrewAI, LangChain, and AutoGen as well as building agents from scratch using powerful prompt engineering techniques. The course emphasizes practical application, guiding participants through hands-on exercises to implement and deploy AI agents, evaluate their performance, and iterate on their designs. We will go over key aspects like cost projections, open versus closed source options, and best practices are thoroughly covered to equip attendees with the knowledge to make informed decisions in their AI projects.
At the time of writing, we need a Python virtual environment with Python 3.11.
python3.11 --version
python3.11 -m venv .venv
This creates a .venv
folder in your current directory.
macOS/Linux:
source .venv/bin/activate
Windows:
.venvScriptsactivate
You should see (.venv)
in your terminal prompt.
python --version
pip install -r requirements.txt
deactivate
If you don’t have Python 3.11, follow the steps below for your OS.
brew install [email protected]
sudo apt update
sudo apt install python3.11 python3.11-venv
python3.11 --version
In the activated environment, run
python3 -m jupyter notebook
Using 3rd party agent frameworks
Intro to CrewAI - An introductory notebook for CrewAI
Intro to OpenAI Swarm - An introductory notebook for OpenAI's Swarm
Intro to LangGraph - An introductory notebook for LangGraph
Evaluating Agents
Evaluating Agent Output with Rubrics - Exploring a rubric prompt to evaluate generative output. This notebook also notes positional biases when choosing between agent responses.
Evaluating Tool Selection - Calculating the accuracy of tool selection between different LLMs and quantifying the positional bias present in auto-regressive LLMs
Building our own agents
First Steps with our own Agent - Working towards building our own agent framework
See Squad Goals for a very simple example of my own agent framework
Modern Agent Paradigms
Plan & Execute Agents - Plan & Execute Agents use a planner to create multi-step plans with an LLM and an executor to complete each step by invoking tools.
Reflection Agents - Reflection Agents combine a generator to perform tasks and a reflector to provide feedback and guide improvements.
Sinan Ozdemir is the Founder and CTO of LoopGenius where he uses State of the art AI to help people run digital ads on Meta, Google, and more. Sinan is a former lecturer of Data Science at Johns Hopkins University and the author of multiple textbooks on data science and machine learning. Additionally, he is the founder of the recently acquired Kylie.ai, an enterprise-grade conversational AI platform with RPA capabilities. He holds a master’s degree in Pure Mathematics from Johns Hopkins University and is based in San Francisco, CA.