About this project

Pydantic AI is a Python AI SDK designed for creating typed, extensible agent loops. It provides a unified API that allows developers to swap between virtually any LLM provider (including OpenAI, Anthropic, Google, and others) via simple string identifiers or the Pydantic AI Gateway. Key capabilities include: - **End-to-End Typing**: Leverages Pydantic for structured outputs, typed dependency injection, and validated tool arguments, reducing runtime errors. - **Versatile Interfaces**: Agents can be deployed across multiple interfaces, including web frontends, terminals (CLI), and realtime voice sessions (supporting OpenAI Realtime, Gemini Live, etc.). - **Durable Execution**: Integration with Temporal, DBOS, Prefect, and Restate ensures that agent runs survive restarts and failures, supporting long-running workflows and human-in-the-loop approvals. - **Composable Capabilities**: Uses a 'capability' primitive to bundle tools, instructions, and model settings into reusable units. The companion 'Pydantic AI Harness' provides advanced capabilities like memory, sub-agents, and a complete coding agent (Coder). - **Multimodal Support**: Includes built-in support for image generation and embeddings. - **Observability**: Native OpenTelemetry instrumentation for real-time debugging, tracing, and cost tracking via Pydantic Logfire. The SDK is designed to handle a wide range of use cases, from simple data extraction to complex multi-agent collaborations and autonomous coding assistants.