Python agent framework from the Pydantic team with type-safe tools and structured outputs.
Python agent framework from the Pydantic team with type-safe tools and structured outputs.
How Python does AI
Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.
Pydantic AI is the Python AI SDK: a typed, extensible agent loop with every model a string swap away, and another one to fall back to when a provider fails. The same agent runs everywhere you need it: behind a web frontend, in the terminal, on a voice call, on a durable background queue, in GitHub Actions, or as a plain object you call run() on. Image generation and embeddings come in the same box.
Pydantic AI Harness has everything an agent needs for complex, long-running work, snapped on as capabilities, from memory, guardrails, and sub-agents to planning, context management, and persistence, up to a complete coding agent.
Pydantic Evals grades an agent's final outputs and tool-call trajectories, on datasets or live production traffic, and Pydantic Graph gives you typed control flow when one agent loop is not enough. Both are separate open-source packages, and so are genai-prices, which keeps model pricing current, and Monty, the sandboxed Python interpreter that runs model-written code.
Pydantic Logfire is the AI engineering platform that sees your whole app, not just the LLM calls, and the Pydantic AI Gateway is one key for every model with real-time cost monitoring and budget control; our instrumentation is plain OpenTelemetry, so any backend you already run works.
View the complete documentation at pydantic.dev/docs/ai.
What are you building?
From simple typed data extraction to complex, long-running multi-agent collaboration, Pydantic AI and Pydantic AI Harness have got you covered.
A complete coding agent in your terminal: workspace-rooted file access, allowlisted shell, repo orientation, planning, and context management that survives long sessions. Here with web search and a second-opinion advisor snapped on alongside:
uv add pydantic-ai "pydantic-ai-harness[coder]"
from pydantic_ai import Agent
from pydantic_ai.capabilities import WebSearch
from pydantic_ai_harness import Advisor, Coder
agent = Agent(
'anthropic:claude-fable-5-2',
capabilities=[
Coder(), # files, shell, repo context, sub-agents, context management
WebSearch(), # look up docs and error messages on the web
Advisor('openai:gpt-6.1-sol'), # a second opinion from another model when stuck
],
)
agent.to_cli_sync()
Coder is a regular combined capability, not a black box: use it whole, or use the blocks it bundles directly; the two are equivalent:
capabilities = [
FileSystem('.'), Shell(cwd='.'), RepoContext(), SubAgents(...),
ClearToolResults(), ToolOutputLimits(), RepairToolArguments(),
]
Run the file and you're chatting with the agent in your terminal. To try it before writing any code, run the exported coder_agent with clai (the Pydantic AI CLI), via uvx:
uvx --with "pydantic-ai-harness[coder]" clai -a pydantic_ai_harness.coder:coder_agent -m anthropic:claude-fable-5-2
Run it on GitHub → GitHub Agentic Workflows, on issues, pull requests or a schedule
Give the agent an output type and tools, and every run comes back validated and typed:
uv add pydantic-ai
from typing import Literal
from pydantic import BaseModel, Field …
Agent framework · Agent frameworks / Python framework · Open Source · MIT · Python
Website https://pydantic.dev/pydantic-ai · Repo https://github.com/pydantic/pydantic-ai
21,154 stars · 3,150 forks · 1,945 open issues · pushed 2026-11-12 · verified 2026-11-12
Tags: ai-agents, framework, python-framework
What is Pydantic AI? Pydantic AI is a coding website listed on Scriptiii Webnest. Python agent framework from the Pydantic team with type-safe tools and structured outputs. Pricing: Free. Free to use. Best for: ai-agents, framework, python-framework.
Everything you need to know about Pydantic AI
Similar websites in Coding
Open-source vector database that stores objects and vectors with hybrid search and filtering.
Coding·Free