Skip to content

[Agents] Restructure docs#31098

Open
thomasgauvin wants to merge 2 commits into
productionfrom
agents-restructure
Open

[Agents] Restructure docs#31098
thomasgauvin wants to merge 2 commits into
productionfrom
agents-restructure

Conversation

@thomasgauvin
Copy link
Copy Markdown
Contributor

@thomasgauvin thomasgauvin commented May 27, 2026

[MUST READ] THIS PR IS BIG BUT IT IS NOT COMPLICATED. MOST ARE FILE MOVES. ANY ADDITIONAL ITERATION OR SIGNIFICANT CHANGES, SUCH AS NEW ENTRIES WILL BE DONE IN A SEPARATE PR TO KEEP THIS PR MANAGEABLE.

Reviewer guide for this PR:

This PR is mostly an IA restructure for Agents docs. The intent is to make the diff easier to review by separating moves, new pages, and actual content changes.

image

Please Review: New & edited files

Net-new content in this PR:

  • Home page diagram:src/components/AgentsPlatformDiagram.astro
  • New Harness top level item: src/content/docs/agents/harnesses/index.mdx
  • Concise tool/channel overview pages:
    • src/content/docs/agents/communication-channels/email.mdx
    • src/content/docs/agents/communication-channels/slack.mdx
    • src/content/docs/agents/tools/sandbox.mdx
    • src/content/docs/agents/tools/mcp.mdx
    • src/content/docs/agents/tools/browser.mdx

Deleted files in this PR:

  • api-reference/index.mdx → Replaced by the new Runtime / Channels / Tools / MCP IA.
  • getting-started/prompting.mdx → Replaced by page-level Copy/View as Markdown, Agent setup, and Docs for agents controls.
  • guides/anthropic-agent-patterns.mdx → Replaced by concepts/agentic-patterns/.
  • platform/prompt.txt.mdx → Replaced by page-level Copy/View as Markdown, Agent setup, and Docs for agents controls.
  • platform/prompting.mdx → Replaced by page-level Copy/View as Markdown, Agent setup, and Docs for agents controls.

No Review Needed: (The rest is mostly file moves or page stubs)

These files are stubs for new indexes/page folders:

  • Navigation/index stubs for the new IA. These do not need reviews. (communication-channels/index.mdx, communication-channels/chat/index.mdx, examples/index.mdx, model-context-protocol/apis/index.mdx, model-context-protocol/cloudflare/index.mdx, model-context-protocol/protocol/index.mdx, runtime/index.mdx, runtime/communication/index.mdx, runtime/execution/index.mdx, runtime/lifecycle/index.mdx, runtime/operations/index.mdx, tools/index.mdx)

These pages were moved into the new IA with minimal content changes, mostly link updates and sidebar ordering:

  • api-reference/*runtime/*, communication-channels/*, tools/*, and model-context-protocol/*
  • guides/*examples/*, communication-channels/*, runtime/*, and model-context-protocol/*
  • agentic-payments/*tools/payments/*
  • model-context-protocol/* stays as model-context-protocol/*
  • platform/limits.mdx stays as platform/limits.mdx
  • guides/chatgpt-app.mdx moved to workers/demos/chatgpt-app.mdx
  • concepts/human-in-the-loop.mdx → Moved under concepts/agentic-patterns/.
  • concepts/workflows.mdx → Merged into runtime/execution/run-workflows/.

GitHub should show most of these as renames. The content was intentionally kept close to the original to avoid review noise.

Not in this PR

The new example pages for Code review agent, Payment agent, and Retrieval Augmented Generation agent were split into a follow-up PR:

#31148

@github-actions github-actions Bot added product:workers Related to Workers product product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. labels May 27, 2026
@cloudflare-docs-bot
Copy link
Copy Markdown

cloudflare-docs-bot Bot commented May 27, 2026

Review

⏸️ Automatic reviews for this PR are paused.

This PR has already received 2 automatic reviews. To run another review, a codeowner can comment /review or /full-review.

Tip: Keep PRs in draft mode until they are ready for review — the bot skips draft PRs automatically.


⏸️ Automatic reviews for this PR are paused.

This PR has already received 2 automatic reviews. To run another review, a codeowner can comment /review or /full-review.

Tip: Keep PRs in draft mode until they are ready for review — the bot skips draft PRs automatically.


💡 1 suggestion found in commit e3baf35.

Suggestions (1)
File Issue
agents/index.mdx line 19 Oxford comma — Browser, Sandbox, AI Search, MCP, Payments and other MCP tools Fix: Add a serial comma before 'and': 'Browser, Sandbox, AI Search, MCP, Payments, and other MCP tools'
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.

@thomasgauvin
Copy link
Copy Markdown
Contributor Author

/bonk review

Comment thread src/content/docs/agents/index.mdx Outdated
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few issues to fix before merge.

Missing redirects — these old paths will 404:

  • /agents/guides/
  • /agents/agentic-payments/x402/charge-for-http-content/
  • /agents/agentic-payments/x402/charge-for-mcp-tools/
  • /agents/agentic-payments/x402/pay-from-agents-sdk/
  • /agents/agentic-payments/x402/pay-with-tool-plugins/

Missing descriptionsdescription is required for all pages with pcx_content_type:

  • src/content/docs/agents/index.mdx (overview page)
  • src/content/docs/agents/harnesses/index.mdx (concept page)

Posted an inline suggestion for the harnesses page. The agents overview page frontmatter was not changed in this diff, so I cannot suggest inline — add description: Build and host AI agents on Cloudflare with durable state, real-time connections, and built-in tools. there.

} from "~/components";

Most AI applications today are stateless — they process a request, return a response, and forget everything. Real agents need more. They need to remember conversations, act on schedules, call tools, coordinate with other agents, and stay connected to users in real-time. The Agents SDK gives you all of this as a TypeScript class.
Build and host Agents on Cloudflare, connect chat, voice, email, Slack, and webhooks to a durable agent runtime with Browser, Sandbox, AI Search, MCP, Payments and other MCP tools.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oxford comma:

Suggested change
Build and host Agents on Cloudflare, connect chat, voice, email, Slack, and webhooks to a durable agent runtime with Browser, Sandbox, AI Search, MCP, Payments and other MCP tools.
Build and host Agents on Cloudflare, connect chat, voice, email, Slack, and webhooks to a durable agent runtime with Browser, Sandbox, AI Search, MCP, Payments, and other MCP tools.

@@ -0,0 +1,74 @@
---
title: Harnesses
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a description (required for all pages with pcx_content_type):

Suggested change
title: Harnesses
title: Harnesses
description: Understand agent harnesses — the loop that controls planning, tool use, and response flow.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 30, 2026

Posted a review on PR #31098.

Findings:

  • Missing redirects — 5 old paths will 404 after merge:

    • /agents/guides/
    • /agents/agentic-payments/x402/charge-for-http-content/
    • /agents/agentic-payments/x402/charge-for-mcp-tools/
    • /agents/agentic-payments/x402/pay-from-agents-sdk/
    • /agents/agentic-payments/x402/pay-with-tool-plugins/
  • Missing frontmatter descriptionsdescription is required for pages with pcx_content_type. Two key pages are missing it:

    • src/content/docs/agents/index.mdx (the main overview page)
    • src/content/docs/agents/harnesses/index.mdx (new concept page)
  • Oxford comma — Missing serial comma in the agents overview intro line.

I posted inline suggestions for the harnesses description and the Oxford comma. The missing description on agents/index.mdx couldn't be suggested inline because the frontmatter wasn't part of this PR's diff.

github run

@github-actions
Copy link
Copy Markdown
Contributor

CI run failed: build logs

@github-actions
Copy link
Copy Markdown
Contributor

Broken Links

Found 33 broken link(s) across 20 file(s).

File Link Position Error
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/agents-api/ 71:19 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/ 130:12 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/agents-api/#client-api 131:8 invalid link
content/changelog/agents/2025-03-18-npm-i-agents.mdx /agents/api-reference/routing/ 132:31 invalid link
content/changelog/agents/2025-04-07-mcp-servers-agents-sdk-updates.mdx /agents/api-reference/routing/ 55:146 invalid link
content/changelog/agents/2026-02-03-agents-workflows-integration.mdx /agents/api-reference/run-workflows/ 178:60 invalid link
content/changelog/agents/2026-02-17-agents-sdk-v0.5.0.mdx /agents/api-reference/protocol-messages/ 76:5 invalid link
content/changelog/agents/2026-02-17-agents-sdk-v0.5.0.mdx /agents/api-reference/chat-agents/#data-parts 84:202 invalid link
content/changelog/agents/2026-02-20-codemode-sdk-rewrite.mdx /agents/api-reference/codemode/ 69:9 invalid link
content/changelog/agents/2026-03-02-agents-sdk-v0.7.0.mdx /agents/api-reference/observability/ 75:44 invalid link
content/changelog/agents/2026-03-02-agents-sdk-v0.7.0.mdx /agents/api-reference/schedule-tasks/#keeping-the-agent-alive 120:63 invalid link
content/changelog/agents/2026-03-17-codemode-sdk-v0.2.1.mdx /agents/api-reference/codemode/ 94:9 invalid link
content/changelog/access/2026-03-26-mcp-portal-code-mode.mdx /agents/api-reference/codemode/ 9:88 invalid link
content/changelog/agents/2026-05-13-agents-sdk-v0.12.4.mdx /agents/api-reference/ 128:14 invalid link
content/changelog/agents/2026-05-13-agents-sdk-v0.12.4.mdx /agents/api-reference/chat-agents/ 128:65 invalid link
content/changelog/workers/2026-03-24-dynamic-workers-open-beta.mdx /agents/api-reference/codemode/ 15:5 invalid link
agent-lee/index.mdx /agents/api-reference/mcp-agent-api/ 126:3 invalid link
agent-lee/index.mdx /agents/concepts/human-in-the-loop/ 133:3 invalid link
ai-crawl-control/reference/worker-templates.mdx /agents/agentic-payments/x402/ 27:3 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/model-context-protocol/authorization/ 26:253 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/api-reference/codemode/ 274:1 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/api-reference/codemode/ 309:63 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients 378:225 invalid link
cloudflare-one/access-controls/ai-controls/mcp-portals.mdx /agents/api-reference/codemode/ 518:89 invalid link
cloudflare-one/access-controls/ai-controls/secure-mcp-servers.mdx /agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients 185:250 invalid link
cloudflare-one/access-controls/ai-controls/secure-mcp-servers.mdx /agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients 450:248 invalid link
docs-for-agents/index.mdx /agents/api-reference/codemode/ 53:5 invalid link
docs-for-agents/index.mdx /agents/model-context-protocol/mcp-servers-for-cloudflare/ 56:168 invalid link
dynamic-workers/getting-started.mdx /agents/api-reference/codemode/ 20:70 invalid link
workers/demos/chatgpt-app.mdx /agents/api-reference/agents-api/ 871:1 invalid link
workers/get-started/prompting.mdx /agents/model-context-protocol/mcp-servers-for-cloudflare/ 21:273 invalid link
workers/runtime-apis/bindings/worker-loader.mdx /agents/api-reference/codemode/ 33:50 invalid link
workflows/get-started/durable-agents.mdx /agents/api-reference/run-workflows/ 650:1 invalid link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:workers Related to Workers product size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.