Pydantic AI is a typed Python SDK for building AI agents that can use different language models and interfaces, including voice, image generation, and embeddings. Developers use it for applications ranging from structured data extraction to long-running multi-agent work. The catalogue entries provide workflows and configuration for its coding-agent and harness features.
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.
npx skills add pydantic/pydantic-ai --skill pydantic-ai-harnessgit clone --depth 1 https://github.com/pydantic/pydantic-aiWrote 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.
[](https://agentmods.dev/skills/pydantic/pydantic-ai/pydantic-ai-harness)<a href="https://agentmods.dev/skills/pydantic/pydantic-ai/pydantic-ai-harness"><img src="https://agentmods.dev/badge/skills/pydantic/pydantic-ai/pydantic-ai-harness/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.
<a href="https://agentmods.dev/skills/pydantic/pydantic-ai/pydantic-ai-harness"><img src="https://agentmods.dev/badge/skills/pydantic/pydantic-ai/pydantic-ai-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00208 | $0.06126 |
| Opus 5.5 | $0.00083 | $0.02450 |
| Sonnet 5.5 | $0.00042 | $0.01225 |
| Haiku 4.5 | $0.00021 | $0.00613 |
Grade A, and why
pydantic-ai-harness 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 yesterday.
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.
Copies of this mod
2 near-identical copies found in the catalogue:
- pydantic-ai-harness — 100% identical, 57 lines differ
- pydantic-ai-harness — 100% identical, 321 lines differ
How it starts
The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Building with Pydantic AI Harness
Pydantic AI Harness is the official capability library for Pydantic AI. Core pydantic-ai ships the
agent loop and the capabilities that need model or framework support (thinking, web search, MCP, tool
search, workspaces, and provider-native compaction); the harness ships optional capabilities for longer,
more involved work: a coding stack, sandboxes, delegation, memory, context management, and controls. Harness
capabilities go in Agent(capabilities=[...]) and compose with each other and with core capabilities; a
few supporting pieces, such as media stores and the ACP server entry point, are used directly instead.
This skill covers pydantic-ai-harness. For the core framework -- agents, tools, structured output,
hooks, workspaces, and testing -- use the building-pydantic-ai-agents skill.
When to Use This Skill
Invoke this skill when:
- The user mentions
pydantic-ai-harness, or code importspydantic_ai_harness - The user wants a coding agent, or an agent that reads and edits files or runs shell commands, locally or in a sandbox
- An agent should run model-written Python that calls its tools (Code Mode)
- The user wants sub-agents, planning, peer-session messaging, a model-written workflow over sub-agents, or a stronger model to advise a cheaper one
- The user wants another model to choose the main agent's model from a named menu
- A long-running agent needs memory across sessions, context compaction, tool output limits, or
SKILL.mdskills loaded on demand - The user wants guardrails, prompt-injection screening, model-based tool-call decisions, spend limits, human questions mid-run, or a second model reviewing the run
- The user wants web research beyond core web search (Exa, You.com), a real browser, or a hosted integration such as GitHub, Linear, Notion, Slack, or Google Workspace
- A run must be saved, resumed, or forked, or an agent should be served over ACP
- The user is using or evaluating Render Workflows for background agent jobs with separate retries, timeouts, and compute settings for model requests and tool calls
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/CODE-MODE.md 25 KB
- references/CODING-AND-WORKSPACES.md 56 KB
- references/CONTEXT-MANAGEMENT.md 34 KB
- references/CONTROL-AND-SAFETY.md 70 KB
- references/DELEGATION-AND-PLANNING.md 32 KB
- references/HOSTED-INTEGRATIONS.md 15 KB
- references/KNOWLEDGE-AND-MEMORY.md 26 KB
- references/RESEARCH-AND-BROWSING.md 29 KB
- references/RUNTIME-AND-EXTENSION.md 42 KB
- references/TESTING-AND-DEBUGGING.md 18 KB
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.
- yesterday Changed cdc585953e1c
- 2d ago Changed 055a972dab7d
- 4d ago Changed 320557d2962f
- 5d ago Changed ddd49157ff36
- 11d ago Changed · +1 lines · +11 tokens per session 80bac698c698
- 12d ago Changed 3ed90568bb5c
- 13d ago Changed b834d215d890
- 14d ago Changed · +2 lines ade1136c5098
- 16d ago Changed c2295bf6e6d2
- 17d ago First seen · 307 lines · 197 tokens per session scan A 21f5af1584fc
pydantic-ai-harness is a skill published in the GitHub repository pydantic/pydantic-ai (21,453 stars, last pushed today), licensed MIT. It adds 208 tokens to every session and 6,126 once invoked, about $0.0008 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-09-27.
pydantic-ai-harness compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pydantic-ai-harnesspydantic/pydantic-ai | Skill | 21k | today | MIT | A | 208 | Claude Code, Codex |
| data-analysisvstorm-co/pydantic-deepagents | Skill | 1.1k | yesterday | MIT | A | 15 | Claude Code, Codex |
| diagram-designvstorm-co/pydantic-deepagents | Skill | 1.1k | yesterday | MIT | A | 16 | Claude Code, Codex |
| data-formatsvstorm-co/pydantic-deepagents | Skill | 1.1k | yesterday | MIT | A | 18 | Claude Code, Codex |
| systematic-debuggingvstorm-co/pydantic-deepagents | Skill | 1.1k | yesterday | MIT | A | 13 | Claude Code, Codex |
| verification-strategyvstorm-co/pydantic-deepagents | Skill | 1.1k | yesterday | MIT | A | 13 | Claude Code, Codex |
| research-methodologyvstorm-co/pydantic-deepagents | Skill | 1.1k | yesterday | MIT | A | 16 | Claude Code, Codex |