Pydantic AI
Agent framework by Pydantic Services Inc.
ActiveOpen source · MITVerified Oct 22, 2026
Type-safe Python agent framework from the Pydantic team, with validated structured outputs, many model providers selectable by string, and optional durable execution and evals.
Key facts
- Type
- Agent framework · Library
- Pricing
- Free
- Free tier
- Pydantic AI is free and MIT-licensed. Pydantic's optional Logfire observability platform (which includes the Pydantic AI Gateway) has a free Personal plan with 10M records/month.
- License
- MIT
- Models
- OpenAI, Anthropic, Google (Gemini API and Vertex AI), AWS Bedrock, Azure / Microsoft Foundry, Mistral, Cohere, Groq, DeepSeek, xAI, OpenRouter, LiteLLM, Local models via Ollama and vLLM, Any OpenAI-compatible endpoint
- Languages
- Python
- Platforms
- macOS, Windows, Linux
- Bring your own API key
- Yes
- Local models
- Yes
- MCP support
- Yes
- Self-hostable
- Yes
- GitHub stars
- 20,787
- Last commit
- Oct 22, 2026
Best for
- Python teams that want type-checked agent inputs and outputs
- Production agents needing structured output validation
- Developers who want to switch model providers with minimal code changes
Pros
- Typed end to end, so IDEs and type checkers understand agent outputs
- Broad native model provider support plus OpenAI-compatible endpoints
- Durable execution via Temporal, DBOS, or Prefect; Pydantic Graph and Pydantic Evals for control flow and evaluation
- MCP supported in the core package
Cons
- Python only
- Frequent releases mean APIs move quickly
- Deepest observability integration is with Pydantic's own paid Logfire product
Sources (7)
- license: https://github.com/pydantic/pydantic-ai/blob/main/LICENSE
- languages: https://pydantic.dev/docs/ai/overview/
- status: https://github.com/pydantic/pydantic-ai
- status: https://pypi.org/project/pydantic-ai/
- pricingPlans: https://pydantic.dev/pricing
- modelsSupported: https://pydantic.dev/docs/ai/models/overview/
- mcpSupport: https://pydantic.dev/docs/ai/mcp/overview/