Pydantic AI
Open-source typed Python SDK for building agents with any model, structured outputs, durable execution, realtime voice, and observability.
At a Glance
Pydantic AI and Pydantic AI Harness are open source under the MIT license. Model providers and hosting are paid separately by the user.
Engagement
Available On
Alternatives
Listed Oct 2026
About Pydantic AI
Pydantic AI is an open-source Python AI SDK from the Pydantic team (Pydantic Services Inc.), released under the MIT license. It provides a typed, extensible agent loop where models from many providers can be swapped with a string. The latest release listed on GitHub is v2.56.0, published 2026-10-13.
What It Is
Pydantic AI is a Python framework for building agents that return validated, typed results. You define an agent with an output type, tools, and injected dependencies. Tool arguments and structured outputs are validated, and validation errors are sent back to the model so it can retry. Image generation and embeddings ship in the same package, while Pydantic Graph (typed control flow) and Pydantic Evals (agent testing) are separate packages.
Pydantic AI Harness and capabilities
The companion Pydantic AI Harness package adds capabilities for long-running work: a workspace with file access and allowlisted shell, planning, subagents, cross-session memory, context compaction, tool output limits, and guardrails. Complete agents such as Coder and Researcher are composed from these capabilities, so they can be used whole or taken apart. Core capabilities include MCP and web search, and agents can also be defined through YAML/JSON specs.
Durable execution and interfaces
Agents can run on durable backends so work survives restarts and long waits, including human approval steps. Documented engines are Temporal, DBOS, Prefect, Restate, AWS Lambda, Kitaru, Airflow, Absurd, and pgtask. The same agent can run as a CLI, web chat, UI event stream (AG-UI, Vercel AI), ACP editor agent, GitHub Agentic Workflows job, or a realtime voice session on OpenAI Realtime, Gemini Live, Azure, and xAI.
Observability and testing
Instrumentation is OpenTelemetry-based, so traces can go to any OTel backend or to the optional Pydantic Logfire platform. Pydantic Evals lets you build datasets and score agent behavior, and a built-in test model allows offline unit tests. The optional AI Gateway offers one key for many models with cost monitoring.
Community Discussions
Be the first to start a conversation about Pydantic AI
Share your experience with Pydantic AI, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Pydantic AI and Pydantic AI Harness are open source under the MIT license. Model providers and hosting are paid separately by the user.
- MIT licensed Python agent framework
- Pydantic AI Harness included under MIT
- Model provider and hosting costs are external
- Logfire and AI Gateway are separate optional products with their own pricing
Capabilities
Key Features
- Typed agents with structured output validation and retries
- Model-agnostic API across many providers
- Function tools with dependency injection
- Pydantic AI Harness capabilities: workspace, planning, subagents, memory, guardrails
- Durable execution on Temporal, DBOS, Prefect, Restate, AWS Lambda and more
- Human-in-the-loop tool approval
- Realtime voice agents
- Image generation and embeddings
- MCP and web search capabilities
- Pydantic Evals for agent testing
- OpenTelemetry instrumentation with Logfire
- CLI, web chat, AG-UI and Vercel AI UI streams, ACP
