pydantic-ai
View on GitHubHow Python does AI. Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.
Pydantic AI is a Python AI agent framework from the Pydantic team: a typed agent loop with validated structured outputs, tools, dependency injection, MCP, multi-agent support, realtime voice, image generation, embeddings and evals, with provider-agnostic model switching.
Use Cases
Build typed agents with validated structured outputsShip a terminal coding agent with file, shell and planning capabilitiesRun agents as durable workflows on Temporal, DBOS or PrefectAdd realtime voice sessions with mid-conversation tool callsGenerate images via a standalone ImageGenerator or agent native toolCreate embeddings and RAG pipelines with vector storesCompose multi-agent applications and sub-agentsEvaluate and test agent behaviour with evalsConnect agents to MCP servers for external toolsExpose agents behind web, CLI or GitHub Action interfacesExtract validated data from unstructured textSwap between model providers with a single string
Built With
- Language
- Python
- Frameworks
- Pydantic · Pydantic Graph · Pydantic Logfire · MCP · OpenTelemetry · Temporal · DBOS · Prefect · FastAPI · httpx
Tags
python · agent-framework · llm · pydantic · type-safety · structured-outputs · tool-calling · multi-agent · mcp · realtime-voice · image-generation · embeddings · evals · durable-execution · dependency-injection · cli