PydanticAI
Agent Framework / shim to use Pydantic with LLMs
Pydantic AI
GenAI Agent Framework, the Pydantic way
Pydantic AI is a Python agent framework designed to make it less painful to build production grade applications with Generative AI.
Overview
Core Concepts
- Agents
- Agent Specs
- Capabilities
- Dependencies
- Direct Model Requests
- Hooks
- Messages and chat history
- Output
Models & Providers
- Anthropic
- Bedrock
- Cerebras
- Cohere
- Groq
- Hugging Face
- Mistral
- Ollama
- OpenAI
- OpenRouter
- Outlines
- Overview
- xAI
Tools & Toolsets
- Common Tools
- Deferred Tools
- Native Tools
- Third-Party Tools
- Function Tools
- Advanced Tool Features
- Toolsets
Advanced Features
Guides
MCP
Pydantic AI Harness
Pydantic Evals
- Overview
- Built-in Evaluators
- Custom Evaluators
- Third-Party Integrations
- LLM Judge
- Overview
- Report Evaluators
- Span-Based
- Simple Validation
- Core Concepts
- Quick Start
- Concurrency & Performance
- Dataset Management
- Dataset Serialization
- Case Lifecycle Hooks
- Logfire Integration
- Metrics & Attributes
- Multi-Run Evaluation
- Retry Strategies
- Online Evaluation
Pydantic Graph
Integrations
- Agent2Agent (A2A)
- Command Line Interface (CLI)
- DBOS
- Overview
- Prefect
- Restate
- Temporal
- Debugging & Monitoring with Pydantic Logfire
- AG-UI
- Overview
- Vercel AI
Examples
- Agent User Interaction (AG-UI)
- Flight Booking
- Question Graph
- Bank Support
- Chat App with FastAPI
- Data Analyst
- RAG
- SQL Generation
- Pydantic Model
- Weather Agent
- Setup
- Slack Lead Qualifier with Modal
- Stream Markdown
- Stream Whales
API Reference
- fasta2a
- pydantic_ai.models.anthropic
- pydantic_ai.models
- pydantic_ai.models.bedrock
- pydantic_ai.models.cerebras
- pydantic_ai.models.cohere
- pydantic_ai.models.fallback
- pydantic_ai.models.function
- pydantic_ai.models.google
- pydantic_ai.models.groq
- pydantic_ai.models.huggingface
- pydantic_ai.models.instrumented
- pydantic_ai.models.mcp_sampling
- pydantic_ai.models.mistral
- pydantic_ai.models.ollama
- pydantic_ai.models.openai
- pydantic_ai.models.openrouter
- pydantic_ai.models.outlines
- pydantic_ai.models.test
- pydantic_ai.models.wrapper
- pydantic_ai.models.xai
- pydantic_ai.ag_ui
- pydantic_ai.agent
- pydantic_ai.capabilities
- pydantic_ai.common_tools
- pydantic_ai — Concurrency
- pydantic_ai.direct
- pydantic_ai.durable_exec
- pydantic_ai.embeddings
- pydantic_ai.exceptions
- pydantic_ai.ext
- pydantic_ai.format_prompt
- pydantic_ai.function_signature
- pydantic_ai.mcp
- pydantic_ai.messages
- pydantic_ai.native_tools
- pydantic_ai.output
- pydantic_ai.profiles
- pydantic_ai.providers
- pydantic_ai.result
- pydantic_ai.retries
- pydantic_ai.run
- pydantic_ai.settings
- pydantic_ai.tools
- pydantic_ai.toolsets
- pydantic_ai.usage
- pydantic_evals.dataset
- pydantic_evals.evaluators
- pydantic_evals.generation
- pydantic_evals.lifecycle
- pydantic_evals.online
- pydantic_evals.online_capability
- pydantic_evals.otel
- pydantic_evals.reporting
- pydantic_graph.exceptions
- pydantic_graph.graph_builder
- pydantic_ai.ui.ag_ui
- pydantic_ai.ui
- pydantic_ai.ui.vercel_ai
Project
Meet the modern standard for public facing documentation. Beautiful out of the box, easy to maintain, and optimized for user engagement.
Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.
Build and deploy reliable background jobs with no timeouts and no infrastructure to manage.
Get the simple developer experience of SQLite in production, and scale your multi-tenant backend with unlimited databases.
Upstash is a serverless data platform providing low latency and high scalability for real-time applications.
One-click deployments built for teams, tuned for Laravel, loaded with tools and goodies you're going to love.