Summary
Pydantic AI is an MIT-licensed Python SDK for building agents with a typed agent loop, structured outputs and swappable model providers. Its Harness package adds composed capabilities such as a coding agent, sub-agents, guardrails and durable execution.
- Best for
- Python teams building type-safe agents who also want realtime voice, image generation and embeddings in one SDK, with optional durable execution via Temporal, DBOS, Prefect or Restate.
- Not for
- Teams that want built-in, zero-infrastructure durable or checkpointed workflow state without standing up a separate orchestrator, that need LangGraph-depth native graph-branching control as the core of the framework itself, or that want a single vendor-hosted managed runtime for production agents.
- From
- Free
- Free tier
- YesThe framework, Harness, Evals and Graph packages are MIT-licensed and free with no usage ceiling; you pay your model provider for inference, and the vendor's optional Logfire/Gateway platform is priced separately from $49/month with a free Personal plan.
What it does
- Writes code
- PartlyThe framework itself is a Python SDK, but its Harness ships a Coder capability whose file tools let an agent author and edit files in a workspace, so code writing comes from the bundled agent rather than a product you sign into.
Coder provides six tools: read_file, write_file, edit_file, list_files, grep, and shell, plus repository context and context controls.
pydantic.dev/docs/ai/harness - Debugs and fixes
- PartlyHarness Coder is documented as investigating, editing and testing a local codebase, which covers diagnosing a failure and landing a fix, but only for an agent you assemble and run yourself with your own model key.
Coder gives a Pydantic AI agent tools and guidance for investigating, editing, and testing a local codebase.
pydantic.dev/docs/ai/harness/coder - Reviews code
- PartlyReview is not native: the Harness capability table offers a Macroscope capability that runs that third-party code-review tool locally and hands its findings to the agent, so reviewing a diff depends on an external tool.
Run a local Macroscope code review and hand the findings to the agent
pydantic.dev/docs/ai/harness - Whole-codebase work
- PartlyThe Harness is explicitly aimed at long-running repository work with repo context and context management, but the framework supplies the machinery rather than a measured guarantee about repository-wide migrations.
But set an agent loose on complex, long-running work (fix a codebase, research a question, run for hours unattended) and what it needs around the…
pydantic.dev/docs/ai/harness - Ships it
- PartlyThere is no deployment feature; the Coder shell tool runs unrestricted commands that outlive the run, so an agent can execute deploy commands you allow, and the docs warn to sandbox untrusted work.
Unrestricted commands rooted at the workspace that outlive the run.
pydantic.dev/docs/ai/harness/coder - Done-for-you service
- NoNobody builds or runs the agent for you: this is a Python package you install from PyPI and operate yourself, with no managed or done-for-you service described anywhere in the docs.
Pydantic AI is available on PyPI as pydantic-ai so installation is as simple as:
pydantic.dev/docs/ai/overview/install
Not established: Writes tests
How much it does unattended
- Runs autonomously
- YesCoder's default instructions push autonomous investigation through to completion, and the GitHub Agentic Workflows integration runs the same agent headless on a runner with nobody at a prompt.
The default instructions keep engineering guidance brief: autonomous investigation and completion, focused changes and verification, and pragmatic…
pydantic.dev/docs/ai/harness/coder - Multi-agent
- YesThe SubAgents capability gives a parent agent a delegate_task tool over named child agents, each running in its own message history with its own budgets, which is coordination between several agents on one task.
SubAgents lets an agent delegate self-contained tasks to named child agents. It takes a sequence of SubAgent entries and exposes a single…
pydantic.dev/docs/ai/harness/subagents - Agent permissions
- YesTools can be marked as requiring human approval, and the run pauses with the pending calls so a person approves or denies each one before the tool body executes; the docs also warn approval is not an authorization boundary.
If a tool function always requires approval, you can pass the requires_approval=True argument to the @agent.tool decorator
pydantic.dev/docs/ai/tools-toolsets/def…
Which models it runs on
- Claude
- YesAnthropic is a first-class built-in provider with its own model class and install extra, selectable by a provider-prefixed model string like anthropic:claude-sonnet-4-6.
Pydantic AI is model-agnostic and has built-in support for multiple model providers:
pydantic.dev/docs/ai/models/overview - GPT
- YesOpenAI is the first listed built-in provider and appears throughout the docs as openai:gpt-… model strings, with an openai extra installed by the default package.
openai -- installs OpenAI Model dependency openai
pydantic.dev/docs/ai/overview/install - Open models
- YesOpen-weight models are reachable through OpenAI-compatible providers the docs enumerate, including local runtimes Ollama and vLLM as well as Hugging Face and Groq, so weights you host yourself are supported.
In addition, many providers are compatible with the OpenAI API, and can be used with OpenAIChatModel in Pydantic AI:
pydantic.dev/docs/ai/models/overview - Model choice
- YesYou choose the model, not the vendor: an agent is portable across LLM vendors by swapping the model string, and the docs state no flagship feature is locked to one vendor.
ensuring a single Pydantic AI agent is portable to different LLM vendors without any other code changes just by swapping out the Model it uses
pydantic.dev/docs/ai/models/overview
Where you use it
- In your editor
- PartlyAn agent can appear inside editors such as Zed through the ACP adapter, but that adapter is shipped under the harness experimental path and may be removed in any release without deprecation.
Unlike the graduated capabilities in these docs, ACP itself may still be removed, not just changed -- it lives under pydantic_ai_harness.experimental…
pydantic.dev/docs/ai/harness/acp - On the command line
- YesThe clai command ships with the package and runs an interactive terminal chat against any model, and any agent object can launch the same interface with Agent.to_cli_sync().
Pydantic AI comes with a CLI, clai (pronounced "clay"). You can use it to chat with various LLMs and quickly get answers, right from the command line
pydantic.dev/docs/ai/integrations/cli - In your pipeline
- YesA pydantic-ai engine for GitHub Agentic Workflows runs your agent from a Markdown workflow file on issues, pull requests or a schedule, writing back through gh-aw safe outputs; the engine declares itself experimental to gh-aw.
GitHub Agentic Workflows (gh-aw) runs an agent from a Markdown file in .github/workflows/: it triggers on issues, pull requests or a schedule
pydantic.dev/docs/ai/harness/gh-aw - In a browser
- YesA browser chat interface ships in the package via Agent.to_web() or clai web, though the docs position it for local development and debugging rather than production use.
Pydantic AI includes a built-in web chat interface that you can use to interact with your agents through a browser.
pydantic.dev/docs/ai/guides/web
Whose machine it runs on
- Self-hosted
- YesThere is no vendor runtime to depend on: the package installs into your own Python environment and the web app it produces runs under any ASGI server you operate.
Run the app with any ASGI server:
pydantic.dev/docs/ai/guides/web - Open source
- YesThe pydantic-ai repository ships an MIT licence granting unrestricted use, modification and redistribution, so the framework source is fully available.
The MIT License (MIT) Copyright (c) Pydantic Services Inc. 2024 to present
github.com/pydantic/pydantic-ai/blob/ma…
What it costs to run
- How it meters
- PartlyThe framework charges nothing per seat, task or token; your spend is model inference, paid either straight to providers with your own keys or through the vendor's Gateway, which adds a markup on built-in providers.
BYOK and managed providers: Bring your own API keys (BYOK) from LLM providers, or pay for inference directly through the platform.
pydantic.dev/docs/ai/overview/gateway - Free tier
- YesNo call, account or card is needed: the package is MIT licensed and free of charge, and a built-in test model lets you exercise an agent offline before you hold any provider key.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
github.com/pydantic/pydantic-ai/blob/ma… - API access
- YesThe product is itself a programmable library: you construct an Agent in your own code, call run(), and can expose it as an ASGI app or UI event stream inside your stack.
Create a web app from an agent instance using Agent.to_web():
pydantic.dev/docs/ai/guides/web - MCP server
- PartlyMCP is supported as a client: the MCP capability connects any MCP server's tools into your agent, and the CLI takes an mcpServers config file; the docs I read establish consumption, not your agent being queried as an MCP server.
MCP is a provider-adaptive capability and the primary entry point for MCP in Pydantic AI. It runs the MCP server locally by default
pydantic.dev/docs/ai/capabilities/mcp - Bring your own key
- YesYour own provider keys are the default path: you set the provider's API key environment variable yourself, and the vendor's optional Gateway also supports bringing your own credentials.
You'll need to set an environment variable depending on the provider you intend to use.
pydantic.dev/docs/ai/integrations/cli
Buying it for a team
- A company can buy it
- PartlyThere is nothing to buy for the framework itself; purchasing applies to the surrounding Logfire platform, which is sold to organisations from a paid team plan up to Enterprise.
For organizations where observability has to pass security review.
pydantic.dev/pricing - Seat model
- PartlyThe framework has no seats. Logfire's Team plan includes five and caps at twelve at $25 each, while Growth and Enterprise are flat-price with unlimited seats.
Admin or member seats for you & your core team. 5 seats included, $25/extra seat.
pydantic.dev/pricing - Pooled budget
- PartlyGateway budgets are pooled by scope you choose - project, user or key - rather than per seat; in the OSS harness, SpendLimits can share one spend counter across worker processes.
Cost Limits: Set spending limits at project, user, and API key levels with daily, weekly, and monthly caps.
pydantic.dev/docs/ai/overview/gateway - Admin controls
- PartlyConstraints are developer-level rather than an org admin console: guardrail capabilities screen prompts, tool calls and outputs, and the Shell capability supports allowlists, denylists and credential stripping.
Guardrails put a validation layer on the three edges of an agent run: the prompt on its way in to the model, the tool calls the model makes along the…
pydantic.dev/docs/ai/harness/guardrails - Audit log
- PartlyThere is no vendor-side administrative log, but every model call and tool call is emitted as standard OpenTelemetry spans you can send to Logfire or any OTLP backend you already run.
Pydantic AI is OpenTelemetry-native: the Instrumentation capability emits standard OTel spans for every model call and tool call
pydantic.dev/docs/ai/overview - Single sign-on
- PartlySAML and OIDC exist but sit on Logfire Enterprise in the plan comparison, which marks SSO absent on Personal, Team and Growth.
Bring your identity provider — first-party integrations for the common IDPs and generic SAML for the rest.
pydantic.dev/pricing
What happens to your code
- Opt out of training
- PartlyNo training-opt-out toggle is published, and none is needed for the library itself, which sends prompts straight to the provider you configure. Where Pydantic is in the path, the Gateway terms license your content only to operate the Gateway, and provider terms govern the provider leg.
You grant Pydantic a limited, non‑exclusive license to process Customer Content solely to provide, secure, troubleshoot, and improve the Gateway
pydantic.dev/legal/terms-of-service - Data residency
- PartlyThe library holds nothing, so residency is yours. If you send telemetry to Logfire, you choose a US or EU region at signup; regions are strictly separated and migration between them is not available.
Logfire is hosted in two separate geographic regions to provide you with options for data residency, compliance with local regulations, and optimal…
pydantic.dev/docs/logfire/manage/data-r… - Getting out
- PartlyPrepaid Gateway credits are non-refundable and expire after twelve months of account dormancy; Logfire data is exportable over its query API and Growth adds self-serve deletion.
Gateway Credits will expire if your Account remains dormant (inactive) for a period of twelve (12) months.
pydantic.dev/legal/terms-of-service - Certifications
- PartlyThe certifications cover the hosted platform, not the library: SOC 2 Type 2 audited, GDPR with a DPA, and HIPAA under a signed BAA, with the report itself behind a document request.
SOC 2 Type 2 — Type 2 audited Independently audited controls for security, availability, and confidentiality.
pydantic.dev/security
34 sourced claims on this page. Checked 2026-09-21. How we check.
Alternatives
Where we would send a reader instead, in that listing's own words.
Open source agent frameworks plus LangSmith, a hosted platform to trace, evaluate, deploy and govern agents.
Open-source multi-agent framework with a managed platform for deploying and governing agent workflows.
Python SDK, open-source AgentOS runtime and hosted control plane for building and operating agents.
Open-source orchestration framework and runtime for stateful, long-running LLM agents, from LangChain.
Filed under
Sources and updates
The pages we read32
1 of 32 independent of the vendor.
- pydantic.dev/docs/ai/harness/coder5 fields
- pydantic.dev/docs/ai/overview5 fields
- pydantic.dev/docs/ai/overview/interfaces5 fields
- pydantic.dev/docs/ai/harness4 fields
- pydantic.dev/docs/ai/models/overview4 fields
- pydantic.dev/pricing4 fields
- pydantic.dev/docs/ai/guides/web3 fields
- pydantic.dev/docs/ai/overview/gateway3 fields
- pydantic.dev/enterprise3 fields
- pydantic.dev/pydantic-ai3 fields
- github.com/pydantic/pydantic-ai/blob/main/LICENSE3 fields
- pydantic.dev/ai-gateway2 fields
- pydantic.dev/docs/ai/harness/shell2 fields
- pydantic.dev/docs/ai/integrations/cli2 fields
- pydantic.dev/docs/ai/overview/install2 fields
- pydantic.dev/legal/terms-of-service2 fields
- pydantic.dev/docs/ai/capabilities/mcp1 field
- pydantic.dev/docs/ai/core-concepts/message-history1 field
- pydantic.dev/docs/ai/harness/acp1 field
- pydantic.dev/docs/ai/harness/gh-aw1 field
- pydantic.dev/docs/ai/harness/guardrails1 field
- pydantic.dev/docs/ai/harness/macroscope1 field
- pydantic.dev/docs/ai/harness/spend1 field
- pydantic.dev/docs/ai/harness/subagents1 field
- pydantic.dev/docs/ai/mcp/server1 field
- pydantic.dev/docs/ai/models/anthropic1 field
- pydantic.dev/docs/ai/models/ollama1 field
- pydantic.dev/docs/ai/models/openai1 field
- pydantic.dev/docs/ai/tools-toolsets/deferred-tools1 field
- pydantic.dev/docs/logfire/manage/data-regions1 field
- api.github.com/repos/pydantic/pydantic-aiPlatform record1 field
- pydantic.dev/security1 field
Platform record2026-08-30
- Licence
- MIT
- Stars
- 19,584
- Forks
- 2,617
- Last push
- 2026-08-30
Updates4
- Capabilities · Commercial terms · Free tier · Price
- Capabilities · Commercial terms · Free tier
- Capabilities · Commercial terms · Free tier
- Alternatives · One-liner · Summary · Website
