pydantic-ai

pydantic-ai is a skill for Claude Code, Codex from itechmeat/llm-code. It costs 80 tokens per session (6,579 once invoked), scanned A, original, MIT.

A Python framework for building AI agents—programs that use language models to perform tasks through instructions and tools. It supports structured results, different model providers, testing agent behavior, shared dependencies, and multi-step workflows.

In plain words
What is it for?
Use it to build Python agents, connect models from providers such as OpenAI, Anthropic, or Gemini, define typed tools, run evaluations, and connect MCP servers.
Why use it?
It helps keep agent inputs, outputs, and tool calls clearly defined while giving developers ways to test and observe how agents behave.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Codex.

Good fit Use it to build Python agents, connect models from providers such as OpenAI, Anthropic, or Gemini, define typed tools, run evaluations, and connect MCP servers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/itechmeat/llm-code/pydantic-ai
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add itechmeat/llm-code --skill pydantic-ai
Clone the repo
git clone --depth 1 https://github.com/itechmeat/llm-code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pydantic-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/itechmeat/llm-code/pydantic-ai/github.svg)](https://agentmods.dev/skills/itechmeat/llm-code/pydantic-ai)
Your own site
<a href="https://agentmods.dev/skills/itechmeat/llm-code/pydantic-ai"><img src="https://agentmods.dev/badge/skills/itechmeat/llm-code/pydantic-ai/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pydantic-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/itechmeat/llm-code/pydantic-ai"><img src="https://agentmods.dev/badge/skills/itechmeat/llm-code/pydantic-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,579 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.06579
Opus 5.5 $0.00032 $0.02632
Sonnet 5.5 $0.00016 $0.01316
Haiku 4.5 $0.00008 $0.00658

Measured 1mo ago against content hash 36f7c74525f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pydantic-ai scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pydantic-ai/SKILL.md · 344 lines

How it starts

The opening of the file, as written. The whole thing — 344 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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_fetch HTML conversion stall (High, GHSA-4whf-38hw-pxxh, fixed in 2.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 in 2.58.0/v1.107.8), and client-triggered tool execution through the Vercel AI/AG-UI adapters with server-side message_history (Medium, GHSA-5pfm-2g3g-gh85, fixed in 2.58.0). Rotate MCP credentials when upgrading from below 2.58.0. Details in references/security.md.
  • Workspaces and sandboxes (2.52.0+): ctx.workspace gives Coder, Shell and FileSystem one API for files and commands, running locally or in a sandbox with durable execution. New providers: SpritesSandbox (Fly.io Sprite), E2BSandbox, SSHWorkspace, BubblewrapSandbox, and DaytonaSandbox (2.59.0); ModalSandboxBackend replaces ModalSandboxSession. Coder file tools get a retry budget of 5 and keep scratch files out of the project. See references/workspaces-and-sandboxes.md.
  • Realtime (2.49.0 - 2.59.0): OpenAI GPT-Live via OpenAILiveModel (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), the async_tool_call_mode profile setting (2.52.0), and the AnswersRevised / OutputItemCut lifecycle events (2.59.0). See references/realtime.md.
  • Provider-neutral errors (2.59.0): ModelRateLimitError, ModelUnavailableError, ModelServerError, ModelContextWindowExceededError, plus ModelHTTPError.for_category to 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_contents and MCPToolset.call_tool_for_app read a resource or call an app-producing tool; ToolKind typed tool parts (2.58.0) let any module emit a typed tool part. See references/mcp-apps.md.
  • Decision models (2.49.0 - 2.50.0): DecisionModel (the base TypeSafeModel builds on) answers several questions in one call and routes from the answers, with route fields, decision_route_threshold, ModelSelectionContext.prompt and RunContext.in_durable_context. TypeSafeModel gained "none of these" semantics and whole-number Choice options; BoolCriteria types boolean answers. See references/decision-models.md.
  • Providers and models (2.49.0 - 2.59.0): Claude Sonnet 5.5 (claude-sonnet-5-5) with AnthropicModel default max_tokens raised from 4096 to 16384 on Sonnet 4.5+ (and defaulting to the model's maximum output); MetaProvider for Meta Muse (2.57.0); OpenAI gpt-6-sol/gpt-6-luna/gpt-6-astra on Bedrock Converse with temperature/top_p dropped for GPT-5.6/GPT-6 there; GitHubCopilotProvider can send a configurable copilot-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.steer steers a running delegated task; ModelSettings['max_retries'], whole-agent timeout= and RunContext.deadline; ApprovalReviewer lets a model approve low-risk tool calls before a person sees them; on_change='append' for dynamic instruction prefixes (also opt-in on FunctionToolset.instructions); tool_calls_limit is checked before each CodeMode nested call; BackgroundTools results are framed as <tool_result> tool output; read_file can return images and PDFs; SqliteStepStore stores each message once.
  • Breaking change (2.52.0): SubAgents no longer load agent files by default, and inherit_tools is deprecated.

Read the full file on GitHub · 344 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +20 lines 36f7c74525f9
  2. 2mo ago Changed · +9 lines 33bca4d3c7c1
  3. 2mo ago Changed · +12 lines d29492e3791a
  4. 3mo ago First seen · 303 lines · 80 tokens per session scan A 31394a21933f

Subscribe to this mod's changes

pydantic-ai is a skill published in the GitHub repository itechmeat/llm-code (24 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 6,579 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

pydantic-ai compared with skills from other repositories

pydantic-ai next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pydantic-aiitechmeat/llm-codeSkill241mo agoMITA80Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill59k3d agoMITA44Claude Code
pennylaneK-Dense-AI/scientific-agent-skillsSkill59k3d agoMITA74Claude Code
holoscan-install-wheelNVIDIA/skillsSkill4.3ktodayApache-2.0A34Claude Code, Codex
python-engineering-guidelinesanywhere-labs/Agents-AnywhereSkill3.9kyesterdayApache-2.0A75Codex
future-self-liteTHU-MAIC/OpenMAICSkill46ktodayMITA20Claude Code, Codex
rocm-kernelshuggingface/kernelsSkill799todayApache-2.0A93Claude Code