Pydantic AI
AI agent framework built with Pydantic for structured, typed agent development.
Agent, MCP and tool libraries PyPI MIT
How Pydantic AI is used
Pydantic AI is a dependency in 16 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 188 projects, and what it is used with below comes from all of them. The most used alternative in our scan is LangChain (126 projects). Projects that use it most often also use python-dotenv (77.7%), Pydantic (76.1%), OpenAI Python Library (64.4%).
Pydantic AI popularity over time
Gid Score 62: downloads 68, use in agent projects 60, GitHub stars 62, downloads trend 55 (each 0-100). How it is calculated.
Often used with Pydantic AI
| python-dotenv | 77.7% of Pydantic AI projects · 8.5× more than average |
|---|---|
| Pydantic | 76.1% of Pydantic AI projects · 8.8× more than average |
| OpenAI Python Library | 64.4% of Pydantic AI projects · 16.3× more than average |
| Requests | 47.3% of Pydantic AI projects · 7.0× more than average |
| Uvicorn | 46.3% of Pydantic AI projects · 6.0× more than average |
| Rich | 44.1% of Pydantic AI projects · 12.3× more than average |
| FastAPI | 41.0% of Pydantic AI projects · 5.5× more than average |
| Anthropic Python SDK | 39.9% of Pydantic AI projects · 21.9× more than average |
From all 188 projects in our scan that use Pydantic AI, including the dependency samples.
By coding agent
| Cursor | 0.4% of projects set up for it |
|---|---|
| Claude Code | 0.2% of projects set up for it |
| GitHub Copilot | 0.2% of projects set up for it |
Share of public repos configured for each agent that list Pydantic AI as a dependency.
Install
| Package | pip install pydantic-ai |
|---|---|
| Main stacks | Python (186), Next.js (2) |
| Example projects | prakharsr/audiobook-creator, SylvianAI/sv-excel-agent, daveebbelaar/pydantic-ai-tutorial, intellectronica/building-effective-agents-with-pydantic-ai, rachedblili/AgentExamples |
Alternatives to Pydantic AI
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside Pydantic AI are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| LangChain pypi Framework for composing applications with LLMs through chains and agents. |
88 | 126 (7.8%) | 37.3M | 148K | MIT |
| LangGraph pypi Framework for building stateful, multi-actor applications with LLMs. |
78 | 76 (4.7%) | 12.5M | 43.6K | MIT |
| LangGraph SDK pypi SDK for interacting with LangGraph API to build and run agent workflows. |
73 | 9 (0.6%) | 12.2M | 43.6K | MIT |
| Browser Use pypi SDK for AI agents to interact with websites via browser automation. |
54 | 8 (0.5%) | 1.5M | — | MIT |
| smolagents pypi Barebones library for building agents that write Python code to call tools. |
46 | 5 (0.3%) | 113K | — | — |
| CrewAI pypi Framework for orchestrating collaborative AI agents to solve complex autonomous tasks. |
62 | 3 (0.2%) | 669K | 59.9K | MIT |
| Semantic Kernel pypi Microsoft SDK for integrating LLMs with traditional code for AI applications. |
51 | 3 (0.2%) | 73.1K | 28.7K | MIT |
| Langflow pypi Visual builder for LLM applications with web UI for no-code workflows. |
52 | 2 (0.1%) | 9,395 | 156K | MIT |
More in Agent, MCP and tool libraries: Model Context Protocol SDK (JavaScript) Model Context Protocol SDK (Python) FastMCP (Python) LangChain.js Mastra Agent Client Protocol SDK MCP Inspector fastMCP (JavaScript)