Pydantic AI

1.70.0 · active · verified Tue Mar 24

Official agent framework from the Pydantic team. Type-safe, model-agnostic. Built by the same team behind pydantic validation used in OpenAI SDK, LangChain, Anthropic SDK. Released November 2024. Reached V1 in September 2025 with API stability commitment. Current version is 1.70.0 (Mar 2026). V2 planned no earlier than April 2026.

Warnings

Install

Imports

Quickstart

Minimal agent using pydantic-ai 1.x with run_sync.

from pydantic_ai import Agent

agent = Agent(
    'openai:gpt-4o',
    system_prompt='You are a helpful assistant.'
)

result = agent.run_sync('What is the capital of France?')
print(result.output)  # not result.data

view raw JSON →