PydanticAI (at ai.pydantic.dev) is an open-source Python agent framework built by the Pydantic team. It wraps LLM interactions in Python's type system, using Pydantic validation for structured output generation and schema enforcement. Developers define agents entirely in code with full IDE auto-completion, type checking, and support for durable long-running workflows. It is model-agnostic, supporting OpenAI, Anthropic, Gemini, DeepSeek, Mistral, and others. Key features: - Type-safe structured outputs with Pydantic validation - Model-agnostic: OpenAI, Anthropic, Gemini, Mistral, Cohere, and more - Composable capabilities (tools, hooks, instructions) bundled into reusable units - Durable agents that survive API failures and application restarts - Streaming structured output with real-time validation - Built-in support for MCP, web search, and human-in-the-loop workflows
Free and open-source (MIT license); no subscription fees.
