itechmeat/llm-code/pydantic-ai
Claude Code and agent skill by itechmeat/llm-code
- community
Checking that the SKILL.md file is still in the repository.
Pydantic AI Python agent framework. Covers typed tools, model providers, evals, MCP, UI adapters, and observability. Use when building Python AI agents with Pydantic AI, configuring model providers, implementing typed tools/dependencies, running evals, or integrating MCP servers. Keywords: pydantic-ai, agents, evals, MCP, Logfire.
Install
npx vskill@latest install itechmeat/llm-code/pydantic-aiSKILL.md
Pydantic AI
Python agent framework for building production-grade GenAI applications with the "FastAPI feeling".
Quick Navigation
| Topic | Reference | |
|---|---|---|
| Agents | agents.md | |
| Capabilities | agents.md | |
| Tools | tools.md | |
| Models | models.md | |
| Embeddings | embeddings.md | |
| Evals | evals.md | |
| Integrations | integrations.md | |
| Graphs | graphs.md | |
| UI Streams | ui.md | |
| Workspaces & Sandboxes | workspaces-and-sandboxes.md | |
| Realtime (speech-to-speech) | realtime.md | |
| MCP Apps | mcp-apps.md | |
| Decision Models | decision-models.md | |
| Security | security.md | |
| Installation | installation.md |
When to Use
- Building AI agents with structured output
- Need type-safe, IDE-friendly agent development
- Require dependency injection for tools
- Multi-model support (OpenAI, Anthropic, Gemini, etc.)
- Production observability with Logfire
- Complex workflows with graphs
Installation
See references/installation.md for full/slim install options and optional dependency groups. Requires Python 3.10+.
Release Highlights (2.49.0 -> 2.59.0)
- Security (upgrade): three advisories landed in this window - the local
web_fetchHTML conversion stall (High, GHSA-4whf-38hw-pxxh, fixed in2.59.0/v1.107.9), MCP server URLs/tokens/custom headers leaking into OpenTelemetry traces and URL-derived credential exposure (Medium, GHSA-xv4x-g8mx-ch56, fixed in2.58.0/v1.107.8), and client-triggered tool execution through the Vercel AI/AG-UI adapters with server-sidemessage_history(Medium, GHSA-5pfm-2g3g-gh85, fixed in2.58.0). Rotate MCP credentials when upgrading from below2.58.0. Details inreferences/security.md. - Workspaces and sandboxes (
2.52.0+):ctx.workspacegivesCoder,ShellandFileSystemone API for files and commands, running locally or in a sandbox with durable execution. New providers:SpritesSandbox(Fly.io Sprite),E2BSandbox,SSHWorkspace,BubblewrapSandbox, andDaytonaSandbox(2.59.0);ModalSandboxBackendreplacesModalSandboxSession.Coderfile tools get a retry budget of 5 and keep scratch files out of the project. Seereferences/workspaces-and-sandboxes.md. - Realtime (
2.49.0-2.59.0): OpenAI GPT-Live viaOpenAILiveModel(2.51.0) with browser WebRTC (2.52.0),ElevenLabsRealtimeModel(2.58.0),azure_voice_live_voice(2.52.0),gemini-3.8-live(2.50.0),RealtimeSession.wait_for_reply()(2.49.0),context_window_used(2.51.0), theasync_tool_call_modeprofile setting (2.52.0), and theAnswersRevised/OutputItemCutlifecycle events (2.59.0). Seereferences/realtime.md. - Provider-neutral errors (
2.59.0):ModelRateLimitError,ModelUnavailableError,ModelServerError,ModelContextWindowExceededError, plusModelHTTPError.for_categoryto map a raw provider error onto them. - MCP Apps (
2.57.0): tool results can carry resources and app surfaces, forwarded to the AG-UI and Vercel AI frontends.MCPToolset.read_resource_contentsandMCPToolset.call_tool_for_appread a resource or call an app-producing tool;ToolKindtyped tool parts (2.58.0) let any module emit a typed tool part. Seereferences/mcp-apps.md. - Decision models (
2.49.0-2.50.0):DecisionModel(the baseTypeSafeModelbuilds on) answers several questions in one call and routes from the answers, with route fields,decision_route_threshold,ModelSelectionContext.promptandRunContext.in_durable_context.TypeSafeModelgained "none of these" semantics and whole-numberChoiceoptions;BoolCriteriatypes boolean answers. Seereferences/decision-models.md. - Providers and models (
2.49.0-2.59.0): Claude Sonnet 5.5 (claude-sonnet-5-5) withAnthropicModeldefaultmax_tokensraised from 4096 to 16384 on Sonnet 4.5+ (and defaulting to the model's maximum output);MetaProviderfor Meta Muse (2.57.0); OpenAIgpt-6-sol/gpt-6-luna/gpt-6-astraon Bedrock Converse withtemperature/top_pdropped for GPT-5.6/GPT-6 there;GitHubCopilotProvidercan send a configurablecopilot-integration-id; shut-down Groq models (playai-tts,playai-tts-arabic,meta-llama/llama-guard-4-12b,meta-llama/llama-4-maverick-17b-128e-instruct) were removed. - Agent control (
2.57.0-2.59.0):DelegationTasks.steersteers a running delegated task;ModelSettings['max_retries'], whole-agenttimeout=andRunContext.deadline;ApprovalReviewerlets a model approve low-risk tool calls before a person sees them;on_change='append'for dynamic instruction prefixes (also opt-in onFunctionToolset.instructions);tool_calls_limitis checked before eachCodeModenested call;BackgroundToolsresults are framed as<tool_result>tool output;read_filecan return images and PDFs;SqliteStepStorestores each message once. - Breaking change (
2.52.0):SubAgentsno longer load agent files by default, andinherit_toolsis deprecated.
Release Highlights (2.40.0 -> 2.48.0)
- Security (upgrade) (
2.44.0, backported to1.107.6): four fixes reached throughweb_fetch_toolor OTel instrumentation — IPv6 zone-identifier bypass of the private-IP blocklist when local URLs are opted in, superlinearweb_fetchHTML/charset processing that could stall the event loop, domain blocklists compared without resolver normalization, and span content leaks withinclude_content=False(GHSA-vmxc-h2x2-jmf3, GHSA-fpf4-vwcp-v4hp, GHSA-22h6-qm39-v87j, GHSA-4x9p-g9wm-8q7f). - Realtime session control (
2.40.0/2.46.0):handle_barge_in=Truewithinterrupt(played_bytes=...),RealtimeSession.enqueue()for out-of-band prompts,respond=onsend(),wait_for_playback(), and@agent.on_eventlisteners. - Image generation (
2.41.0): directImageGeneratorAPI alongside the built-in tool;fallback_modelonImageGeneration/XSearchdeprecated in favor offallback_subagent_model. - Providers and models (
2.41.0/2.42.0/2.48.0):openai-codexprovider for ChatGPT/Codex subscription auth,GitHubCopilotProvider; OpenAIgpt-6-sol/gpt-6-lunaand Claude Opus 5.5 (claude-opus-5-5). - Pricing (
2.40.0):pydantic_ai.prices.update_in_background()refreshesgenai-pricesdata in the background. - Temporal (
2.46.0):event_stream_topiconTemporalDurabilitystreams agent events via Workflow Streams.
Release Highlights (2.23.0 -> 2.39.0)
- Realtime speech-to-speech (
2.28.0):Agent.realtime()with browser WebRTC plus server sideband support; Azure AI Voice Live via theazure_voice_livesetting (2.29.0);RealtimeSession.send_audio()accepts async iterables (2.36.0). - Run cancellation (
2.26.0):AgentRun.cancel(),RunContext.cancel(), andRunCancelled;stream_run_events()returns a publicAgentRunEventshandle withcancel()and run-state access. - Deferred tool reveal (
2.23.0/2.26.0/2.30.0):ToolAvailabilityDeltaPartwith nativetool_addition/additional_tools; tools can stay hidden until revealed via tool search,load_capability, orToolReturn.tools, on each provider's native deferral/addition channel; a deferred tool must be revealed before it can be called. - Cost tracking (
2.23.0):costonRunUsageandcost_limitonUsageLimits. Context window (2.38.0):context_windowonModelProfileandcontext_window_usedonRunContext. - Typed events (
2.38.0): application code and capabilities can emit typedCustomEvent/CapabilityEventinto the run event stream and subscribe with@on_event. Durable execution (2.36.0):@durable_operationfor capabilities plus a public backend API for third-party durable execution engines. - Providers and models: Crusoe (
2.28.0), Snowflake Cortex (2.27.0), and vLLM (2.38.0) providers;gemini-3.7-flash(2.30.0),gemini-3.8-flash(2.38.0), Claude Fable 5.1 / Mythos 5.1 (2.38.0), OpenAIgpt-6-astra(2.39.0), GLM-5.3 onZaiModel(2.34.0), DeepSeek V4 Flash (2.26.0). - MCP and HTTP clients:
MCPToolsetsupports FastMCP 4 and MCP SDK v2 alongside FastMCP 3 (2.29.0). Builds moved tohttpx2clients;pydantic-ai[anthropic]requiresanthropic>=1.0.0and a customAnthropicProviderhttp_clientmust be anhttpx2.AsyncClient(2.32.0/2.33.0). - `clai` CLI (
2.36.0):--mcp-configsupport and tool-call streaming. OpenRouter (2.30.0/2.32.0):openrouter:web_searchfor web search and web-search sources inprovider_details["annotations"]. - Security (upgrade):
2.24.0fixes unbounded memory in the localweb_fetchtool /FileUrlmedia downloads (GHSA-v2xh-2vp8-57h8);2.27.1fixes a low-severity retry-prompt redaction leak wheninclude_content=False(GHSA-3gh4-cghq-f8v4);2.28.0fixes a high-severity missing content-type check on the dev web chat UI so arbitrary cross-origin requests no longer run the agent (GHSA-h4xc-3qfq-jf93);2.30.0fixes DNS-rebinding viaHost-header validation on the dev web chat UI, with an opt-inallowed_hostsfor non-loopback deployments (GHSA-q2xc-rrxj-58x9).
Release Highlights (2.13.0 -> 2.22.0)
- Durability capabilities replace wrapper agents:
TemporalDurability,DBOSDurability, andPrefectDurability(2.14.0) attach to a regularAgentviacapabilities=[...], replacing the deprecatedTemporalAgent/DBOSAgent/PrefectAgentwrapper classes (removed in v3). Existing wrapper-based workflows keep replaying correctly after switching. Seeintegrations.mdfor the updated Temporal/DBOS/Prefect examples. - New models/providers: Claude Opus 5 (
2.20.0),gemini-3.6-flash/gemini-3.5-flash-lite(2.16.0), Mistralreasoning_effort(2.14.0) andmistral_prompt_cache_key(2.16.0), OpenAI explicit prompt caching forgpt-5.6(2.15.0),BedrockMantleProvider(2.18.0), and theAdvisorToolbuiltin tool for Anthropic/OpenRouter (2.18.0). - Usage & limits:
cache_hit_ratioonRequestUsage/RunUsage(2.13.0),ToolFailedfor model-visible failures that don't consume a retry (2.16.0), optionalrun_id=on runs (2.16.0), tool-retry budget overrides atrun/iter/overridetime (2.15.0), andper_request_input_tokens_limitonUsageLimits(2.21.0). - Error handling & instrumentation:
ModelHTTPErrornow carriesheadersand a parsedretry_afterfrom every provider SDK (2.19.0);RaiseContentFilterErrorcapability andinclude_model_request_parametersinstrumentation setting (2.13.0); per-message OTel serialization is cached to avoidO(n^2)cost (2.17.0). - Dependencies: the
fastmcpoptional group now constrainsfastmcp<4(2.19.0).
Release Highlights (2.0.0 -> 2.12.0)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pydantic-ai/SKILL.md
Popularity
- Repository stars
- 12
- 7-day trend score
- 13
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/itechmeat/llm-code/pydantic-ai)