{"data":{"slug":"pydantic-pydantic-ai","name":"pydantic-ai","tagline":"Python AI SDK with typed, extensible agent loop","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":20021,"forks":2732,"topics":["agent-framework","genai","harness","harness-engineering","llm","pydantic","python"],"archived":false,"github_pushed_at":"2026-09-18T07:21:10+00:00","maintenance_label":"Very active","stars_delta_30d":1085,"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":"How Python does AI. Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.","homepage_url":"https://pydantic.dev/pydantic-ai","license":"MIT","open_issues":921,"watchers":124,"ai_summary":"Pydantic AI is a Python SDK for AI that provides a typed, extensible agent loop with support for various models and interfaces, including web frontend, terminal, voice call, durable background queue, and GitHub Actions.","readme_excerpt":"<div align=\"center\">\n  <a href=\"https://pydantic.dev/docs/ai/\">\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>How Python does AI</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://img.shields.io/badge/coverage-100%25-brightgreen.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<p align=\"center\">\n  Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.\n</p>\n\n---\n\n**Pydantic AI** is the Python AI SDK: a typed, [extensible](https://pydantic.dev/docs/ai/guides/extensibility/) agent loop with [every model](https://pydantic.dev/docs/ai/models/overview/) a string swap away. The same agent [runs everywhere you need it](https://pydantic.dev/docs/ai/overview/interfaces/): behind a [web frontend](https://pydantic.dev/docs/ai/integrations/ui/overview/), in the [terminal](https://pydantic.dev/docs/ai/integrations/cli/), on a [voice call](https://pydantic.dev/docs/ai/realtime/overview/), on a [durable background queue](https://pydantic.dev/docs/ai/capabilities/durable_execution/overview/), in [GitHub Actions](https://pydantic.dev/docs/ai/harness/gh-aw/), or as a plain object you call [`run()`](https://pydantic.dev/docs/ai/core-concepts/agent/#running-agents) on. [Image generation](https://pydantic.dev/docs/ai/guides/image-generation/) and [embeddings](https://pydantic.dev/docs/ai/guides/embeddings/) come in the same box.\n\n**[Pydantic AI Harness](https://github.com/pydantic/pydantic-ai-harness)** has everything an agent needs for complex, long-running work, snapped on as [capabilities](https://pydantic.dev/docs/ai/capabilities/overview/), from [memory](https://pydantic.dev/docs/ai/harness/memory/), [sub-agents](https://pydantic.dev/docs/ai/harness/subagents/), and [context management](https://pydantic.dev/docs/ai/harness/compaction/) to a complete [coding agent](https://pydantic.dev/docs/ai/harness/coder/).\n\nView the complete documentation at [pydantic.dev/docs/ai](https://pydantic.dev/docs/ai/).\n\n## What are you building?\n\nFrom simple typed data extraction to complex, long-running multi-agent collaboration, Pydantic AI and [Pydantic AI Harness](https://github.com/pydantic/pydantic-ai-harness) have got you covered.\n\n### Coding agent\n\nA complete coding agent in your terminal: workspace-rooted [file access](https://pydantic.dev/docs/ai/harness/filesystem/), allowlisted [shell](https://pydantic.dev/docs/ai/harness/shell/), [repo orientation](https://pydantic.dev/docs/ai/harness/repo-context/), [planning](https://pydantic.dev/docs/ai/harness/planning/), and [context management](https://pydantic.dev/docs/ai/harness/compaction/) that survives long sessions. Here with [web search](https://pydantic.dev/docs/ai/capabilities/web-search/) and a second-opinion [advisor](https://pydantic.dev/docs/ai/harness/advisor/) snapped on alongside:\n\n```bash\nuv add pydantic-ai pydantic-ai-harness\n```\n\n```python\nfrom pydantic_ai import Agent","github_created_at":"2024-06-21T15:55:04+00:00","created_at":"2026-07-07T22:36:43.479433+00:00","updated_at":"2026-10-04T04:00:39.165603+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"},{"slug":"computer-vision","name":"Computer Vision","url":"https://www.graphcanon.com/categories/computer-vision","markdown_url":"https://www.graphcanon.com/categories/computer-vision.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/computer-vision"},{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"},{"slug":"speech-audio","name":"Speech & Audio","url":"https://www.graphcanon.com/categories/speech-audio","markdown_url":"https://www.graphcanon.com/categories/speech-audio.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/speech-audio"}],"tags":[{"slug":"agent-framework","name":"agent-framework"},{"slug":"genai","name":"genai"},{"slug":"harness","name":"harness"},{"slug":"harness-engineering","name":"harness-engineering"},{"slug":"llm","name":"llm"},{"slug":"pydantic","name":"pydantic"},{"slug":"python","name":"python"}],"trust":{"provenance":{"is_fork":false,"github_id":818331198,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-18T08:07:52.656Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":30,"days_since_push":0,"last_release_at":"2026-09-18T04:31:12Z","stars_delta_30d":1085,"open_issues_delta_30d":316},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-10-04T04:00:38.776Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-18T08:07:51.468Z"},"has_cli":{"value":true,"source":"pyproject.toml:[project.scripts]","observed_at":"2026-09-18T08:07:51.468Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-18T08:07:51.468Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-18T08:07:51.468Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When you need a typed and extensible agent loop that can be easily integrated into different interfaces such as web frontends, terminals, voice calls, and GitHub Actions.","If your project requires support for image generation and embeddings, as these features are included in the same package.","For complex, long-running tasks where you need capabilities like memory, sub-agents, and context management, provided by the Pydantic AI Harness."],"when_not_to_use":["If your project does not require a typed agent loop or if you prefer a more loosely typed framework.","When you are working in a language other than Python, as Pydantic AI is specifically designed for Python.","If you need a tool that focuses solely on a specific interface or model without the need for extensibility across multiple interfaces."],"source":"enrich:decision_facts","observed_at":"2026-09-18T11:27:56.350Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"Pydantic AI is a Python SDK for AI that offers a typed, extensible agent loop with support for various models and interfaces, including web frontend, terminal, voice call, durable background queue, and GitHub Actions."}]}}