ai/courses

Free course

Free PydanticAI course: build AI agents.

Go from your first agent to a production deployment: tools, multi-agent patterns, memory, testing, and deployment with FastAPI, Redis, and Docker.

Start lesson 1

Python 3.12+ · PydanticAI 2.66.0. Download the examples under the MIT license. Reading is free; live model API calls may incur provider charges.

Lessons
8
Time
7 hours
Level
Beginner to Intermediate
Price
Free, no signup

02

What you will write.

Lesson 1 starts here: an agent with one tool, in about fifteen lines.

first_agent.py
from pydantic_ai import Agent

agent = Agent(
    'openai:gpt-5.4-mini',
    instructions='You are a helpful assistant.',
)

@agent.tool_plain
def get_weather(city: str) -> str:
    """Return demo weather data for a city."""
    return f"Sunny, 25°C in {city}"

result = agent.run_sync('What is the weather in Dubai?')
print(result.output)

03

Go further.

  1. 01LangChain vs LangGraph: Which One Should You Use?Same team, different layers. Side-by-side code for the same agent, the real differences in memory and human-in-the-loop, and a clear rule for when to use each.Comparison
  2. 02AI Agent Frameworks: Which One Should You Use in 2026?Eight frameworks that matter, checked against their official docs: language, abstraction level, license, and a "pick this if" rule for each. Plus hello-world code so you can feel the API before you commit.Guide
  3. 03Pydantic AI vs LangChain: Which Agent Framework Should You Use?The same agent in both frameworks, structured output and testing side by side, a dedicated section on Pydantic AI vs LangGraph, and a fair verdict on when each one wins.Comparison
  4. 04How to Build an MCP Server in Python (Step by Step)A complete, working MCP server with the official Python SDK: one file with tools, a resource and a prompt. Then test it in MCP Inspector, connect it to Claude Code and Claude Desktop, and call it from a PydanticAI agent.Guide
  5. 05LangGraph vs CrewAI: Which Multi-Agent Framework Should You Use?The same two-agent research → write pipeline in both frameworks, how state, persistence, and human approval differ, a quick CrewAI tutorial, and what happened to AutoGen.Comparison
  6. 06The Best Agentic AI Courses for Developers (2026)Sixteen AI agent courses for people who want to build agents, not just talk about them. Free options first, with certificate details for each one, picks for each framework, and an order to take them in.Best courses
  7. 07LangGraph Tutorial: Build a Stateful AI Agent in Python, Step by StepOne support agent, built up in six steps with LangGraph 1.x: a minimal graph, a hand-written ReAct loop with tools, memory with a checkpointer, human approval with interrupt(), and streaming. Then the prebuilt shortcut, Studio, and when LangGraph is the wrong tool.Guide