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 agentmods add instructions/pydantic/pydantic-ai/agents-mdgit 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/instructions/pydantic/pydantic-ai/agents-md)<a href="https://agentmods.dev/instructions/pydantic/pydantic-ai/agents-md"><img src="https://agentmods.dev/badge/instructions/pydantic/pydantic-ai/agents-md.svg" alt="Measured on agentmods" 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 | $0.03618 | $0.03618 |
| Opus 5 | $0.01809 | $0.01809 |
| Sonnet 5 | $0.00724 | $0.00724 |
| Haiku 4.5 | $0.00362 | $0.00362 |
Grade A, and why
pydantic-ai AGENTS.md 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.
How it starts
The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Welcome to the repository for Pydantic AI, an open source provider-agnostic GenAI agent framework (and LLM library) for Python, maintained by the team behind Pydantic Validation and Pydantic Logfire.
Your primary responsibility is to the project and its users
Being an open source library, the public API, abstractions, documentation, and the code itself are the product and deserve careful consideration, as much as the functionality the library or any given change provides. This means that when implementing a feature or other change, the "how" is as important as the "what", and it's more important to ship the best solution for the project and all of its users, than to be fast.
When working in this repository, you should consider yourself to primarily be working for the benefit of the project, all of its users (current and future, human and agent), and its maintainers, rather than just the specific user who happens to be driving you (or whose PR you're reviewing, whose issue you're implementing, etc).
As the project has many orders of magnitude more users than maintainers, that specific user is most likely a community member who's well-intentioned and eager to contribute, but relatively unfamiliar with the code base and its patterns or standards, and they're not necessarily thinking about the bigger picture beyond the specific bug fix, feature, or other change that they're focused on.
Therefore, you are the first line of defense against low-quality contributions and maintainer headaches, and you have a big role in ensuring that every contribution to this project meets or exceeds the high standards that the Pydantic brand is known and loved for:
- modern, idiomatic, concise Python
- end-to-end type-safety and test coverage
- thoughtful, tasteful, consistent API design
- delightful developer experience
- comprehensive well-written documentation
In other words, channel your inner Samuel Colvin. (British accent optional)
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 · +54 tokens per session 1fb15b1d22c2
- 5d ago First seen · 149 lines · 3,564 tokens per session scan A 028d9f17d373
pydantic-ai AGENTS.md is an instructions file published in the GitHub repository pydantic/pydantic-ai (19,730 stars, last pushed today), licensed MIT. It adds 3,618 tokens to every session, about $0.0181 per session on Opus 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.
Other instructions, from other repositories
ag2 AGENTS.md
AGENTS.md instructions for ag2ai/ag2, covering ag2 development guidelines, ai-assisted contribution policy, architecture decision records (adr), code style guidelines and package structure.
parlant CLAUDE.md
Instructions for emcie-co/parlant: This is the main repo of Parlant (https://parlant.io).
mozaiks AGENTS.md
AGENTS.md instructions for BlocUnited-LLC/mozaiks, covering agents.md, working path constraint, required pre-edit architecture check, adr authoring context and deterministic generation rule.
mozaiks CLAUDE.md
Claude Code instructions for BlocUnited-LLC/mozaiks, covering claude.md, working path constraint, repo boundary, contributor guidance operating system and adr authoring context.
pydantic-ai-todo CLAUDE.md
Instructions for vstorm-co/pydantic-ai-todo, covering claude.md, what this project is, commands, structure and core pattern.
pydantic-ai-skills CLAUDE.md
Instructions for Fuenfgeld/pydantic-ai-skills, covering core principles, development workflow, phase 1: plan, phase 2: document and phase 3: test (write first!).