# pydantic/pydantic-ai

How Python does AI: agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.

Repository: https://github.com/pydantic/pydantic-ai
Canonical: https://ross.abutalabs.com/products/pydantic-ai
Homepage: https://pydantic.dev/pydantic-ai
Language: Python
License: MIT
License Family: permissive
Topics: agent-framework, pydantic, python, genai, llm, harness, harness-engineering
Last push: 2026-08-27T00:21:10+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 57
- inputs: {"age_days": 803, "days_push": 7, "days_rel": 6, "gap_med": 1, "n_releases_24m": 308}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 19518, forks 2598 (observed 2026-08-28T04:11:28.755919+00:00)

## What it is
Pydantic AI is a type-safe Python SDK for building AI agents and LLM applications, with a typed agent loop, structured outputs, tool calling, MCP support, realtime voice, image generation, and embeddings. The same agent can run behind a web frontend, in the terminal, on voice calls, or on durable background queues, with model providers swapped via a string.

## Use cases
- build production AI agents in python with type safety
- extract structured data from llm outputs with pydantic validation
- connect agents to mcp servers for external tools
- stream agent events to a chat frontend
- run long-running durable agents on temporal
- build a terminal coding agent with file and shell access
- swap llm providers without changing agent code
- add memory and sub-agents to a multi-agent system

## When to choose
- you want typed, validated structured outputs from llms
- you need model-agnostic agents across openai, anthropic, and other providers
- you want mcp, streaming UI protocols, and durable execution in one sdk
- your team already uses pydantic and fastapi

## When to avoid
- you need a javascript or go-first agent framework
- you want a no-code or low-code agent builder
- you only need raw llm api calls without an agent abstraction

## Facets
- artifact type: framework
- maturity: active
- function: agent-framework, llm-inference, rag, mcp, chatbot, sdk, speech-recognition, image-processing, streaming, workflow-automation
- domain: artificial-intelligence, large-language-models, developer-tools
- platform: python, cross-platform, cli, cloud
- tags: pydantic, type-safe, structured-outputs, model-agnostic, mcp-client, ag-ui, vercel-ai-protocol, temporal, durable-execution, embeddings, image-generation, realtime-voice, observability, logfire, ai-agents, retrieval-augmented-generation, natural-language-processing, web-server, docker

## Member repositories
- pydantic/pydantic-ai (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:28.755919+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:00:05.827197+00:00, confidence not recorded.
  - readme: https://github.com/pydantic/pydantic-ai (fetched 2026-08-28T04:11:28.755919+00:00, sha e93762d7af36)
  - homepage: https://pydantic.dev/pydantic-ai (fetched 2026-08-29T07:58:31.189955+00:00, sha 6f6ce4b47a7a)
  - site_page: https://pydantic.dev/docs/ai/overview (fetched 2026-08-29T07:58:31.202234+00:00, sha 5a0acbe090de)
  - site_page: https://pydantic.dev/docs/ai/mcp/overview (fetched 2026-08-29T07:58:31.207089+00:00, sha 9f86a4ada539)
  - site_page: https://pydantic.dev/docs/ai/integrations/ui/ag-ui (fetched 2026-08-29T07:58:31.208953+00:00, sha 65c2f098f188)
  - site_page: https://pydantic.dev/docs/ai/integrations/ui/vercel-ai (fetched 2026-08-29T07:58:31.211827+00:00, sha c2f1d9f8db26)
  - site_page: https://pydantic.dev/docs/ai/integrations/ui/overview (fetched 2026-08-29T07:58:31.214012+00:00, sha ea430f12d8ff)
  - site_page: https://pydantic.dev/docs/ai/integrations/durable_execution/temporal (fetched 2026-08-29T07:58:31.216044+00:00, sha 91c708950cd7)
  - site_page: https://pydantic.dev/pricing (fetched 2026-08-29T07:58:31.199509+00:00, sha 9c27ef172ded)
  - site_page: https://pydantic.dev/logfire (fetched 2026-08-29T07:58:31.204651+00:00, sha 4348418c8252)
- Data as of 2026-08-30T08:39:29.467469+00:00.
