Pydantic AI
Open source Python framework for typed AI agents with validation and durable runs
- Tool type
- Open source Python agent framework
- Made for
- Python developers building AI agents
- Runs on
- Python applications
- Runs inside the developer's own Python application and infrastructure, optionally on a durable execution engine.
What it does
Pydantic AI is an open source Python framework under the MIT license for building AI agents. Developers define agents with typed tools, structured outputs, and output validators. Validation errors are sent back to the model so it can retry within a set budget, and the result is a validated Python object the application can use directly. Agents run against model providers the developer chooses, including OpenAI, Anthropic, Google, Bedrock, Mistral, Groq, and Ollama.
The framework supports multi-step agents, including long-running research or coding work. Pydantic AI Harness adds a workspace, planning, subagents, and cross-session memory through composable capabilities such as Coder and Researcher. Durable execution engines such as Temporal, DBOS, Prefect, and Restate can persist progress and resume after interruptions or approvals. Realtime voice sessions reuse the same tools and dependencies, and optional Logfire integration adds OpenTelemetry-based tracing.
It suits Python developers building production agents who want typed contracts and explicit control. Install with uv add pydantic-ai. The framework is free to use, while model providers and hosting are billed separately. Durable execution requires a chosen engine and its infrastructure, since a standard in-memory agent run does not persist itself. Logfire is a separate product with its own pricing.
What it can do
- Define agents with typed tools and structured outputs validated by Pydantic
- Retry model output automatically through output validators and ModelRetry
- Build multi-step coding and research agents with Pydantic AI Harness capabilities
- Persist and resume long-running agent workflows on a supported durable execution engine
- Run realtime voice sessions that reuse agent tools, dependencies, and message history
- Emit OpenTelemetry traces of agent runs, model requests, and tool calls
Works with
- OpenAI
- Anthropic
- Google Gemini
- Amazon Bedrock
- Mistral
- Groq
- Ollama
- Temporal
- DBOS
- Prefect
Before you choose
- Durable execution only persists progress when run on a supported engine such as Temporal, DBOS, or Prefect; a plain in-memory run does not.
- Pydantic AI itself is free, but model provider usage and hosting are billed by those services.
- Logfire pricing applies only to Logfire, not to Pydantic AI.
Listed under
Get started
Install the package and follow the getting-started guide; API keys for chosen model providers are required.
- Install the framework with uv add pydantic-ai, or pip install pydantic-ai.
- Set the API key for your chosen model provider, for example OPENAI_API_KEY, in your environment.
- Optionally install pydantic-ai-slim[logfire] and run logfire auth and logfire projects new to enable tracing.
Plans and prices
Pydantic AI and Harness are free under the MIT license. Model providers and hosting are paid separately. Logfire and AI Gateway are optional products with separate prices.
Pydantic AI is free to use. See their pricing page ↗
Sources for this overview
Product pages, documentation, and pricing checked 29 Oct 2026. Each source supports part of the overview; availability and prices can change.
Ratings and reviews
No ratings for Pydantic AI yet.
What’s changed
Free accountSignals
Free accountData and security
Free accountCompare with similar tools
Free accountWhere this comes from
How we research- Company website
- pydantic.dev: product, pricing and policy pages
- YC directory mirror
- Batch and company name
- Social accounts
- Accounts the company links, and its posts on X
- Human review
- Checked by a person
- knowledge_base
Last checked 29 Oct 2026. Every field keeps its source and date; unknown means we couldn’t confirm it.