Building AI Agents with MCP, PydanticAI and OpenAI
Build an AI agent from first principles, implement RAG with FAQ data, compare agent frameworks, and expose tools via MCP for reuse across agents and IDEs.
Timestamps
Click any timestamp to jump to that moment in the video
Introduction to the workshop, agenda overview, and learning objectives
Setting up the development environment: Python, API keys configuration, and uv package manager
Understanding agents basics, tool demonstration, and planning the FAQ assistant project
Extracting data from Google Docs, converting to JSON, and indexing with MinSearch for search capabilities
Implementing function calling using OpenAI Responses API and building the agent control loop
Crafting effective system and developer prompts, implementing multi-search reasoning patterns
Building a testing workflow with a simple runner and interactive chat interface
Automatically generating tool schemas and adding write capabilities with add_entry tool
Refactoring tools into a class-based structure for better organization and maintainability
Comparing OpenAI Agents SDK and PydanticAI frameworks, switching to Anthropic Claude
Introduction to Model Context Protocol (MCP) and building an MCP server with search and add_entry tools
Understanding MCP protocol: handshake process, listing available tools, and calling tools
Integrating MCP tools into the agent and exploring HTTP transport for MCP communication
Connecting MCP server to Cursor IDE and using live FAQ context for coding assistance
Overview of the AI Engineering Buildcamp course and workshop summary
Core Tools
What You'll Learn
- Building an agent from first principles with raw OpenAI APIs
- Implementing function calling and agent loops
- Indexing and querying FAQ data for RAG
- Designing tools with schemas and docstrings
- Refactoring tools into classes
- Comparing agent frameworks (OpenAI Agents SDK vs PydanticAI)
- Switching between LLM providers
- Exposing tools via MCP for reuse across agents and IDEs
Expected Outcome
A working FAQ assistant agent that can search and update a knowledge base, run across multiple agent frameworks, and consume tools via an MCP server usable by other agents and development environments like Cursor