Agent framework - verified
Pydantic AI: features, install and latest version
Pydantic AI is an AI agent framework maintained by Pydantic. As its docs describe it: Pydantic AI is a Python agent framework from the Pydantic team that provides a typed agent loop with structured outputs, typed tools and dependency injection, and lets the model be swapped across many providers with a string. It supports Python. License: MIT. Latest release: Python package pydantic-ai 2.57.0 (October 16, 2026).
Homepage - Source on GitHub - License - In our tools directory
- Languages
- 1
- Latest Python
- 2.57.0
- Released
- 2026-10-16
- Features documented
- 10 of 10
Install
Copied verbatim from the page linked under each command.
Python
pip install pydantic-aiSource: pydantic.dev/docs/ai/overview
uv add pydantic-aiSource: pydantic.dev/docs/ai/overview
Quickstart
The first example from the official docs, unchanged. It may need an API key for the model provider it calls.
from typing import Literal
from pydantic import BaseModel, Field
from pydantic_ai import Agent, RunContext
class Sentiment(BaseModel):
label: Literal['positive', 'negative', 'neutral']
score: float = Field(ge=-1, le=1)
agent = Agent('openai:gpt-6.1-sol', output_type=Sentiment)
@agent.tool
def recent_reviews(ctx: RunContext, product: str) -> list[str]:
"""Fetch recent review snippets for a product."""
return ['The new release fixed everything I complained about!']
result = agent.run_sync('How are people feeling about the Extract app?')
print(result.output)
#> label='positive' score=0.9Source: pydantic.dev/docs/ai/overview
Features
What the Pydantic AI docs say it supports. Not stated means the docs do not say either way.
| Feature | Value | Source |
|---|---|---|
| MCP | Yes | pydantic.dev/docs/ai/overview |
| Multi-agent | Yes | pydantic.dev/docs/ai/overview |
| Durable execution | Yes | pydantic.dev/docs/ai/overview |
| Human in the loop | Yes | pydantic.dev/docs/ai/overview |
| Streaming | Yes | pydantic.dev/docs/ai/core-concepts/agent |
| Structured output | Yes | pydantic.dev/docs/ai/overview |
| Tracing | Yes | pydantic.dev/docs/ai/overview |
| Memory | Yes | pydantic.dev/docs/ai/harness/memory |
| Evals | Yes | pydantic.dev/docs/ai/overview |
| Model-agnostic | Yes | pydantic.dev/docs/ai/overview |
| Languages | Python | See sources below |
| License | MIT | github.com/pydantic/pydantic-ai/blob/main/LICENSE |
| Latest Python release | pydantic-ai 2.57.0October 16, 2026 | pypi.org/project/pydantic-ai |
Pydantic AI on Developers Digest
Compare Pydantic AI
FAQ
Does Pydantic AI support MCP?
Which languages does Pydantic AI support?
Python. Published packages: pydantic-ai (Python).
How do I install Pydantic AI?
For Python: "pip install pydantic-ai", as shown at https://pydantic.dev/docs/ai/overview/. This page lists 2 install commands, each copied from the linked source.
What is the latest version of Pydantic AI?
As of October 18, 2026: Python package pydantic-ai 2.57.0 (October 16, 2026), https://pypi.org/project/pydantic-ai/.
What license is Pydantic AI released under?
MIT. The license is at https://github.com/pydantic/pydantic-ai/blob/main/LICENSE.
Does Pydantic AI support durable execution?
Does Pydantic AI support human-in-the-loop?
Is Pydantic AI model-agnostic?
Which features does Pydantic AI document?
10 of the 10 tracked here: MCP, Multi-agent, Durable execution, Human in the loop, Streaming, Structured output, Tracing, Memory, Evals and Model-agnostic.
Sources
Last verified from the pages below.
- Docs overview - pydantic.dev
- Agents (running and streaming) - pydantic.dev
- Harness memory - pydantic.dev
- Durable execution - pydantic.dev
- Human-in-the-loop tool approval - pydantic.dev
- Pydantic Evals - pydantic.dev
- GitHub README - github.com
- PyPI package - pypi.org
Newsletter
Agent frameworks, every week
One email per week. Framework releases, new agent tooling and what they mean for what you build.