Pydantic AI v2.0 shipped after seven beta releases, and it brings a fundamental rethinking of how Python agent frameworks should work. The core idea: capabilities, not agents, are the right unit of composition.

A capability bundles an agent's tools, hooks, instructions, and model settings into a single composable unit. You define what the agent can do, not what the agent is. This solves the problem that has plagued every agent framework: agents are too big, too monolithic, and too hard to reuse. Capabilities are small, composable, and portable. You can mix them across agents, override them in specific contexts, and test them in isolation.

The harness-first design means Pydantic AI v2 prioritizes the infrastructure that runs agents over the abstraction of what agents are. This is the right call. Most production agent failures come from runtime problems like tool call timeouts, context window overflows, malformed model outputs, and MCP server disconnects. A framework that handles these problems at the harness level, before the agent logic even sees them, produces more reliable systems than one that leaves error handling to each agent's prompt.

The release includes support for Gemini embedding model 2, AG-UI protocol integration with interrupt mapping to DeferredTools, XAI max turns configuration, and dozens of bug fixes across model providers. The model support matrix covers OpenAI, Anthropic, Google, Groq, Cerebras, Cohere, Mistral, and Bedrock. Thirteen new contributors made their first contributions in this release.

The upgrade path from v1 involves a migration guide with breaking changes documented. The v1 agent abstraction still works but is deprecated in favor of capabilities. Teams running v1 in production should plan their migration around the capability composition model rather than doing a straight port.

MIT licensed, 18K GitHub stars, and the code is at github.com/pydantic/pydantic-ai. Install with uv add pydantic-ai.

The shift from agents to capabilities mirrors what happened in web frameworks when they moved from monolithic controllers to composable middleware. The agent abstraction was a useful starting point, but composition at the capability level is where production systems need to go. Pydantic AI v2 gets there first among Python frameworks.