🚀 Pydantic AI V2 Beta 1 is here!
V2 leans into a harness-first design, with capabilities as a core primitive. A capability is a single, composable unit that bundles an agent's tools, lifecycle hooks, instructions, and model settings — so a whole extension (a memory system, a guardrail, a coding toolkit) can reach every layer of the agent through one concept you pass via capabilities=[...]. Pydantic AI stays a small core: some capabilities ship with it, more come from the first-party Pydantic AI Harness, and others are third-party or your own.
Many of V2's changes move configuration that used to be spread across Agent arguments onto that primitive, alongside the behavior changes V1's stability guarantee didn't allow.
How do I get it?
V2.0.0b1 is forked from v1.100.0 (out today), which (along with other recent versions) deprecates most of what V2 removes. The recommended path (full before → after in the Upgrade Guide):
- Upgrade to v1.100.0 and clear every deprecation warning — point a coding agent at them; this covers the bulk of the migration.
- Install the beta and review the behavior changes below.
uv add 'pydantic-ai==2.0.0b1'Behavior changes to review (these can't be surfaced by a deprecation warning)
- A bare
pydantic-aiinstall now ships fewer extras — add providers likebedrock,groq,mistralexplicitly. openai:model names now use the OpenAI Responses API; useopenai-chat:to stay on Chat Completions.WebSearch/WebFetchare native-only by default, andMCP(url=...)runs locally by default.- Default instrumentation is version 5, with aggregated token-usage span attributes.
capture_run_messages()now also captures partial messages from interrupted runs.- Function tools requested alongside a successful output tool now run by default (
end_strategy='graceful') instead of being skipped.
Most other removals were deprecated by v1.100.0; the Upgrade Guide has the complete list, split into changes covered vs. not covered by deprecation warnings.
It's a pre-release — stable V2.0 is expected within roughly two weeks — so pin the exact b version and expect occasional changes before then.
File issues or chat in Slack.
Full Changelog: v1.100.0...v2.0.0b1