Skip to content
The Agents Index

Pydantic AI

Claim

Is Pydantic AI yours?

Claiming is free. You get this page's reader numbers and can edit its facts.

Claim this listing

You confirm it with an email at ai.pydantic.dev.

Pydantic AI is an MIT-licensed Python SDK for building agents with a typed agent loop, structured outputs and swappable model providers.

The six
  • API accessYes
  • Free tierYes
  • MCP serverPartly
  • Own API keyYes
  • Open sourceYes
  • Self-hostedYes
From
Free
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.

Checked · 6 facts changed · How we check · Editorial policy

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.

Changed since our last check

  • Writes code: now Partly. It was Yes when we checked on .
  • Debugs and fixes: now Partly. It was Yes when we checked on .
  • Agent permissions: now Yes. It was Partly when we checked on .
  • In your pipeline: now Yes. It was No.
  • How it meters: now Partly. It was Yes when we checked on .
  • MCP server: now Partly. It was Yes when we checked on .

The facts, with their sources

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.Was Yes before our last check.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.Was Yes before our last check.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 agentpydantic.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

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.Was Partly before our last check.If a tool function always requires approval, you can pass the requires_approval=True argument to the @agent.tool decoratorpydantic.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 openaipydantic.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 usespydantic.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 linepydantic.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.Was No before our last check.GitHub Agentic Workflows (gh-aw) runs an agent from a Markdown file in .github/workflows/: it triggers on issues, pull requests or a schedulepydantic.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 presentgithub.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.Was Yes before our last check.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 softwaregithub.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.Was Yes before our last check.MCP is a provider-adaptive capability and the primary entry point for MCP in Pydantic AI. It runs the MCP server locally by defaultpydantic.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 callpydantic.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 Gatewaypydantic.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

Plans and pricing

Price and terms

Free plan
YesYes
The terms in full

The pricing page the site links from Pydantic AI states that the prices it publishes apply to Pydantic Logfire only, and that the Pydantic library is free under the MIT licence, so no paid tier or usage cap is published for the SDK itself; the separately priced Logfire platform has a Personal plan that is "Free, forever" with 10M telemetry records a month.

Checked .

Works with

  • Claude
  • GPT
  • Yes
    Open models

For AI agents

MCP server
Partly
API
Yes

Developer docs

Screenshots

  • Pricing page of Pydantic AI
    Pricing page, ai.pydantic.dev, captured
  • Docs of Pydantic AI
    Docs, ai.pydantic.dev, captured

Filed under

Agent frameworksAPIAutonomousClaudeFree tierGPTMulti-agentOpen modelsOpen sourceSelf-hosted

Sources and updates

Last changed

Repository30 August 2026

Licence
MIT
Stars
19,584
Forks
2,617
Last push
30 August 2026

The Agents Index in AI answers0 of 1

  • PerplexityDoes not cite The Agents IndexAsked Pydantic AI alternatives on Other sources: g2.com, infrabase.ai, futureagi.com, ebool.com, respan.ai, aiagentsdirectory.com

Updates5

  • Free tier · Price
  • Capabilities · Free tier · Price · Terms
  • Capabilities · Free tier · Terms
  • Capabilities · Free tier · Terms
  • Alternatives · Summary · Tagline · Website

Is this yours? Claim it free and edit it in your dashboard, or feature it in Agent frameworks.

The digestFree

Which agents actually ship.

New agents and articles, by email, at most once a week.

Last issue · No. 1 · 13 October 2026Devin vs Claude Code: Which Should You Pick?

183 agents trackedOne-click unsubscribe

Alternatives

  • LangChain

    Open source agent frameworks plus LangSmith, a hosted platform to trace, evaluate, deploy and govern agents.

    • API access: Yes
    • Free tier: Yes
    • MCP server: Yes
    • Own API key: Partly
    • Open source: Partly
    • Self-hosted: Partly
  • CrewAI

    Open-source multi-agent framework with a managed platform for deploying and governing agent workflows.

    • API access: Yes
    • Free tier: Yes
    • MCP server: Yes
    • Own API key: Yes
    • Open source: Yes
    • Self-hosted: Yes
  • Agno

    Python SDK, self-hosted AgentOS runtime and hosted control plane for running agents as a service.

    • API access: Yes
    • Free tier: Yes
    • MCP server: Yes
    • Own API key: Yes
    • Open source: Partly
    • Self-hosted: Yes
  • LangGraph

    Open-source orchestration framework and runtime for stateful, long-running LLM agents, from LangChain.

    • API access: Yes
    • Free tier: Yes
    • MCP server: Yes
    • Own API key: Yes
    • Open source: Yes
    • Self-hosted: Yes