agentleFS
PydanticKnown publisherpydantic/pydantic-ai/pydantic_ai_slim/pydantic_ai/models/anthropic/AGENTS.md

pydantic-ai / anthropic

AGENTS.md21k starsChanged 8 days agoMITView on GitHub

These rules add to models/AGENTS.md and apply to the Anthropic package only.

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep AnthropicModel one class in __init__.py.

    line 5
  2. Very specific:

    Never import from __init__.py at runtime in a submodule.

    line 6
  3. Very specific:

    Import every submodule inside the try block of __init__.py that imports the anthropic SDK.

    line 7

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

pydantic_ai_slim/pydantic_ai/models/anthropic/ Guidelines

These rules add to models/AGENTS.md and apply to the Anthropic package only.

  • Keep AnthropicModel one class in __init__.py. Put a module-level helper in the _*.py submodule whose docstring names its concern. Do not split the class's methods into mixins: a mixin spreads one object's state across files.
  • Never import from __init__.py at runtime in a submodule. __init__.py imports every submodule, so that import is circular. Import the name under TYPE_CHECKING instead, as _streaming.py does for AnthropicModelName.
  • Import every submodule inside the try block of __init__.py that imports the anthropic SDK. A missing SDK then raises the install hint, not a bare ImportError.
  • In a test, patch a name in the module that calls it: pydantic_ai.models.anthropic.<name> for a call in __init__.py, pydantic_ai.models.anthropic._streaming.<name> for a call in _streaming.py. Each from ._x import name creates its own binding, so a patch on the defining submodule reaches only calls inside that submodule.

Download now (ZIP)

Trending

Quiet since August.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 2 mentionsApr 2026: 29 mentionsMay 2026: 2 mentionsJun 2026: 2 mentionsJul 2026: 3 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the pydantic/pydantic-ai repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about pydantic/pydantic-ai

The biggest 5 of 63 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 63

Talked about on GitHub, Bluesky, Hacker News and the web (63 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 7

2 more on Bluesky

On Hacker News · 5

On the web · 1

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.