Learning resourcesReviewed · Pydantic

Pydantic AI installation guide

This is the installation page of the Pydantic AI documentation, written for Python developers who want to build LLM agents, and its main catch is that it covers only installing the library, not its licence or how agents behave; on cost it says only that Pydantic Logfire has a free tier requiring no credit card, with no package prices, provider rates or tier allowances. It gives the PyPI package names (pydantic-ai and pydantic-ai-slim), the Python 3.11+ requirement, pip and uv commands, a long list of optional extras for model providers, tools, UI and durable-execution integrations, notes on TLS certificate handling, and how to install the separate examples package.

Researched 13 Nov 2026

In short.

This is the installation page of the Pydantic AI documentation, for Python developers building LLM agents, and its main catch is that it covers installation only: it states no licence, does not identify the Pydantic AI release documented, and contains no agent code. On cost, it states only that Pydantic Logfire has a free tier requiring no credit card; it gives no package prices, provider rates or tier allowances. The page says to run pip install pydantic-ai or uv add pydantic-ai (Python 3.11+). That installs the core package plus libraries for OpenAI, Anthropic and Google models and the CLI, MCP, Evals, Web UI and Logfire integrations; other models or integrations need additional extras. A second package, pydantic-ai-slim, installs the core package with only the extras you select, such as pydantic-ai-slim[openai]. The page lists more than thirty optional extras, explains that TLS certificates are checked against the operating system trust store for Pydantic AI's own requests and for providers migrated to httpx2, and shows how to install the separate examples package. Installation success, the resolved dependency set and runtime behaviour are unverified.

Researched and written by an AI model and checked by a second AI model. How it works

The scope is the single documentation page at [https://pydantic.dev/docs/ai/overview/install/index.md], as it stood on 13 November 2026, covered in full. Linked pages are excluded: the Agents guide, Logfire, Gateway, pricing, provider, coding-agent skill and examples pages, and the PyPI and GitHub project pages. The page carries no licence or notice, so the licence is unknown, and no library files are redistributed. The commands, extras and TLS behaviour are reported as the page describes them; installation success, the resolved dependency set and runtime behaviour are unverified.

The overview

What this resource is

The resource is a single documentation page titled Installation, served from pydantic.dev at [https://pydantic.dev/docs/ai/overview/install/index.md]. It documents how to install Pydantic AI, a Python library for building AI agents. The library is published on PyPI as pydantic-ai [https://pypi.org/project/pydantic-ai/], and the page links to the pydantic/pydantic-ai GitHub repository for its examples directory.

The selected resource is the page, not the library. The page does not name an author or a date, and it does not identify the Pydantic AI release documented; it does state a Python 3.11+ requirement and refers to Pydantic AI v3 when describing transitional legacy httpx support. Its host domain, its GitHub links and its references to Pydantic Logfire and the Pydantic AI Gateway suggest it comes from the Pydantic project, but the page does not say so in words.

Overall assessment

As an installation reference the page is clear and specific. It gives exact package names, copy-ready pip and uv commands, a Python version floor, and a catalogue of optional extras tied to the dependency each one pulls in. It also covers TLS certificate trust in minimal container images and behind corporate proxies that rely on a private certificate authority.

Its scope is installation. It does not show an agent, explain how the library works internally, state a licence or identify the Pydantic AI release documented. On cost, it states only that Pydantic Logfire has a free tier requiring no credit card; it gives no package prices, provider rates or tier allowances. Treat it as a good starting point for setting up an environment and as an index into the rest of the documentation, not as proof of how the library performs. Installation success, the resolved dependency set and runtime behaviour are unverified.

Who it is for

The page is for Python developers who have decided to use Pydantic AI and need to install it. Beginners can follow the two one-line commands. More experienced developers will care about the slim package, the per-provider extras, the TLS notes and the optional durable-execution extras (temporal, dbos, prefect).

It assumes you already work with Python packaging (pip or uv) and know which model provider you plan to use. It does not explain what an agent is. It points to the Agents guide at [https://pydantic.dev/docs/ai/core-concepts/agent/] for the next step.

Coding agents are also addressed: the page mentions a Pydantic AI skill for coding agents [https://pydantic.dev/docs/ai/overview/coding-agent-skills/], but that linked page is outside the selected scope.

What the page lets you do

The page lets you do four things. First, install the full pydantic-ai package. The page says this brings the pydantic_ai package, its core dependencies, and the libraries needed for OpenAI, Anthropic and Google models, plus the CLI, MCP, Evals, Web UI and Logfire integrations. Second, add further extras to that install, for example pydantic-ai[bedrock,temporal]. Third, install pydantic-ai-slim with only the extras you need. Fourth, install the examples package with the examples extra.

The slim package's optional groups cover many model providers (openai, google, anthropic, groq, mistral, cohere, bedrock, bedrock-mantle, xai, openrouter, zai, snowflake, crusoe, cerebras, typesafe, huggingface). They also cover embeddings (sentence-transformers, voyageai), search and fetch tools (duckduckgo, tavily, exa, web-fetch), integrations (logfire, evals, cli, mcp, mcp-tasks, ui, web, ag-ui, spec) and durable execution (temporal, dbos, prefect). A retries extra adds transport retries via tenacity and legacy httpx support, which the page says lasts until Pydantic AI v3.

What agents built with the library can do is not described on this page.

Using it

Requirements

The page states one hard requirement: Python 3.11 or newer. It also assumes pip or uv and access to PyPI.

The default pydantic-ai package already includes the libraries needed for OpenAI, Anthropic and Google models, plus the CLI, MCP, Evals, Web UI and Logfire integrations. Other models or integrations need additional extras, for example pydantic-ai[bedrock,temporal], or a pydantic-ai-slim install with the extras you select. The page does not describe API keys or provider account setup, so those details are not established here. For the Pydantic AI Gateway the page says one API key can reach models from several providers, but the details are on a linked page outside the selected scope.

The certificate guidance depends on the provider. Pydantic AI's own HTTP requests, and those of providers migrated to httpx2, verify TLS certificates against the operating system trust store rather than a bundled certifi set. In minimal container images or behind a corporate proxy that relies on a private certificate authority, those requests need the certificates installed in the image (for example the ca-certificates package plus your proxy's root CA). As an alternative for providers migrated to httpx2, you can pass the provider an httpx2.AsyncClient you configured yourself through its http_client argument. Providers whose SDKs still use legacy httpx, such as Groq and Cohere, keep certifi-based verification and accept a legacy httpx.AsyncClient instead.

How the packaging works

There are two ways to install it, and both are ordinary Python packages from PyPI. The pydantic-ai package is the convenient bundle: it includes the core plus the OpenAI, Anthropic and Google provider libraries and the CLI, MCP, Evals, Web UI and Logfire integrations. The pydantic-ai-slim package is the minimal route: it installs the core and only the optional groups you list in square brackets. Each group maps to a named third-party dependency. For example, openai installs the openai package, bedrock installs boto3, web installs starlette and uvicorn, and temporal installs temporalio.

For TLS, the page says Pydantic AI's own HTTP requests, and those of providers migrated to httpx2 [https://httpx2.pydantic.dev/], verify certificates against the operating system trust store instead of a bundled certifi set. Providers whose SDKs still use legacy httpx, such as Groq and Cohere, keep certifi-based verification and take a legacy httpx.AsyncClient. How the library runs agents internally is not covered by this page.

Setup steps

The setup path in the page is short. Run pip install pydantic-ai, or uv add pydantic-ai inside a uv project, on Python 3.11 or newer. If you need more providers or integrations, add extras, for example pydantic-ai[bedrock,temporal]. If you want a smaller footprint and already know your provider, use pip install "pydantic-ai-slim[openai]" or the uv add equivalent.

For examples, run pip install "pydantic-ai[examples]" or uv add "pydantic-ai[examples]", then follow the examples setup page at [https://pydantic.dev/docs/ai/examples/setup/]. For observability, the page suggests running uvx logfire-cli wizard --task pydantic-ai once to set up Pydantic Logfire. Whether those steps succeed in a given environment is unverified.

Example

The page's own multi-provider example installs the slim package with three extras: pip install "pydantic-ai-slim[openai,google,logfire]", or uv add "pydantic-ai-slim[openai,google,logfire]". The command selects the OpenAI, Google and Logfire extras; the exact resolved dependency set is unverified.

The page contains no agent code, so there is no usage example to quote. The next step it names is the Agents guide at [https://pydantic.dev/docs/ai/core-concepts/agent/]. That guide is outside the selected scope.

Assessment & evidence

Limitations and cautions

This page covers installation only. It does not identify the Pydantic AI release documented, and it gives no release date, changelog, compatibility matrix or troubleshooting guide beyond the TLS notes. It makes no performance or reliability claims and offers no security assessment or test results, although it does describe certificate-verification behaviour. Installation success, the resolved dependency set and runtime behaviour are unverified.

The page presents pydantic-ai-slim as the way to avoid installing superfluous packages when you know which model you will use. It describes the legacy httpx support in the retries extra as lasting until Pydantic AI v3, and it distinguishes providers migrated to httpx2 from those still on legacy httpx, which accept different HTTP client types, so client configuration depends on the provider.

The page begins with a note asking agents that fetch pages on pydantic.dev to add intent, stack and harness query parameters, giving what they are trying to achieve, the language or framework context, and the agent harness and model, so the maintainers can see what agents are trying to do and fix first the pages where agents get stuck. The note says never to include personal, private or confidential information, only a short task description and tool names.

Reasoning behind the assessment

The page is concrete and checkable. Package names, extras and dependency names can be verified against PyPI, and the commands are standard pip and uv usage. Specific operational guidance, such as the TLS trust-store behaviour and which providers still use legacy httpx, suggests the page is maintained with real deployment problems in mind. That is an inference from the text and not something the page claims.

It is still a single page. It supports statements about how to install and which optional dependencies exist. It does not support claims about the library's quality, API stability, licence or pricing, so those remain unknown.

Alternatives and choices within the page

The page does not compare Pydantic AI with other agent frameworks.

The choices it does offer are internal. Full or slim: pydantic-ai bundles OpenAI, Anthropic, Google and several integrations, while pydantic-ai-slim lets you install only what you use. pip or uv: both pip and uv forms are shown for the package-installation examples, while the Logfire setup command is shown only as uvx logfire-cli wizard --task pydantic-ai. Direct provider access or the Pydantic AI Gateway: the page says the Gateway reaches several providers with one API key, though its terms are on a linked page outside the selected scope. Logfire or another observability tool: the page says you can use Logfire for local development even if your team uses another tool in production.

Evidence base

The source is the Pydantic AI Installation documentation page at [https://pydantic.dev/docs/ai/overview/install/index.md], as it stood on 13 November 2026. The whole page is covered: the opening note on agent query parameters, the default install, the next-steps links, the TLS certificate guidance, the running-examples section and the slim install with its list of optional groups.

Every statement about packages, extras, requirements and TLS behaviour comes from that page. Linked pages (the Agents guide, Logfire, Gateway, pricing, provider docs, examples setup, coding-agent skill, PyPI and GitHub pages) are excluded. Installation success, the resolved dependency set and runtime behaviour are unverified.

Access & freshness

Costs

The page does not state a price for the Python packages and does not discuss library licensing fees. Whether the library is free to use is therefore not established by this page.

Its one cost statement concerns Pydantic Logfire, which it says has a free tier requiring no credit card, with sign-up using just a GitHub account, and it links to [https://pydantic.dev/pricing/]. That pricing page is outside the selected scope, so the free tier's allowances and the prices of any other tiers are unknown. The page gives no pricing for the Pydantic AI Gateway and no rates for model providers such as OpenAI, Anthropic or Google; whether and how those charge is not covered by this page.

Rights and licence

The page does not state a licence for Pydantic AI, for the pydantic-ai-slim package, or for the documentation page itself. The licence therefore cannot be stated from this page. Check the PyPI project page [https://pypi.org/project/pydantic-ai/] and the GitHub repository before relying on it commercially.

The page says the examples directory is shipped as a separate package, pydantic-ai-examples [https://pypi.org/project/pydantic-ai-examples/], to make the examples easy to customise and run. It does not give the terms for reuse. No licence text or notice appears on the page, so reuse and redistribution rights for the examples and for the page text are unknown.

Freshness

The page reflects its state on 13 November 2026. It does not identify the Pydantic AI release documented and carries no last-updated date, so it is unknown which release it matches.

Some details are explicitly transitional: the page describes providers being migrated to httpx2 and says legacy httpx support in the retries extra lasts until Pydantic AI v3. When individual extras were introduced is unknown. Re-check the live page and PyPI metadata before copying commands into production setups.

Suggested actions

Before adopting, confirm your Python version is 3.11 or newer. Then choose between pydantic-ai, which already includes libraries for OpenAI, Anthropic and Google models plus the CLI, MCP, Evals, Web UI and Logfire integrations (other models or integrations need additional extras), and pydantic-ai-slim with only the extras you select. Install into a virtual environment or uv project so the dependencies stay isolated.

If you deploy in minimal container images or behind a corporate proxy with a private certificate authority, install the operating system CA certificates and your proxy's root CA in the image for Pydantic AI's own requests and for providers migrated to httpx2; for those providers, passing your own httpx2.AsyncClient through the http_client argument is an alternative. Providers on legacy httpx, such as Groq and Cohere, keep certifi-based verification and take a legacy httpx.AsyncClient instead. Check the exact extras you need against the current page and PyPI before pinning dependencies.

Before relying on it for work, check the licence on PyPI or GitHub, read the pricing page [https://pydantic.dev/pricing/] if you plan to use Logfire, check the Gateway documentation [https://pydantic.dev/docs/ai/overview/gateway/] for its terms if you plan to use it, and check whether your chosen model providers charge for usage rather than assuming either way. Then continue to the Agents guide at [https://pydantic.dev/docs/ai/core-concepts/agent/].

Evidence for this report

selected-page.txtselected · checked 2026-11-13