agentleFS
CloudflareKnown publishercloudflare/agents/docs/AGENTS.md

agents

AGENTS.md5.8k starsChanged 5 months agoMITView on GitHub

User-facing documentation for the Agents SDK monorepo. Each package owns the directory under docs/ matching its unscoped package name. These markdown files are manually synced to developers.cloudflare.com/agents/ where applicable. We follow Diátaxis to keep docs focused. Every doc should have a clear primary type: The fourth Diátaxis type — explanation ("understand why") — lives in /design, not here. If you're writing about why something was designed a certain way, put it there. If you're writing about how to use something,…

Trending

More talk lately.about the whole repository

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

Who's talking about cloudflare/agents

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

See all 43

Talked about on GitHub, Bluesky and Hacker News (43 times).

On GitHub · 33

28 more on GitHub

On Bluesky · 9

4 more on Bluesky

On Hacker News · 1

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    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. Distinctive:

    New API or feature?: Start with reference (signature, params, return types, behaviour) plus a concise example.

    line 19
  2. Distinctive:

    Multi-step workflow?: Write a how-to guide (goal-oriented steps, assumes the reader already understands the basics).

    line 20
  3. Distinctive:

    Onboarding flow?: Write a tutorial (learning-oriented, step-by-step, the reader follows along).

    line 21
  4. Very specific:

    Write for SDK users, not contributors — assume the reader is building something with the Agents SDK

    line 30
  5. Distinctive:

    No contractions (Cloudflare style guide requirement — "do not" not "don't")

    line 32
  6. Distinctive:

    Use TypeScript for all code examples

    line 33
  7. Distinctive:

    Write the markdown file in the directory owned by its package

    line 39
  8. Very specific:

    Add it to that package's index.md

    line 40
  9. Very specific:

    If it documents a design decision, consider whether a companion entry in /design is warranted

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

AGENTS.md — docs/

User-facing documentation for the Agents SDK monorepo. Each package owns the directory under docs/ matching its unscoped package name. These markdown files are manually synced to developers.cloudflare.com/agents/ where applicable.

Diátaxis framework

We follow Diátaxis to keep docs focused. Every doc should have a clear primary type:

TypePurposeReader's needExamples in this folder
Tutorial"Follow along and learn"Learninggetting-started.md, adding-to-existing-project.md
How-to"Solve a specific task"A goalemail.md, webhooks.md, human-in-the-loop.md, cross-domain-authentication.md, migrations
Reference"Look up the API"Informationagent-class.md, callable-methods.md, client-sdk.md, state.md, configuration.md

The fourth Diátaxis type — explanation ("understand why") — lives in /design, not here. If you're writing about why something was designed a certain way, put it there. If you're writing about how to use something, it belongs here.

Picking the right type

  • New API or feature? Start with reference (signature, params, return types, behaviour) plus a concise example.
  • Multi-step workflow? Write a how-to guide (goal-oriented steps, assumes the reader already understands the basics).
  • Onboarding flow? Write a tutorial (learning-oriented, step-by-step, the reader follows along).
  • Don't hybridise — a single doc can include a short example in a reference page, but if you're writing a 20-step walkthrough inside a reference doc, it should be a separate how-to.

Upstream sync

There is no automated sync workflow. Changes here must be manually ported to cloudflare/cloudflare-docs (the src/content/docs/agents/ folder). When updating docs here, also update the corresponding .mdx file in cloudflare-docs.

Writing style

  • Write for SDK users, not contributors — assume the reader is building something with the Agents SDK
  • Be concrete: code snippets over prose, real examples over abstract descriptions
  • No contractions (Cloudflare style guide requirement — "do not" not "don't")
  • Use TypeScript for all code examples
  • Link within a package directory using relative paths (./state.md)
  • Link across package directories with an absolute repository URL, and name the installed package path in prose when relevant

Adding a new doc

  1. Write the markdown file in the directory owned by its package
  2. Add it to that package's index.md
  3. If it documents a design decision, consider whether a companion entry in /design is warranted

TODO backlog

agents/index.md has entries marked TODO — these are known gaps. When filling one, remove the TODO marker and follow the steps above.

Download now (ZIP)

Does it work?

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

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.