Logo of Pydantic AI: Type-safe Python agent framework from the Pydantic team with model-agnostic agents, tools and evals

Pydantic AI

Type-safe Python agent framework from the Pydantic team with model-agnostic agents, tools and evals

Visit ai.pydantic.dev

Pydantic AI is an open-source Python agent framework from the team behind the Pydantic validation library. It provides a typed, extensible agent loop where switching models is a one-string change, and the same agent can run behind a web frontend, in a terminal, on a voice call, on a durable queue or in GitHub Actions.

Key features:

  • Build typed agents that work with any major model provider.
  • Add memory, guardrails, sub-agents, planning and persistence with Pydantic AI Harness.
  • Run a full terminal coding agent with workspace file access and an allowlisted shell.
  • Grade outputs and tool-call trajectories with Pydantic Evals.
  • Use Pydantic Graph for typed control flow and Monty to sandbox model-written Python.
  • Generate images, embeddings and realtime voice from the same SDK.

Pydantic AI is free under the MIT license and installs with pip or uv. Instrumentation is plain OpenTelemetry, so any backend works; the optional Pydantic Logfire platform and AI Gateway are separate products with a free personal tier.

Press the keys to navigate to the next or previous product.