{"data":{"slug":"pydantic-pydantic-ai","name":"pydantic-ai","tagline":"GenAI Agent Framework, the Pydantic way","github_url":"https://github.com/pydantic/pydantic-ai","owner":"pydantic","repo":"pydantic-ai","owner_avatar_url":"https://avatars.githubusercontent.com/u/110818415?v=4","primary_language":"Python","stars":18259,"forks":2314,"topics":["agent-framework","genai","llm","pydantic","python"],"archived":false,"github_pushed_at":"2026-07-07T22:35:37+00:00","url":"https://www.graphcanon.com/tools/pydantic-pydantic-ai","markdown_url":"https://www.graphcanon.com/tools/pydantic-pydantic-ai.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/pydantic-pydantic-ai","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=pydantic-pydantic-ai","description":"AI Agent Framework, the Pydantic way","homepage_url":"https://pydantic.dev/pydantic-ai","license":"MIT","open_issues":492,"watchers":114,"ai_summary":"Pydantic AI is a Python framework for building production-grade applications and workflows using Generative AI.","readme_excerpt":"<div align=\"center\">\n  <a href=\"https://ai.pydantic.dev/\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://pydantic.dev/docs/ai/img/pydantic-ai-dark.svg\">\n      <img src=\"https://pydantic.dev/docs/ai/img/pydantic-ai-light.svg\" alt=\"Pydantic AI\">\n    </picture>\n  </a>\n</div>\n<div align=\"center\">\n  <h3>GenAI Agent Framework, the Pydantic way</h3>\n</div>\n<div align=\"center\">\n  <a href=\"https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml?query=branch%3Amain\"><img src=\"https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml/badge.svg?event=push\" alt=\"CI\"></a>\n  <a href=\"https://coverage-badge.samuelcolvin.workers.dev/redirect/pydantic/pydantic-ai\"><img src=\"https://coverage-badge.samuelcolvin.workers.dev/pydantic/pydantic-ai.svg\" alt=\"Coverage\"></a>\n  <a href=\"https://pypi.python.org/pypi/pydantic-ai\"><img src=\"https://img.shields.io/pypi/v/pydantic-ai.svg\" alt=\"PyPI\"></a>\n  <a href=\"https://github.com/pydantic/pydantic-ai\"><img src=\"https://img.shields.io/pypi/pyversions/pydantic-ai.svg\" alt=\"versions\"></a>\n  <a href=\"https://github.com/pydantic/pydantic-ai/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/pydantic/pydantic-ai.svg?v\" alt=\"license\"></a>\n  <a href=\"https://logfire.pydantic.dev/docs/join-slack/\"><img src=\"https://img.shields.io/badge/Slack-Join%20Slack-4A154B?logo=slack\" alt=\"Join Slack\" /></a>\n</div>\n\n---\n\n**Documentation**: [ai.pydantic.dev](https://ai.pydantic.dev/)\n\n---\n\n### <em>Pydantic AI is a Python agent framework designed to help you quickly, confidently, and painlessly build production grade applications and workflows with Generative AI.</em>\n\n\nFastAPI revolutionized web development by offering an innovative and ergonomic design, built on the foundation of [Pydantic Validation](https://docs.pydantic.dev) and modern Python features like type hints.\n\nYet despite virtually every Python agent framework and LLM library using Pydantic Validation, when we began to use LLMs in [Pydantic Logfire](https://pydantic.dev/logfire), we couldn't find anything that gave us the same feeling.\n\nWe built Pydantic AI with one simple aim: to bring that FastAPI feeling to GenAI app and agent development.\n\n## Why use Pydantic AI\n\n1. **Built by the Pydantic Team**:\n[Pydantic Validation](https://docs.pydantic.dev/latest/) is the validation layer of the OpenAI SDK, the Google ADK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more. _Why use the derivative when you can go straight to the source?_ :smiley:\n\n2. **Model-agnostic**:\nSupports virtually every [model](https://ai.pydantic.dev/models/overview) and provider: OpenAI, Anthropic, Gemini, DeepSeek, Grok, Cohere, Mistral, and Perplexity; Azure AI Foundry, Amazon Bedrock, Google Cloud, Ollama, LiteLLM, Groq, OpenRouter, Together AI, Fireworks AI, Cerebras, Hugging Face, GitHub, Heroku, Vercel, Nebius, OVHcloud, Alibaba Cloud, SambaNova, and Z.AI. If your favorite model or provider is not listed, you can easily implement a [custom model](https://ai.pydantic.dev/models/overview#custom-models).\n\n3. **Seamless Observability**:\nTightly [integrates](https://ai.pydantic.dev/logfire) with [Pydantic Logfire](https://pydantic.dev/logfire), our general-purpose OpenTelemetry observability platform, for real-time debugging, evals-based performance monitoring, and behavior, tracing, and cost tracking. If you already have an observability platform that supports OTel, you can [use that too](https://ai.pydantic.dev/logfire#alternative-observability-backends).\n\n4. **Fully Type-safe**:\nDesigned to give your IDE or AI coding agent as much context as possible for auto-completion and [type checking](https://ai.pydantic.dev/agents#static-type-checking), moving entire classes of errors from runtime to write-time for a bit of that Rust \"if it compiles, it works\" feel.\n\n5. **Powerful Evals**:\nEnables you to systematically test and [evaluate](https://ai.pydantic.dev/evals) the performance and a","github_created_at":"2024-06-21T15:55:04+00:00","created_at":"2026-07-07T22:36:43.479433+00:00","updated_at":"2026-07-07T22:36:46.116406+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"}],"tags":[{"slug":"genai","name":"genai"},{"slug":"llm","name":"llm"},{"slug":"python","name":"python"},{"slug":"agent-framework","name":"agent-framework"},{"slug":"pydantic","name":"pydantic"}]}}