---
title: "Pydantic AI: features, version and quickstart · DotsAgent"
description: "Pydantic AI by Pydantic: licence, latest version, MCP support, durable runs, human approval, tracing and evals, plus a quickstart to copy."
url: https://dotsagent.io/frameworks/pydantic-ai
---

Framework · Pydantic

# Pydantic AI at a glance

A Python agent framework from the Pydantic team, built around type hints, validated structured outputs and dependency injection. It stands out for durable execution on seven engines, from Temporal to Airflow, and ships Pydantic Evals alongside.

**Best for:**  Type-safe Python agents whose outputs must validate, with your pick of durable engine.

## Key facts

- **Maintainer**: Pydantic
- **Languages**: Python
- **Licence**: MIT
- **Latest version**: `2.52.0` · September 30, 2026
- **Repository**: [pydantic/pydantic-ai](https://github.com/pydantic/pydantic-ai) · 20,308 stars
- **Hosted option**: None

## Quickstart

Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.

`Install`

```
pip install pydantic-ai
```

Needs OPENAI_API_KEY (or use Agent('test') offline)

`Python`

```
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-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.9
```

[Quickstart source](https://ai.pydantic.dev/)

## Features

| Any model | — | Switching model is a string change; offline test model included |
| --- | --- | --- |
| MCP client | — | Added as an MCP capability on the agent |
| MCP server | — | — |
| Multi-agent | — | SubAgents capability, and typed control flow with Pydantic Graph |
| Durable runs | — | Temporal, DBOS, Prefect, Restate, AWS Lambda, Kitaru or Airflow |
| Human approval | — | Approval works under durable execution too |
| Tracing | — | OpenTelemetry-native; one line sends traces to Logfire |
| Evals | — | Pydantic Evals, a separate package from the same project |

## Recent changes

- Moved to a 2.x line; 1.x still gets maintenance releases, such as v1.107.7 on 30 September 2026.
- The new pydantic-ai-harness package adds Coder, Researcher and SubAgents.
- Added realtime voice, image generation and embeddings.
- The docs moved to pydantic.dev/docs/ai/.

## Alternatives in the same language

- [OpenAI Agents SDK](https://dotsagent.io/frameworks/openai-agents-python)

- [Claude Agent SDK](https://dotsagent.io/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/frameworks/google-adk)

- [Microsoft Agent Framework](https://dotsagent.io/frameworks/microsoft-agent-framework)

- [LangGraph](https://dotsagent.io/frameworks/langgraph)

- [CrewAI](https://dotsagent.io/frameworks/crewai)

## Sources

1. [ai.pydantic.dev](https://ai.pydantic.dev/)/
2. [github.com](https://github.com/pydantic/pydantic-ai)/pydantic/pydantic-ai
3. [pypi.org](https://pypi.org/pypi/pydantic-ai/json)/pypi/pydantic-ai/json
4. [api.github.com](https://api.github.com/repos/pydantic/pydantic-ai/releases)/repos/pydantic/pydantic-ai/releases

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
