pydantic/pydantic-ai B

How Python does AI. Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.

View on GitHub ↗

Rank#455
Future score71.7/100
Stars21k
Forks3.1k
stars / year8.9k
LanguagePython
LicenseMIT
Size357.8 MB
Created2024-06-21
Last update2026-11-04

pydantic/pydantic-ai is an AI agent written in Python, first published on 2024-06-21. It has 21,017 stars and 3,094 forks, and gains about 8,858 new stars a year. Its code was last updated today. It is released under the MIT license: you can use, change and sell it, as long as you keep the copyright notice.

OpenShelf gives it a future score of 71.7/100 (tier B) because it shows: fast growth, active updates, a hot AI trend.

Get it

Clone a lightweight copy (latest commit only):

git clone --depth 1 https://github.com/pydantic/pydantic-ai.git

Skills & agents from this repo

add-new-model

Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry.

skillpydantic/pydantic-ai

adding-a-provider-api-feature

Add a new provider API capability (prompt caching, strict/structured tool calling, thinking/reasoning effort, service tier, safety settings, logprobs, etc.) to Pydantic AI. Use when wiring a provider feature through the library — it enforces reasoning from the existing cross-provider abstraction before designing anything, and picking default-on vs opt-in deliberately. Not for adding a new model id

skillpydantic/pydantic-ai

adopt-pr

Bootstrap branch-context on an existing PR that wasn't started via /initialize-worktree. Writes issue-brief.md from the linked issue(s) + current PR state, and backfills pr-decisions.md with decision-bearing entries from already-resolved review threads. Use when picking up a PR mid-flight (either yours or someone else's) without prior local context.

skillpydantic/pydantic-ai

branch-context

Branch-local durable PR state — issue brief, decisions log, and session handoffs. Read the brief, decisions and handoffs index every session; persist decisions as you work; hand off only on user request or explicit session turnover.

skillpydantic/pydantic-ai

building-pydantic-ai-agents

Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), workspaces, structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydantic_ai, or asks to build an AI agent, add tools/capabilities, attach a workspace, defer capability loading, stream output, define agents from YAML, or test agent behavior.

skillpydantic/pydantic-ai

complete-partial-pr

Evaluate and complete an issue or PR where the submitted patch fixes only a narrow symptom of the reported pain point. Use when a contribution may miss adjacent integration surfaces, provider/spec semantics, roundtrip behavior, tests, docs, or historical maintainer decisions.

skillpydantic/pydantic-ai

docs-parity-reviewer

Use as the final documentation gate before a `pydantic-ai-harness` capability PR merges. Verifies that a user-facing change keeps the capability README under `src/pydantic_ai_harness/pydantic_ai_harness/` and its `docs/harness/` page in sync with each other and with the code, that every snippet is runnable, and that links follow repo convention. Reports gaps; does not edit. Skip it for changes tha

skillpydantic/pydantic-ai

file-followup-issue

Capture a real, net-positive bug or improvement you discovered that is OUT OF SCOPE for the current PR — the PR already closes its issue and is stable, and the new work is non-trivial (adds its own decisions, carries uncertainty, or widens blast radius beyond what the issue needed). Opens a GitHub issue with full context for a future session and does NOT touch the current PR. NOT for trivial in-sc

skillpydantic/pydantic-ai

i-have-adhd

Shape every response for an ADHD reader who reviews the work but does not do the coding — the agent does. Use whenever responding to ANY message — coding, debugging, planning, casual. Lead with the result or the decision. Surface anything needing the user's input as a structured question, never buried in prose they'll skim past. No preamble, no recap, no closers. State errors matter-of-factly. Mak

skillpydantic/pydantic-ai

initialize-worktree

Study a problem or GitHub issue in a fresh worktree, plan a fix, optionally implement it, and open the initial PR. Use when starting work on a new problem — not for advancing existing PRs.

skillpydantic/pydantic-ai

migrating-agno-to-pydantic-ai

Migrate Python Agno applications to Pydantic AI and, only when needed, Pydantic AI Harness. Use when source code imports `agno` or relies on Agno agents, teams, workflows, sessions, memory, knowledge, tools, hooks, guardrails, approvals, skills, streaming, or AgentOS.

skillpydantic/pydantic-ai

migrating-claude-agent-sdk-to-pydantic-ai

Migrate Python applications from the Claude Agent SDK to Pydantic AI and, only when needed, Pydantic AI Harness. Use when source code imports `claude_agent_sdk` or relies on Claude Code's agent loop, sessions, built-in tools, hooks, permissions, skills, or subagents. Do not use for the Anthropic Messages SDK or Claude Managed Agents.

skillpydantic/pydantic-ai

migrating-deep-agents-to-pydantic-ai-harness

Migrate Python LangChain Deep Agents applications to Pydantic AI and Pydantic AI Harness. Use when the source uses the upstream `deepagents` package or demonstrably reproduces its middleware, backends, skills, memory, subagents, or sandbox contracts. Use `migrating-langchain-to-pydantic-ai` for plain LangChain, LangGraph, or LCEL migrations and `pydantic-ai-harness` for greenfield Harness usage.

skillpydantic/pydantic-ai

migrating-google-adk-to-pydantic-ai

Migrate Python Google Agent Development Kit (ADK) applications to Pydantic AI. Use for `LlmAgent`, `Runner`, sessions, state, memory, tools, callbacks, plugins, graph or dynamic workflows, resumability, events, artifacts, MCP, and ADK deployment boundaries.

skillpydantic/pydantic-ai

migrating-langchain-to-pydantic-ai

Migrate Python LangChain, LangGraph, or Deep Agents applications to Pydantic AI and, when the source uses harness features, Pydantic AI Harness. Use for LangChain agents, chains, LCEL, direct LangGraph graphs, persistence, interrupts, streaming, and `create_deep_agent` projects with planning, filesystem or sandbox backends, skills, memory, subagents, permissions, approvals, or Deep Agents Code hos

skillpydantic/pydantic-ai

migrating-mastra-to-pydantic-ai

Migrate TypeScript Mastra applications to Python with Pydantic AI and, only when needed, Pydantic AI Harness. Use when source code imports `@mastra/*` or relies on Mastra agents, tools, workflows, memory, processors, streaming, approvals, skills, or subagents.

skillpydantic/pydantic-ai

migrating-openai-agents-sdk-to-pydantic-ai

Migrate Python OpenAI Agents SDK applications to Pydantic AI and, when warranted, Pydantic AI Harness. Use for `agents.Agent`, `Runner`, function tools, handoffs, guardrails, sessions, human approval, streaming, or `SandboxAgent`. Do not use for applications built directly on the OpenAI Responses API without the Agents SDK runtime.

skillpydantic/pydantic-ai

migrating-pi-to-pydantic-ai

Migrate TypeScript Pi coding-agent applications, extensions, or packages to Python with Pydantic AI and Pydantic AI Harness. Use when source code imports `@earendil-works/pi-*`, calls `createAgentSession`, registers Pi extensions, or relies on Pi tools, hooks, skills, sessions, compaction, providers, TUI, RPC, or packages.

skillpydantic/pydantic-ai

migrating-vercel-ai-sdk-and-eve-to-pydantic-ai

Migrate TypeScript Vercel AI SDK or Eve applications to Python with Pydantic AI and, only when needed, Pydantic AI Harness. Use when source code imports `ai`, `@ai-sdk/*`, or `eve`, or relies on `generateText`, `streamText`, `ToolLoopAgent`, `useChat`, Eve agents, tools, skills, subagents, approvals, sessions, channels, schedules, or sandboxes.

skillpydantic/pydantic-ai

poweruser-feature-audit

Independent power-user audit of a big new-feature PR. Research the feature domain from external sources before reading any implementation code, design the ideal test suite from a power-user's perspective, then gap-compare it against the PR to produce evidence-backed, precedent-linked review items. Use when a large feature PR (new provider API surface, new modality, new subsystem) needs an unbiased

skillpydantic/pydantic-ai

pre-push-review

Review candidate content locally under the scope, exemptions, and three-review budget

skillpydantic/pydantic-ai

pushing-commits-to-the-repo

Open and advance a PR — write current metadata, apply the bounded pre-push review gate

skillpydantic/pydantic-ai

pydantic-ai-harness

Extend Pydantic AI agents with capabilities from pydantic-ai-harness -- the Coder coding agent, file and shell tools in local or sandboxed workspaces (Modal, E2B, Render, Sprites, Daytona, boxd, smolvm, BoxLite), Code Mode, sub-agents and planning, memory and skills, context compaction, guardrails and spend limits, web research and browsers, hosted SaaS integrations, step persistence, and backgrou

skillpydantic/pydantic-ai

refresh-issue-brief

Re-fetch the GitHub issue(s) linked in issue-brief.md and update the brief if new comments shift scope, criteria, or constraints. User-invoked only — never run automatically. Use when the user flags new issue activity (e.g. "check the latest comments on the issue").

skillpydantic/pydantic-ai

testing-skill

Record, rewrite, and debug VCR cassettes for HTTP recordings. Use when running tests with --record-mode, verifying cassette playback, or inspecting request/response bodies in YAML cassettes.

skillpydantic/pydantic-ai

Related repos