Contents
Map

16 · Agent Frameworks

Overview

View as:

16 - Agent Frameworks

Frameworks package the agent loop, tool schemas, state, approvals, multi-agent wiring and tracing so you don't rebuild them for every project - and they hide those mechanics, which is why this module comes after you built the loop by hand. You learn what each major framework is built around, how to choose one (or none), and build the same agent in seven of them.

Learning objectives 8-10 hours (notes + lab)
By the end of this module you will be able to:
  • Explain what an agent framework adds to a raw model API loop and what it hides, and place frameworks on the layer map
  • Compare LangChain/LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, CrewAI, Microsoft Agent Framework and PydanticAI by abstraction, state, human-in-the-loop, durability and model neutrality
  • Implement human approval and resumable runs in each framework's native style
  • Choose a framework for a project with a written rationale backed by measurements
Prerequisites

Where This Module Fits

flowchart LR
    C["01 Choosing a<br/>framework"] --> G["02 LangChain /<br/>LangGraph"]
    C --> O["03 OpenAI<br/>Agents SDK"]
    C --> CL["04 Claude<br/>Agent SDK"]
    C --> A["05 Google ADK"]
    C --> CR["06 CrewAI"]
    C --> M["07 Microsoft Agent<br/>Framework"]
    C --> P["08 PydanticAI"]
    G & O & CL & A & CR & M & P -.-> LAB["🧪 Lab: one agent,<br/>many frameworks"]

    style C fill:#e8e2d9,stroke:#ccc4b8
    style LAB fill:#dde4dc,stroke:#b0c4b0

Chapters 2-8 are independent: read chapter 1, then the frameworks you are considering. Running agents in production - durable execution, security, observability, cost - is Production Agents.

Chapter Map

#ChapterYou will learnTime
1Choosing an Agent FrameworkWhat frameworks add and hide, the layer map, comparison, decision guide, when to use none45 min
2LangChain and LangGraphcreate_agent and middleware; state graphs, checkpoints, interrupt()/Command, Store50 min
3OpenAI Agents SDKAgents, handoffs, guardrails, sessions, approvals with RunState, tracing40 min
4Claude Agent SDKThe Claude Code harness as a library: built-in tools, permissions, hooks, subagents, skills40 min
5Google ADKLlmAgent, Runner and sessions, graph Workflows, callbacks, confirmation, deploy45 min
6CrewAICrews of role-playing agents, processes, Flows with typed state40 min
7Microsoft Agent FrameworkAgents, graph workflows with checkpoints, orchestrations, migration from AutoGen/Semantic Kernel40 min
8PydanticAITyped agents, dependency injection, deferred tools, testing, durable execution35 min
9Q&A Review Bank31 questions across the module45 min

Code Lab

LabWhat you buildRuns on
One Agent, Many FrameworksThe Lab 13 shop agent with a refund approval step in LangChain, OpenAI Agents SDK, ADK, CrewAI, MAF and PydanticAI (graded on state), plus a Claude Agent SDK versionA local OpenAI-compatible model (laptop) or any hosted API; Claude Agent SDK needs an Anthropic key

Mini-Project

Choose a framework for a real agent at your work, with evidence:

  1. A task set of 20+ inputs with state-based or rubric checks.
  2. Two candidate frameworks, the tools shared as plain functions, one approval step in each.
  3. Task success (with confidence intervals), tokens, latency and lines of framework-specific code for each.
  4. A one-page decision covering deployment, durability, observability, lock-in and upgrade risk - not just the numbers.

Review

  • Q&A Review Bank - consolidated questions for this module
  • Module quiz - every Check Yourself question in this module, in course order

Previous: 15 - Agent Patterns & Multi-Agent · Next: 17 - Production Agents

Section Appendix

Summary & Key Terms - a quick recap of this section and its essential vocabulary.

⚡AI-assisted content - always verify, always explore multiple perspectives·