# Pydantic AI

> GenAI Agent Framework, the Pydantic way

- Skill: `hk-vk/pydantic-ai` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hk-vk/pydantic-ai`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hk-vk/pydantic-ai/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: hk-vk (https://skillmd.com/u/hk-vk)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/hk-vk/pydantic-ai

---


# 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.

## Available Resources

### Overview

- **Coding Agent Skills**
  - URL: https://pydantic.dev/docs/ai/overview/coding-agent-skills/index.md

- **Pydantic AI Gateway**
  - URL: https://pydantic.dev/docs/ai/overview/gateway/index.md

- **Getting Help**
  - URL: https://pydantic.dev/docs/ai/overview/help/index.md

- **Installation**
  - URL: https://pydantic.dev/docs/ai/overview/install/index.md

- **Troubleshooting**
  - URL: https://pydantic.dev/docs/ai/overview/troubleshooting/index.md

### Core Concepts

- **Agents**
  - URL: https://pydantic.dev/docs/ai/core-concepts/agent/index.md

- **Agent Specs**
  - URL: https://pydantic.dev/docs/ai/core-concepts/agent-spec/index.md

- **Capabilities**
  - URL: https://pydantic.dev/docs/ai/core-concepts/capabilities/index.md

- **Dependencies**
  - URL: https://pydantic.dev/docs/ai/core-concepts/dependencies/index.md

- **Direct Model Requests**
  - URL: https://pydantic.dev/docs/ai/core-concepts/direct/index.md

- **Hooks**
  - URL: https://pydantic.dev/docs/ai/core-concepts/hooks/index.md

- **Messages and chat history**
  - URL: https://pydantic.dev/docs/ai/core-concepts/message-history/index.md

- **Output**
  - URL: https://pydantic.dev/docs/ai/core-concepts/output/index.md

### Models & Providers

- **Anthropic**
  - URL: https://pydantic.dev/docs/ai/models/anthropic/index.md

- **Bedrock**
  - URL: https://pydantic.dev/docs/ai/models/bedrock/index.md

- **Cerebras**
  - URL: https://pydantic.dev/docs/ai/models/cerebras/index.md

- **Cohere**
  - URL: https://pydantic.dev/docs/ai/models/cohere/index.md

- **Google**
  - URL: https://pydantic.dev/docs/ai/models/google/index.md

- **Groq**
  - URL: https://pydantic.dev/docs/ai/models/groq/index.md

- **Hugging Face**
  - URL: https://pydantic.dev/docs/ai/models/huggingface/index.md

- **Mistral**
  - URL: https://pydantic.dev/docs/ai/models/mistral/index.md

- **Ollama**
  - URL: https://pydantic.dev/docs/ai/models/ollama/index.md

- **OpenAI**
  - URL: https://pydantic.dev/docs/ai/models/openai/index.md

- **OpenRouter**
  - URL: https://pydantic.dev/docs/ai/models/openrouter/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/models/overview/index.md

- **xAI**
  - URL: https://pydantic.dev/docs/ai/models/xai/index.md

### Tools & Toolsets

- **Common Tools**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/common-tools/index.md

- **Deferred Tools**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/deferred-tools/index.md

- **Native Tools**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/native-tools/index.md

- **Third-Party Tools**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/third-party-tools/index.md

- **Function Tools**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/tools/index.md

- **Advanced Tool Features**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/tools-advanced/index.md

- **Toolsets**
  - URL: https://pydantic.dev/docs/ai/tools-toolsets/toolsets/index.md

### Advanced Features

- **Image, Audio, Video & Document Input**
  - URL: https://pydantic.dev/docs/ai/advanced-features/input/index.md

- **HTTP Request Retries**
  - URL: https://pydantic.dev/docs/ai/advanced-features/retries/index.md

- **Thinking**
  - URL: https://pydantic.dev/docs/ai/advanced-features/thinking/index.md

### Guides

- **Embeddings**
  - URL: https://pydantic.dev/docs/ai/guides/embeddings/index.md

- **Extensibility**
  - URL: https://pydantic.dev/docs/ai/guides/extensibility/index.md

- **Multi-Agent Patterns**
  - URL: https://pydantic.dev/docs/ai/guides/multi-agent-applications/index.md

- **Testing**
  - URL: https://pydantic.dev/docs/ai/guides/testing/index.md

- **Web Chat UI**
  - URL: https://pydantic.dev/docs/ai/guides/web/index.md

### MCP

- **Client**
  - URL: https://pydantic.dev/docs/ai/mcp/client/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/mcp/overview/index.md

- **Server**
  - URL: https://pydantic.dev/docs/ai/mcp/server/index.md

### Pydantic AI Harness

- **Code Mode**
  - URL: https://pydantic.dev/docs/ai/harness/code-mode/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/harness/overview/index.md

### Pydantic Evals

- **Overview**
  - URL: https://pydantic.dev/docs/ai/evals/evals/index.md

- **Built-in Evaluators**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/built-in/index.md

- **Custom Evaluators**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/custom/index.md

- **Third-Party Integrations**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/framework-integrations/index.md

- **LLM Judge**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/llm-judge/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/overview/index.md

- **Report Evaluators**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/report-evaluators/index.md

- **Span-Based**
  - URL: https://pydantic.dev/docs/ai/evals/evaluators/span-based/index.md

- **Simple Validation**
  - URL: https://pydantic.dev/docs/ai/evals/examples/simple-validation/index.md

- **Core Concepts**
  - URL: https://pydantic.dev/docs/ai/evals/getting-started/core-concepts/index.md

- **Quick Start**
  - URL: https://pydantic.dev/docs/ai/evals/getting-started/quick-start/index.md

- **Concurrency & Performance**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/concurrency/index.md

- **Dataset Management**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/dataset-management/index.md

- **Dataset Serialization**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/dataset-serialization/index.md

- **Case Lifecycle Hooks**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/lifecycle/index.md

- **Logfire Integration**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/logfire-integration/index.md

- **Metrics & Attributes**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/metrics-attributes/index.md

- **Multi-Run Evaluation**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/multi-run/index.md

- **Retry Strategies**
  - URL: https://pydantic.dev/docs/ai/evals/how-to/retry-strategies/index.md

- **Online Evaluation**
  - URL: https://pydantic.dev/docs/ai/evals/online-evaluation/index.md

### Pydantic Graph

- **Decisions**
  - URL: https://pydantic.dev/docs/ai/graph/builder/decisions/index.md

- **Getting Started**
  - URL: https://pydantic.dev/docs/ai/graph/builder/index.md

- **Joins & Reducers**
  - URL: https://pydantic.dev/docs/ai/graph/builder/joins/index.md

- **Parallel Execution**
  - URL: https://pydantic.dev/docs/ai/graph/builder/parallel/index.md

- **Steps**
  - URL: https://pydantic.dev/docs/ai/graph/builder/steps/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/graph/graph/index.md

### Integrations

- **Command Line Interface (CLI)**
  - URL: https://pydantic.dev/docs/ai/integrations/cli/index.md

- **Apache Airflow**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/airflow/index.md

- **DBOS**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/dbos/index.md

- **Kitaru**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/kitaru/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/overview/index.md

- **Prefect**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/prefect/index.md

- **Restate**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/restate/index.md

- **Temporal**
  - URL: https://pydantic.dev/docs/ai/integrations/durable_execution/temporal/index.md

- **Debugging & Monitoring with Pydantic Logfire**
  - URL: https://pydantic.dev/docs/ai/integrations/logfire/index.md

- **AG-UI**
  - URL: https://pydantic.dev/docs/ai/integrations/ui/ag-ui/index.md

- **Overview**
  - URL: https://pydantic.dev/docs/ai/integrations/ui/overview/index.md

- **Vercel AI**
  - URL: https://pydantic.dev/docs/ai/integrations/ui/vercel-ai/index.md

### Examples

- **Agent User Interaction (AG-UI)**
  - URL: https://pydantic.dev/docs/ai/examples/ag-ui/index.md

- **Bank Support**
  - URL: https://pydantic.dev/docs/ai/examples/conversational-agents/bank-support/index.md

- **Chat App with FastAPI**
  - URL: https://pydantic.dev/docs/ai/examples/conversational-agents/chat-app/index.md

- **Data Analyst**
  - URL: https://pydantic.dev/docs/ai/examples/data-analytics/data-analyst/index.md

- **RAG**
  - URL: https://pydantic.dev/docs/ai/examples/data-analytics/rag/index.md

- **SQL Generation**
  - URL: https://pydantic.dev/docs/ai/examples/data-analytics/sql-gen/index.md

- **Flight Booking**
  - URL: https://pydantic.dev/docs/ai/examples/flight-booking/index.md

- **Pydantic Model**
  - URL: https://pydantic.dev/docs/ai/examples/getting-started/pydantic-model/index.md

- **Weather Agent**
  - URL: https://pydantic.dev/docs/ai/examples/getting-started/weather-agent/index.md

- **Setup**
  - URL: https://pydantic.dev/docs/ai/examples/setup/index.md

- **Slack Lead Qualifier with Modal**
  - URL: https://pydantic.dev/docs/ai/examples/slack-lead-qualifier/index.md

- **Stream Markdown**
  - URL: https://pydantic.dev/docs/ai/examples/streaming/stream-markdown/index.md

- **Stream Whales**
  - URL: https://pydantic.dev/docs/ai/examples/streaming/stream-whales/index.md

### API Reference

- **Link**: [](
  - URL: https://pydantic.dev/docs/ai/api/builtin_tools/index.md)

- **pydantic_ai.models.anthropic**
  - URL: https://pydantic.dev/docs/ai/api/models/anthropic/index.md

- **pydantic_ai.models**
  - URL: https://pydantic.dev/docs/ai/api/models/base/index.md

- **pydantic_ai.models.bedrock**
  - URL: https://pydantic.dev/docs/ai/api/models/bedrock/index.md

- **pydantic_ai.models.cerebras**
  - URL: https://pydantic.dev/docs/ai/api/models/cerebras/index.md

- **pydantic_ai.models.cohere**
  - URL: https://pydantic.dev/docs/ai/api/models/cohere/index.md

- **pydantic_ai.models.fallback**
  - URL: https://pydantic.dev/docs/ai/api/models/fallback/index.md

- **pydantic_ai.models.function**
  - URL: https://pydantic.dev/docs/ai/api/models/function/index.md

- **pydantic_ai.models.google**
  - URL: https://pydantic.dev/docs/ai/api/models/google/index.md

- **pydantic_ai.models.groq**
  - URL: https://pydantic.dev/docs/ai/api/models/groq/index.md

- **pydantic_ai.models.huggingface**
  - URL: https://pydantic.dev/docs/ai/api/models/huggingface/index.md

- **pydantic_ai.models.instrumented**
  - URL: https://pydantic.dev/docs/ai/api/models/instrumented/index.md

- **pydantic_ai.models.mcp_sampling**
  - URL: https://pydantic.dev/docs/ai/api/models/mcp-sampling/index.md

- **pydantic_ai.models.mistral**
  - URL: https://pydantic.dev/docs/ai/api/models/mistral/index.md

- **pydantic_ai.models.ollama**
  - URL: https://pydantic.dev/docs/ai/api/models/ollama/index.md

- **pydantic_ai.models.openai**
  - URL: https://pydantic.dev/docs/ai/api/models/openai/index.md

- **pydantic_ai.models.openrouter**
  - URL: https://pydantic.dev/docs/ai/api/models/openrouter/index.md

- **pydantic_ai.models.test**
  - URL: https://pydantic.dev/docs/ai/api/models/test/index.md

- **pydantic_ai.models.wrapper**
  - URL: https://pydantic.dev/docs/ai/api/models/wrapper/index.md

- **pydantic_ai.models.xai**
  - URL: https://pydantic.dev/docs/ai/api/models/xai/index.md

- **pydantic_ai.agent**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/agent/index.md

- **pydantic_ai.capabilities**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/capabilities/index.md

- **pydantic_ai.common_tools**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/common_tools/index.md

- **pydantic_ai — Concurrency**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/concurrency/index.md

- **pydantic_ai.direct**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/direct/index.md

- **pydantic_ai.durable_exec**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/durable_exec/index.md

- **pydantic_ai.embeddings**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/embeddings/index.md

- **pydantic_ai.exceptions**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/exceptions/index.md

- **pydantic_ai.ext**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/ext/index.md

- **pydantic_ai.format_prompt**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/format_prompt/index.md

- **pydantic_ai.function_signature**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/function_signature/index.md

- **pydantic_ai.mcp**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/mcp/index.md

- **pydantic_ai.messages**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/messages/index.md

- **pydantic_ai.native_tools**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/native_tools/index.md

- **pydantic_ai.output**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/output/index.md

- **pydantic_ai.profiles**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/profiles/index.md

- **pydantic_ai.providers**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/providers/index.md

- **pydantic_ai.result**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/result/index.md

- **pydantic_ai.retries**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/retries/index.md

- **pydantic_ai.run**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/run/index.md

- **pydantic_ai.settings**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/settings/index.md

- **pydantic_ai.tools**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/tools/index.md

- **pydantic_ai.toolsets**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/toolsets/index.md

- **pydantic_ai.usage**
  - URL: https://pydantic.dev/docs/ai/api/pydantic-ai/usage/index.md

- **pydantic_evals.dataset**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/dataset/index.md

- **pydantic_evals.evaluators**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/evaluators/index.md

- **pydantic_evals.generation**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/generation/index.md

- **pydantic_evals.lifecycle**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/lifecycle/index.md

- **pydantic_evals.online**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/online/index.md

- **pydantic_evals.online_capability**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/online_capability/index.md

- **pydantic_evals.otel**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/otel/index.md

- **pydantic_evals.reporting**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_evals/reporting/index.md

- **pydantic_graph.basenode**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/basenode/index.md

- **pydantic_graph.decision**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/decision/index.md

- **pydantic_graph.exceptions**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/exceptions/index.md

- **pydantic_graph.graph_builder**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/graph_builder/index.md

- **pydantic_graph.join**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/join/index.md

- **pydantic_graph.node**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/node/index.md

- **pydantic_graph.step**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/step/index.md

- **pydantic_graph.util**
  - URL: https://pydantic.dev/docs/ai/api/pydantic_graph/util/index.md

- **pydantic_ai.ui.ag_ui**
  - URL: https://pydantic.dev/docs/ai/api/ui/ag_ui/index.md

- **pydantic_ai.ui**
  - URL: https://pydantic.dev/docs/ai/api/ui/base/index.md

- **pydantic_ai.ui.vercel_ai**
  - URL: https://pydantic.dev/docs/ai/api/ui/vercel_ai/index.md

### Project

- **Upgrade Guide**
  - URL: https://pydantic.dev/docs/ai/project/changelog/index.md

- **Contributing**
  - URL: https://pydantic.dev/docs/ai/project/contributing/index.md

- **Version Policy**
  - URL: https://pydantic.dev/docs/ai/project/version-policy/index.md

## How to Use This Skill

Reference these resources when working with Pydantic AI.
