agents / design
AGENTS.md5.8k starsChanged 5 months agoMITView on GitHub
Internal design records — the "why" behind decisions in this repo and its libraries. This is the Diátaxis explanation quadrant: architecture rationale, tradeoffs, and alternatives considered. Living documents that describe how a concept or subsystem works right now. Named by topic: state.md, mcp.md, visuals.md. These are the primary entry point — a contributor looking for "how does state work" should open one file and get the full picture. Design docs get updated as the implementation evolves. They always reflect the…
Trending
More talk lately.about the whole repository
Who's talking about cloudflare/agents
- @threepointone.bsky.social“cloudflare agents: repo: github.com/cloudflare/a... platform docs: developers.cloudflare.com/agents/ …”Bluesky · Feb 25, 2025 · 66 likes
- mastra-ai/mastra“[FEATURE] Code Mode (generate + run code to orchestrate tool/MCP calls)”GitHub · Dec 9, 2025 · 6 reactions
- Chemically-Motivated-Solutions/promptcrafting-mcp“chore(deps): bump the npm_and_yarn group across 3 directories with 4 updates”GitHub · Apr 2, 2026 · 3 reactions
- @github-trending-js.bsky.social“📦 cloudflare / agents ⭐ 1,655 (+76) 🗒 TypeScript Build and deploy AI Agents on Cloudflare”Bluesky · May 2, 2025 · 3 likes
- abstractedfox/agents“Python package resolution”GitHub · Jul 21, 2026 · 2 reactions
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
- Dec 9, 2025[FEATURE] Code Mode (generate + run code to orchestrate tool/MCP calls) — mastra-ai/mastra6 reactions · 5 comments
- Apr 2, 2026chore(deps): bump the npm_and_yarn group across 3 directories with 4 updates — Chemically-Motivated-Solutions/promptcrafting-mcp3 reactions · 1 comment
- Jul 21, 2026Python package resolution — abstractedfox/agents2 reactions
- Jun 20, 2026chore(deps): bump the npm_and_yarn group across 2 directories with 13 updates — Chemically-Motivated-Solutions/promptcrafting-mcp2 reactions · 1 comment
- May 26, 2026Bump the npm_and_yarn group across 1 directory with 18 updates — GlacierEQ/context-engineering-intro2 reactions · 4 comments
28 more on GitHub
- May 23, 2026Bump the npm_and_yarn group across 1 directory with 9 updates — HarleyCoops/JinaMCP2 reactions · 1 comment
- Apr 14, 2026chore(deps): bump agents from 0.0.87 to 0.11.0 in /templates/cloudflare-mcp-server in the npm_and_yarn group across 1 directory — sipyourdrink-ltd/bernstein2 reactions · 2 comments
- Mar 23, 2026chore(deps): Bump agents from 0.2.35 to 0.7.9 in /packages/api — LoveLogicAILLC/secretforge-ai2 reactions · 4 comments
- Mar 16, 2026chore(deps): Bump agents from 0.2.35 to 0.7.6 in /packages/web — LoveLogicAILLC/secretforge-ai2 reactions · 6 comments
- Mar 16, 2026chore(deps): Bump agents from 0.2.35 to 0.7.6 in /packages/api — LoveLogicAILLC/secretforge-ai2 reactions · 5 comments
- Feb 23, 2026chore(deps): Bump agents from 0.2.35 to 0.5.1 in /packages/web — LoveLogicAILLC/secretforge-ai2 reactions · 6 comments
- Feb 20, 2026Bump the npm_and_yarn group across 3 directories with 8 updates — cbwinslow/opendiscourse_mcp2 reactions · 1 comment
- Jan 24, 2026chore(deps): Bump agents from 0.2.35 to 0.3.6 — LoveLogicAILLC/secretforge-ai2 reactions · 6 comments
- Jan 24, 2026chore(deps): Bump agents from 0.2.35 to 0.3.6 in /packages/web — LoveLogicAILLC/secretforge-ai2 reactions · 6 comments
- Jan 24, 2026chore(deps): Bump agents from 0.2.35 to 0.3.6 in /packages/api — LoveLogicAILLC/secretforge-ai2 reactions · 6 comments
- Aug 11, 2025Unknown connection regression — modelcontextprotocol/inspector2 reactions · 6 comments
- Jul 11, 2025Add instrumentation for `agents` — getsentry/sentry-javascript2 reactions · 10 comments
- Oct 5, 2026build(deps): Bump the minor-and-patch group across 1 directory with 20 updates — Themis128/cloudless.gr1 reaction · 4 comments
- Oct 2, 2026Add `Code Mode` meta tools to Reshapr tools — reshaprio/reshapr1 reaction · 2 comments
- Sep 28, 2026chore(deps): bump the npm-minor-and-patch group across 1 directory with 4 updates — grigoreo-dev/otask-mcp1 reaction · 1 comment
- Sep 25, 2026chore(deps): bump the patch-updates group across 1 directory with 12 updates — ClashKingInc/ClashKingDashboard1 reaction · 1 comment
- Sep 18, 2026chore(deps): bump the patch-updates group with 10 updates — ClashKingInc/ClashKingDashboard1 reaction · 1 comment
- Aug 27, 2026chore(deps): bump the minor-and-patch group across 1 directory with 14 updates — Themis128/cloudless.gr1 reaction · 2 comments
- Jul 29, 2026fix(cloudflare): Also skip cf: prefixed DOs — getsentry/sentry-javascript1 reaction
- Jun 5, 2026Bump agents from 0.13.3 to 0.14.1 — martinthommesen/snow-mcp1 reaction · 1 comment
- Feb 20, 2026chore(deps): Bump the npm_and_yarn group across 4 directories with 4 updates — Fadil369/givc-core-academy1 reaction
- Feb 20, 2026chore(symbolai-worker)(deps): bump agents from 0.2.35 to 0.5.1 in /symbolai-worker — llu77/-lmm1 reaction · 3 comments
- Feb 3, 2026Bump agents from 0.0.109 to 0.3.7 — vivekrp/youfirst-mcp1 reaction
- Feb 3, 2026Bump agents from 0.0.94 to 0.3.7 in /mcp-server-deepwiki-gpt — Cam10001110101/chatgpt-connector-deepwiki1 reaction
- Feb 3, 2026Bump agents from 0.0.65 to 0.3.7 — hackhit/remote-mcp-server-authless1 reaction
- Dec 1, 2025chore(symbolai-worker)(deps): bump the security group in /symbolai-worker with 2 updates — llu77/-lmm1 reaction · 2 comments
- Nov 7, 2025Bump ai and agents — vivekrp/youfirst-mcp1 reaction
- Nov 5, 2025will this be merged soon? — fghf136813721430ghase/fghf136813721430ghase1 reaction
On Bluesky · 9
- Feb 25, 2025cloudflare agents: repo: github.com/cloudflare/a... platform docs: developers.cloudflare.com/agents/ starter kit:… — @threepointone.bsky.social66 likes and reposts · 4 replies
- May 2, 2025📦 cloudflare / agents ⭐ 1,655 (+76) 🗒 TypeScript Build and deploy AI Agents on Cloudflare — @github-trending-js.bsky.social3 likes and reposts
- Mar 7, 2026Cloudflare's official SDK for building and deploying AI Agents - production-grade infrastructure for the agentic era!… — @u11g.com2 likes and reposts
- Feb 27, 2026Cloudflare Agents lets you deploy millions of persistent AI agents that cost nothing when idle - each with its own state, WebSocket sync,… — @arifsolmaz.bsky.social2 likes and reposts
- Feb 21, 2026📦 cloudflare / agents ⭐ 3,303 (+56) 🗒 TypeScript Build and deploy AI Agents on Cloudflare — @github-trending.bsky.social2 likes and reposts
4 more on Bluesky
- Feb 21, 2026📦 cloudflare / agents ⭐ 3,303 (+56) 🗒 TypeScript Build and deploy AI Agents on Cloudflare — @github-trending-js.bsky.social2 likes and reposts
- May 3, 2025📦 cloudflare / agents ⭐ 1,655 (+76) 🗒 TypeScript Build and deploy AI Agents on Cloudflare — @github-trending.bsky.social2 likes and reposts
- Mar 4, 2025Link: github.com/cloudflare/a... — @tinztwinshub.bsky.social1 likes and repost
- Oct 3, 2026Cloudflare Agents is an open-source SDK for stateful agents on Cloudflare Durable Objects. This investigation will examine its runtime,… — @smith.wiki0 likes and reposts · 1 reply
On Hacker News · 1
- Mar 4, 2025Cloudflare Agents1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-think/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- examples/webmcp-react/AGENTS.mdAGENTS.md
- guides/AGENTS.mdAGENTS.md
- packages/agents/AGENTS.mdAGENTS.md
- packages/agents/src/tests/capabilities/AGENTS.mdAGENTS.md
- open-prSkill
- reproduceSkill
- debug-planSkill
- pirate-voiceSkill
- release-notesSkill
- test-planSkill
- workspace-digestSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 56
No strict template. Each file should at minimum cover:
- Distinctive: line 62
Keep it concise. A few paragraphs is fine.
≈ “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.
Files
AGENTS.md — design/
Internal design records — the "why" behind decisions in this repo and its libraries. This is the Diátaxis explanation quadrant: architecture rationale, tradeoffs, and alternatives considered.
Two kinds of document
Design docs
Living documents that describe how a concept or subsystem works right now. Named by topic: state.md, mcp.md, visuals.md. These are the primary entry point — a contributor looking for "how does state work" should open one file and get the full picture.
Design docs get updated as the implementation evolves. They always reflect the current reality.
RFCs
Point-in-time decision records for significant changes. Named with an rfc- prefix: rfc-state-v2-sync-protocol.md. These capture why a specific change was made and what alternatives were considered. They do not get updated after the decision — they are snapshots.
RFCs are never deleted, even after rejection. Rejected RFCs are valuable — they prevent re-litigating the same idea later.
Workflow
1. Propose: write rfc-<name>.md (status: proposed)
2. Decide: update status to accepted or rejected
3. Implement: update the relevant design doc to reflect the new reality
(create one if it does not exist yet)Step 3 is important — the design doc is what people read day-to-day. The RFC is the footnote explaining one particular decision within it.
A design doc may link to multiple RFCs that shaped it over time:
## History
- [rfc-state-sync.md](./rfc-state-sync.md) — original bidirectional sync design
- [rfc-state-v2-batching.md](./rfc-state-v2-batching.md) — added batched updatesRFC format
Include a status line at the top:
Status: proposed | accepted | rejectedThen cover:
- The problem — what we need to solve
- The proposal — what we want to do
- The alternatives — what else we considered and why not
- The decision — what was decided (filled in after discussion)
Design doc format
No strict template. Each file should at minimum cover:
- How it works — the current design, kept up to date
- Key decisions — link to relevant RFCs for the reasoning
- Tradeoffs — what we gave up and why
Keep it concise. A few paragraphs is fine. These are records, not essays.
What does not belong here
- API reference or usage guides — those go in
/docs(see/docs/AGENTS.md) - Code comments — keep inline explanations in the code itself
- Changelogs — those live in package
CHANGELOG.mdfiles
Current contents
| File | Type | Scope |
alarm-coordination.md | design doc | Lifecycle-owned physical alarm, capability contributions, Scheduler, and Agent adaptation |
chat-shared-layer.md | design doc | Chat shared layer — streaming, reconciliation, recovery, protocol, and the shared React hook in agents/chat |
durable-streams-comparison.md | analysis | Durable Streams (ElectricSQL) vs the Agents SDK — layer mapping, what each has, strategic takeaways |
think.md | design doc | Think — current design: composition, turn pipeline, persistence, recovery, wire protocol, tools, tables |
sessions.md | design doc | agents/sessions design record: schema, write economics, attachments, maintenance |
think-vs-aichat.md | design doc | Think vs AIChatAgent — current differences, when to use each, code comparisons |
think-roadmap.md | design doc | Think implementation plan — all 5 phases complete, full AIChatAgent parity |
chat-api.md | analysis | AIChatAgent + useAgentChat API analysis — pain points, improvements, Think influence |
chat-improvements.md | design doc | Status record for the ai-chat improvement plan — what shipped, what did not, where it lives |
readonly-connections.md | design doc | Readonly connections — enforcement, storage wrapping, caveats |
retries.md | design doc | Retry system — primitives, integration points, backoff strategy, tradeoffs |
visuals.md | design doc | UI component library (Kumo), dark mode, custom patterns, routing integration |
workspace.md | design doc | Workspace — hybrid SQLite+R2 filesystem, bash, symlinks, observability |
agent-tools.md | design doc | Agent tools — chat sub-agent orchestration, parent registry, event replay |
sub-agent-routing.md | design doc | Sub-agent routing as shipped — facets, nested URLs, registry, parent lookup, caveats |
rfc-sub-agents.md | RFC | Sub-agents — child DOs via facets, typed stubs, built into Agent (accepted) |
rfc-sub-agent-routing.md | RFC | Sub-agent external addressability — nested URLs, onBeforeSubAgent, per-call bridge |
rfc-helper-sub-agent-orchestration.md | RFC | Agent tool orchestration — runAgentTool, agentTool, event forwarding |
rfc-detached-agent-tools.md | RFC | Detached ("background") agent-tool runs — detached mode, durable named-method completion hook |
rfc-think-multi-session.md | RFC | Facet-backed Chats base-class pattern (rejected; replaced by rfc-user-chat-durable-objects) |
rfc-user-chat-durable-objects.md | RFC | One user hub plus one independent top-level Durable Object per chat (accepted) |
rfc-chat-recovery-work-budget.md | RFC | Decouple chat-recovery duration from the runaway guard — work budget + shouldKeepRecovering (accepted) |
rfc-chat-recovery-foundation.md | RFC | Shared chat recovery foundation — internal engine, adapters, behavior convergence, and testing strategy |
rfc-ai-chat-maintenance.md | RFC | AIChatAgent first-class stance, shared chat toolkit, multi-session example direction |
loopback.md | design doc | Loopback pattern — cross-boundary RPC for sub-agents and dynamic isolates |
worker-bundler.md | design doc | Worker bundler — host-side assets, no code generation, mounting is caller's concern |
rfc-workers-ai-gateway-merge.md | RFC | Merge ai-gateway-provider into workers-ai-provider — registry routing, universal run API, resume (proposed) |
rfc-coding-agent.md | RFC | CodingAgent — new @cloudflare/coding-agent package (extends AIChatAgent), CLI coding agents in Sandbox, pluggable engine (Cli/Harness), two-lifecycle durability (proposed) |
rfc-codex-harness-capability.md | RFC | Static Codex Rust/Wasm turn engine composed onto a plain Durable Object as a Lifecycle capability (proposed) |
rfc-harness-model-provider-boundary.md | RFC | Keep model providers native per harness in v1: LanguageModelV4 for Codex and pi-ai providers for Pi (proposed) |
test-coverage-matrix.md | design doc | Feature × test-layer coverage rollup, CI→layer mapping, skipped-test debt, nightly hygiene |
mcp.md | design doc | Stateless, Legacy compatibility, Legacy sessionful, client, package boundary, and conformance architecture |
durable-object-lifecycle.md | design doc | Lifecycle Objects, capability and host phases, Scheduler/alarm ownership, host context, identity, and always-hibernating WebSockets |
rfc-durable-object-lifecycle.md | RFC | Constructor-composed Durable Object lifecycle with reusable components and always-hibernating WebSockets |
rfc-cold-rpc-initialization.md | RFC | Cold native RPC runs lifecycle startup from the Agent context wrapper for async methods; sync methods stay sync (accepted) |
rfc-fibers.md | RFC | Tasks (née Fibers) — durable replayable execution as one Lifecycle capability: named definitions, journaled steps, sleeps, optional recovery callback (accepted, amended) |
rfc-streams.md | RFC | Streams — durable incremental output as a Lifecycle capability: chunk log, cursor, replay-then-tail reads, composed with Tasks via checkpointed cursors (proposed) |
rfc-pi-harness-example.md | RFC | pi-durable as an example-local Lifecycle capability with a per-session wake job and a pi session store; what must land before it becomes a package export (proposed) |
rfc-self-modifying-harness.md | RFC | Editable harness source in Workspace, activation through Worker Bundler, and one fresh Dynamic Worker per turn (proposed) |
browser-sessions.md | design doc | Persistent Browser behind browserTool — one browser per object, reattach-or-create, restart signaling |
Relationship to /docs
/docs is user-facing ("how to use the SDK"). /design is contributor-facing ("why the SDK works this way"). If a design decision affects how users interact with the SDK, distil the user-relevant parts into a doc in /docs and link back here for the full rationale.
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
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.

