Implementing AI Agents in Python
Published by O'Reilly Media, Inc.
Using frameworks, MCP, and RAG for agentic AI
Course outcomes
- Understand what agents are, why they are useful, and how they work
- Describe and explain the different implementation patterns that agents can use
- Assess, choose, and apply strategies for multiplying agents’ usefulness
- Decide between the key frameworks available for implementing agents
- Code simple agents with Python and agent frameworks
- How to test and secure agents
Course description
AI agents are the next evolution in utilizing AI models, providing a key means for AI models to interact with the outside world and not just rely on their training. AI agents bring the benefits of AI into real-world processes by allowing the AI to utilize external processes to gather information, plan a solution, and reach conclusions that are not possible with just prompting. In short, agents can reason to arrive at solutions.
Join expert Brent Laster to learn agents from the ground up. You’ll understand what they are, how they work, and how to apply them. But you’ll also learn about how to implement agents in Python by using some of the current, innovative frameworks like LangChain, LlamaIndex, and Smolagents. And you’ll explore different strategies to make your agents even more useful including pairing them with RAG for working with your own data.
What you’ll learn and how you can apply it
- Learn the different frameworks and implementation methods for agents
- Learn strategies for multiplying agents’ usefulness with techniques such as multiple agents with different roles, adding RAG for accessing local content, etc.
- Learn about some of the key frameworks available for implementing agents
- Develop skills in implementing simple agents using Python and agent frameworks
- Learn how to test and secure agents
This live event is for you because...
- You’re a software developer, data scientist, or AI learner looking to understand AI agents.
- You want to extend the functionality of AI for automation, real-time data analysis, or research.
- You want to understand the differences between and uses of popular frameworks for creating agents.
- You want to understand how to reliably test and secure agent code.
Prerequisites
- A GitHub account for repository and Codespace access
- Basic understanding of AI models
- Working knowledge of GitHub
- Basic coding background (preferably Python)
Recommended follow-up:
- Read “RAG and Agents” (chapter 6 in AI Engineering)
- Take Getting Started with LLM Agents Using LangChain (live online course with Lucas Soares)
- Read RAG with Python Cookbook (book)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Introduction (20 minutes)
- Presentation: About the workhshop; Environment setup; Codespace setup and access; Hugging Face access
How do agents work? (45 minutes)
- Presentation: What are agents and how do they work? Key concepts and frameworks
- Hands-on exercise: Creating a simple agent
- Group discussion: What are you most interested in using agents for?
- Break
- Q&A
Overview of Model Context Protocol (MCP) (35 minutes)
- Presentation: The what, why, and how of MCP.
- Hands-on exercise: Exploring MCP
- Q&A
Leveraging Coding Agents and Memory (35 minutes)
- Presentation: Exploring the use of memory in agents; Agents that run model-generated code; The Hugging Face SmolAgents framework
- Hands-on exercise: Leveraging Coding Agents and Memory (implementation in SmolAgents)
- Break
- Q&A
Agents and Retrieval Augmented Generation (RAG) (35 minutes)
- Presentation: The what, why, and how of RAG; Agentic RAG
- Hands-on exercise: Using RAG with Agents
- Q&A
Multi-agent implementations (30 minutes)
- Presentation: How multiple agents work together; Managing agent collaboration; The CrewAI framework
- Hands-on exercises: Working with Multiple Agents (implementation in CrewAI)
- Break
- Q&A
Agent Design Patterns (30 minutes)
- Presentation: Exploring different types of agent designs and patterns; The AutoGen framework
- Hands-on exercise: Building Agents with the Reflective Pattern (implementation in AutoGen)
- Q&A
Testing Agents (30 minutes)
- Presentation: Challenges; Layered testing; The Testing Cycle
- Hands-on exercise: Testing Agent Reasoning and Tool Selection
Securing Agents (30 minutes)
- Presentation: Security threats; Prompt injections; Defense-in-depth; Sandboxing; Least Privilege
- Hands-on exercise: Securing Agents Against Manipulation
Additional Topics and Considerations (35 minutes)
- Presentation: Tips for building good agents; Agent challenges, concerns, and strategies; The future of agents
- Q&A
- Closing
Your Instructor
Brent Laster
Brent Laster is an experienced technology leader and a global trainer, speaker and author. He’s also the founder and president of Tech Skills Transformations, LLC, a company dedicated to making technology understandable and usable. Throughout his career in software development and management, Brent has always made time to learn and develop both technical and leadership skills and share them with others. He believes that regardless of the topic or technology, there’s no substitute for the excitement and sense of potential that come from providing others with the knowledge they need to accomplish their goals.