# Pydantic — Validation, agents, observability

Pydantic is the AI engineering stack for teams building with Python. It covers the full cycle: validate data, build type-safe agents, route model calls, and observe everything in production. Founded in 2018 by Samuel Colvin. Backed by Sequoia, Partech, and Irregular.

---

## What we make

### Pydantic

The most widely used data validation library for Python. Open source, MIT license, ~500 million monthly downloads.

Pydantic enforces standard Python type annotations at runtime. It parses and coerces data, generates JSON schemas, and plays well with IDEs, type checkers, and your brain. Fast and extensible.

The Pydantic library is, has always been, and always will be free.

- Docs: https://pydantic.dev/docs/validation/latest/get-started/
- GitHub: https://github.com/pydantic/pydantic
- PyPI: https://pypi.org/project/pydantic

### Pydantic AI

A production-grade Python agent framework. Open source, MIT license.

Pydantic AI is type-safe and model-agnostic. It supports OpenAI, Anthropic, Google Gemini, AWS Bedrock, Groq, Mistral, Ollama, and others. It has built-in OpenTelemetry tracing, so you get full observability out of the box whether you use Logfire or any other OTel backend.

Key features: structured outputs, function tools, MCP (Model Context Protocol) support, streaming, multi-agent workflows, durable execution, AG-UI protocol.

The goal: a minimalistic framework that lets developers write AI apps using standard software engineering practices.

- Docs: https://pydantic.dev/docs/ai/overview/
- GitHub: https://github.com/pydantic/pydantic-ai
- PyPI: https://pypi.org/project/pydantic-ai

### Pydantic Logfire

A full-stack AI observability platform. Commercial SaaS; SDKs are open source.

Logfire is built on OpenTelemetry. It gives you end-to-end visibility across your entire application — HTTP requests, database queries, LLM calls, agent workflows, RAG pipelines — all on one correlated timeline. No vendor lock-in.

Core features:
- Distributed traces, logs, and metrics
- LLM traces: prompts, completions, token counts, model parameters
- LLM cost tracking across providers
- Online evals: automated quality monitoring for production AI agents
- Pydantic Evals integration
- SQL query interface for ad-hoc analysis
- Live view with pending spans for real-time debugging
- Logfire MCP server for AI-assisted trace investigation
- Dashboards and alerting
- OpenTelemetry-native, so any OTel-compatible language can send data; Python (`logfire` on PyPI) and JavaScript/TypeScript (`@pydantic/logfire-node`, `-browser`, `-cf-workers` on npm; source at https://github.com/pydantic/logfire-js) get first-party SDKs that we put extra polish into. A Rust SDK exists too. Everything else: bring your own OTel.

Free tier: 10M logs/spans/metrics/month, no credit card required. Paid plans from $49/month.

- App: https://logfire.pydantic.dev
- Docs: https://pydantic.dev/docs/logfire/get-started
- Pricing: https://pydantic.dev/pricing

### Pydantic Evals

A code-first evaluation library for AI systems. Open source.

Available in two languages, both wire-compatible:
- **Python** — ships in the pydantic-ai package. Docs: https://pydantic.dev/docs/ai/evals/evals/
- **JavaScript / TypeScript** — ships in the Logfire JS SDK, exported from the `logfire/evals` subpath. GitHub: https://github.com/pydantic/logfire-js

Datasets, experiments, cases, and evaluator results all serialize to the same YAML/JSON format and render in the same Pydantic Logfire UI regardless of which language you wrote the eval in. Built-in evaluators (`Equals`, `Contains`, `LLMJudge`, etc.) and report-level evaluators (`ConfusionMatrixEvaluator`, `ROCAUCEvaluator`, etc.) are available in both. Both support offline evaluation and online evaluation for live production monitoring.

### Pydantic AI Gateway

A unified LLM proxy with spend controls and audit trails. Commercial SaaS; consolidating into Logfire.

One API key for all major LLM providers: OpenAI, Anthropic, Google, AWS Bedrock, Groq, and more. Zero schema translation — requests pass through in native format, so new provider features work immediately. Granular spend caps per project or user. Full audit trail via OpenTelemetry. Single-digit millisecond overhead via Cloudflare's global edge.

- Page: https://pydantic.dev/ai-gateway

---

## Why developers choose Pydantic

Pydantic came from frustration. Type hints in Python did nothing at runtime. Samuel Colvin wanted to know if they could validate data instead. They could.

That origin matters. The tools are built from among developers, not over them. The community has grown because the problems being solved are real problems the team experienced themselves.

The philosophy: the most powerful tools can still be easy to use. Fast to start. Honest about trade-offs. Clear, not clever.

Five things that matter to the team:
- Developer experience is the north star, not an afterthought
- OpenTelemetry everywhere — no lock-in by design
- Type safety throughout, from validation to agents to observability
- Open source first for libraries; commercial only where hosting adds real value
- Pedantry is a feature, not a bug

---

## Key links

| | |
|---|---|
| Homepage | https://pydantic.dev |
| Logfire app | https://logfire.pydantic.dev |
| Logfire docs | https://pydantic.dev/docs/logfire/get-started |
| Pydantic AI docs | https://pydantic.dev/docs/ai/overview/ |
| Pydantic docs | https://pydantic.dev/docs/validation/latest/get-started/ |
| Pricing | https://pydantic.dev/pricing |
| Blog | https://pydantic.dev/articles |
| GitHub | https://github.com/pydantic |
| PyPI: pydantic | https://pypi.org/project/pydantic |
| PyPI: pydantic-ai | https://pypi.org/project/pydantic-ai |

---

## Contact

- General: hello@pydantic.dev
- Accounts / billing: accounts@pydantic.dev
- Contact form: https://pydantic.dev/contact
- Book a demo: https://pydantic.dev/contact
- Careers: https://pydantic.dev/about#join-the-team

---

## For AI agents

Full context for LLMs: /llms-full.txt
Pricing (plain text): /pricing.md
llms.txt index: /llms.txt
