Skip to content

[Agents] Extract shared sections as partials for get-started pages#31276

Open
thomasgauvin wants to merge 4 commits into
productionfrom
agents-sdk-get-started-improvements
Open

[Agents] Extract shared sections as partials for get-started pages#31276
thomasgauvin wants to merge 4 commits into
productionfrom
agents-sdk-get-started-improvements

Conversation

@thomasgauvin
Copy link
Copy Markdown
Contributor

Summary

Extracts four shared sections from the Agents get-started pages into reusable partials, then applies them consistently to both the Quick Start and Add to Existing Project pages. This eliminates duplicated content and makes both pages structurally identical for the sections that follow the step-by-step instructions.

New partials (4):

Partial Contents
what-just-happened The flow diagram and key concepts table explaining agent architecture
common-integration-patterns Auth before agents, custom path prefix, server-side access, adding multiple agents
troubleshooting 7 merged troubleshooting items from both pages (was 5 in quick-start, 4 in add-to-existing — only 2 overlapped)
next-steps "Common next steps" reference table + merged LinkCards (6 total, deduplicated)

Fixes inconsistencies:

  • Quick start now includes wrangler config key points, deploy step (was missing)
  • Add to existing project now includes useAgent key points (was missing)
  • Both pages share identical structure for the shared sections
  • Removed unused LinkCard import from both pages

- Created 4 partials: what-just-happened, common-integration-patterns, troubleshooting, next-steps
- Unified troubleshooting across both pages (7 issues merged)
- Added auth, custom prefix, server-side access, and multiple agent patterns to quick-start
- Added deploy step and useAgent key points to add-to-existing-project
- Removed duplicated content, both pages now share identical structure
@github-actions github-actions Bot added product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/l labels Jun 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

This PR requires additional review attention because it affects the following areas:

Redirects

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /agents/runtime/execution/chat-sdk/

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/public/__redirects @cloudflare/content-engineering, @cloudflare/product-owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/product-owners, @cloudflare/ai-agents, @cloudflare/dev-plat-leads
/src/content/partials/agents/ @elithrar, @rita3ko, @irvinebroque, @vy-ton, @thomasgauvin, @cloudflare/product-owners

@ask-bonk ask-bonk Bot added the documentation Documentation edits label Jun 6, 2026
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Jun 6, 2026

Posted a review on PR #31276 with suggested fixes.

Labels applied: documentation

Issues flagged:

  • HIGHpublic/__redirects (line 231): Missing redirect for the renamed chat-sdk page. The rename from /agents/runtime/execution/chat-sdk/ to /agents/runtime/communication/chat-sdk/ leaves the old path as a 404. Added an inline suggestion to append the missing redirect rule.

  • MEDIUMsrc/content/partials/agents/what-just-happened.mdx (line 5): The heading ## What just happened? violates the style guide (questions and terminal punctuation are not allowed in headings). Added an inline suggestion to change it to ## How it works.

Validation results: pnpm run check, pnpm run lint, and pnpm run format:core:check all pass with no errors.

github run

thomasgauvin and others added 2 commits June 6, 2026 18:56
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
@thomasgauvin thomasgauvin marked this pull request as ready for review June 6, 2026 22:58
@cloudflare-docs-bot
Copy link
Copy Markdown
Contributor

cloudflare-docs-bot Bot commented Jun 6, 2026

Review

⚠️ 24 warnings found in commit fa823ad.

Warnings (24)
File Issue
partials/agents/common-integration-patterns.mdx line 124 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <TypeScriptExample> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/common-integration-patterns.mdx line 73 Escape angle brackets in MDX prose — Line adds unescaped > in prose: } satisfies ExportedHandler<Env>; Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/common-integration-patterns.mdx line 132 Escape angle brackets in MDX prose — Line adds unescaped > in prose: </TypeScriptExample> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/common-integration-patterns.mdx line 100 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <WranglerConfig> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/common-integration-patterns.mdx line 120 Escape angle brackets in MDX prose — Line adds unescaped > in prose: </WranglerConfig> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/troubleshooting.mdx line 21 WranglerConfig requires TOML input<WranglerConfig> wraps a jsonc code block instead of toml Fix: Rewrite the snippet as TOML inside the <WranglerConfig> component
partials/agents/troubleshooting.mdx line 19 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <WranglerConfig> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/troubleshooting.mdx line 32 Escape angle brackets in MDX prose — Line adds unescaped > in prose: </WranglerConfig> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/troubleshooting.mdx line 84 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <TypeScriptExample> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/troubleshooting.mdx line 100 Escape angle brackets in MDX prose — Line adds unescaped > in prose: </TypeScriptExample> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/troubleshooting.mdx line 91 Escape angle brackets in MDX prose — Line adds unescaped < in prose: const agent = useAgent<CounterAgent, CounterState>({ Fix: Replace < with &lt; or wrap the text in backticks.
partials/agents/troubleshooting.mdx line 93 Escape angle brackets in MDX prose — Line adds unescaped > in prose: onStateUpdate: (state) => setCount(state.count), Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/next-steps.mdx line 53 Escape angle brackets in MDX prose — Line adds unescaped < in prose: <LinkCard Fix: Replace < with &lt; or wrap the text in backticks.
partials/agents/next-steps.mdx line 57 Escape angle brackets in MDX prose — Line adds unescaped > in prose: /> Fix: Replace > with &gt; or wrap the text in backticks.
partials/agents/what-just-happened.mdx line 17 Escape angle brackets in MDX prose — Line adds unescaped < in prose: A["Browser<br/>(React)"] <-->|WebSocket| B["Agent<br/>(Counter)"] Fix: Replace < with &lt; or wrap the text in backticks.
partials/agents/what-just-happened.mdx line 18 Escape angle brackets in MDX prose — Line adds unescaped > in prose: B --> C["SQLite<br/>(State)"] Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/add-to-existing-project.mdx line 334 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="what-just-happened" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/add-to-existing-project.mdx line 344 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="common-integration-patterns" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/add-to-existing-project.mdx line 346 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="troubleshooting" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/add-to-existing-project.mdx line 348 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="next-steps" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/quick-start.mdx line 203 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="what-just-happened" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/quick-start.mdx line 237 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="common-integration-patterns" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/quick-start.mdx line 239 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="troubleshooting" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
agents/getting-started/quick-start.mdx line 241 Escape angle brackets in MDX prose — Line adds unescaped > in prose: <Render file="next-steps" product="agents" /> Fix: Replace > with &gt; or wrap the text in backticks.
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.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

@@ -1,5 +1,5 @@
---
title: Agent tools
title: Agents as 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.

🟡 Incomplete rename: page title says "Agents as tools" but body text still uses "Agent tools"

The PR renames the feature from "Agent tools" to "Agents as tools" — the title on line 2 was updated, and all cross-references in other files (concepts/tools.mdx, agents-api.mdx, sub-agents.mdx, think/tools.mdx, think/index.mdx, chat-agents.mdx, client-sdk.mdx) were updated to "Agents as tools". However, the body text of agent-tools.mdx itself still uses the old name "Agent tools" in 4 places: the opening paragraph (agent-tools.mdx:13), the second paragraph (agent-tools.mdx:15), a section heading ## Agent tools vs sub-agent RPC (agent-tools.mdx:17), and a later paragraph (agent-tools.mdx:210). This creates an inconsistency where the page title and all inbound links say "Agents as tools" but the content on the page says "Agent tools".

Prompt for agents
The title of agent-tools.mdx was changed from 'Agent tools' to 'Agents as tools', and all cross-references in other files were updated accordingly. However, the body text of agent-tools.mdx itself still uses the old name 'Agent tools' in 4 places that should be updated to match:

1. Line 13: 'Agent tools let one chat agent...' → 'Agents as tools let one chat agent...'
2. Line 15: 'Agent tools support...' → 'Agents as tools support...'
3. Line 17: '## Agent tools vs sub-agent RPC' → '## Agents as tools vs sub-agent RPC'
4. Line 210: 'Agent tools are normal sub-agents.' → 'Agents as tools are normal sub-agents.'

These are all in the file src/content/docs/agents/runtime/execution/agent-tools.mdx.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Preview URL: https://fa823ad3.preview.developers.cloudflare.com
Preview Branch URL: https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/getting-started/add-to-existing-project/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/getting-started/add-to-existing-project/
https://developers.cloudflare.com/agents/getting-started/quick-start/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/getting-started/quick-start/
https://developers.cloudflare.com/agents/runtime/agents-api/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/runtime/agents-api/
https://developers.cloudflare.com/agents/concepts/tools/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/concepts/tools/
https://developers.cloudflare.com/agents/runtime/execution/sub-agents/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/runtime/execution/sub-agents/
https://developers.cloudflare.com/agents/communication-channels/chat/chat-agents/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/communication-channels/chat/chat-agents/
https://developers.cloudflare.com/agents/communication-channels/chat/client-sdk/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/communication-channels/chat/client-sdk/
https://developers.cloudflare.com/agents/harnesses/think/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/harnesses/think/
https://developers.cloudflare.com/agents/harnesses/think/messengers/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/harnesses/think/messengers/
https://developers.cloudflare.com/agents/harnesses/think/tools/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/harnesses/think/tools/
https://developers.cloudflare.com/agents/runtime/communication/chat-sdk/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/runtime/communication/chat-sdk/
https://developers.cloudflare.com/agents/runtime/execution/agent-tools/ https://agents-sdk-get-started-improvements.preview.developers.cloudflare.com/agents/runtime/execution/agent-tools/

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

Labels

documentation Documentation edits product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants