Skip to content

[Agents] Close documentation gaps vs upstream SDK#29764

Merged
threepointone merged 1 commit intoproductionfrom
agents-updates
Apr 11, 2026
Merged

[Agents] Close documentation gaps vs upstream SDK#29764
threepointone merged 1 commit intoproductionfrom
agents-updates

Conversation

@threepointone
Copy link
Copy Markdown
Contributor

@threepointone threepointone commented Apr 11, 2026

Summary

Comprehensive documentation update to close gaps between the upstream cloudflare/agents SDK and the public-facing docs. Audited all commits from the last ~2 months and updated 12 pages.

Thanks to @whoiskatrin for the groundwork in #29219 — several of the fixes here (queue retry signature, SSRF blocklist correction, HITL expansion, websocket additions) were identified in that PR and are incorporated into this one.

New pages

  • guides/push-notifications.mdx — Full guide: VAPID keys, agent with subscription management, service worker, client subscribe flow, production considerations

Updated pages

File What changed
chat-agents.mdx Added messageConcurrency, onChatResponse, sanitizeMessageForPersistence, saveMessages/persistMessages (properly documented), turn lifecycle helpers (waitUntilStable, hasPendingInteraction, resetTurnState)
schedule-tasks.mdx Added schedule() idempotent option, scheduleEvery() idempotency section, cron idempotency note, push-notifications cross-link
queue-tasks.mdx Fixed queue() signature to include options.retry, added retry to QueueItem type, replaced manual re-queue example with built-in retry
mcp-client-api.mdx Fixed SSRF blocklist (loopback allowed for local dev), added MCPServerFilter to getAITools(), documented callbackHost auto-derivation
client-sdk.mdx Added readable state property on useAgent/AgentClient
websockets.mdx Added onError(error) server-level overload, shouldSendProtocolMessages to lifecycle table, Connection.uri/tags/server properties, isConnectionReadonly/isConnectionProtocolEnabled to management table, "Suppressing protocol messages" section, "Agent properties" table
agent-class.mdx Added static options table (hibernate, sendIdentityOnConnect, hungScheduleTimeoutSeconds, keepAliveIntervalMs, retry), keepAlive()/keepAliveWhile() section
human-in-the-loop.mdx Expanded from 2 patterns to 5 with decision table + decision tree, added needsApproval server+client examples, onToolCall client-side pattern, MCP elicitation example, timeouts/escalation with code
configuration.mdx Added "TypeScript configuration" (agents/tsconfig) and "Vite configuration" (agents/vite) sections
callable-methods.mdx Updated troubleshooting: recommend agents/vite plugin + agents/tsconfig instead of manual target setting
quick-start.mdx Added tsconfig.json and vite.config.ts to project file list with setup instructions
add-to-existing-project.mdx Inserted step 4 "Configure TypeScript and Vite" with agents/tsconfig and agents/vite plugin

Test plan

  • Verify all internal links resolve (especially new cross-links between configuration, callable-methods, and schedule-tasks)
  • Verify code examples render correctly in preview
  • Spot-check API signatures against current agents and @cloudflare/ai-chat source

Made with Cursor


Open with Devin

- chat-agents: add messageConcurrency, onChatResponse, sanitizeMessageForPersistence,
  saveMessages/persistMessages docs, turn lifecycle helpers (waitUntilStable,
  hasPendingInteraction, resetTurnState)
- schedule-tasks: add schedule() idempotent option, scheduleEvery() idempotency,
  cron idempotency note
- queue-tasks: fix queue() signature to include retry options, replace manual
  re-queue example with built-in retry
- mcp-client-api: fix SSRF blocklist (loopback allowed for local dev), add
  MCPServerFilter to getAITools(), document callbackHost auto-derivation
- client-sdk: add readable state property on useAgent/AgentClient
- websockets: add onError server-level overload, shouldSendProtocolMessages,
  Connection.uri/tags/server, isConnectionProtocolEnabled, Agent properties table
- agent-class: add static options table, keepAlive/keepAliveWhile section
- human-in-the-loop: expand from 2 patterns to 5 with decision table/tree,
  add needsApproval, onToolCall, MCP elicitation code examples
- configuration: add TypeScript (agents/tsconfig) and Vite (agents/vite) sections
- callable-methods: update troubleshooting with agents/vite plugin + agents/tsconfig
- quick-start: add tsconfig.json and vite.config.ts to project structure
- add-to-existing-project: add step 4 for TypeScript and Vite configuration

Co-authored-by: whoiskatrin <whoiskatrin@users.noreply.github.com>
Made-with: Cursor
@github-actions github-actions bot added product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/xl labels Apr 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

Pattern Owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/pcx-technical-writing, @cloudflare/product-owners, @cloudflare/ai-agents, @cloudflare/dev-plat-leads

@github-actions
Copy link
Copy Markdown
Contributor

Preview URL: https://429ef481.preview.developers.cloudflare.com
Preview Branch URL: https://agents-updates.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/guides/push-notifications/ https://agents-updates.preview.developers.cloudflare.com/agents/guides/push-notifications/
https://developers.cloudflare.com/agents/concepts/human-in-the-loop/ https://agents-updates.preview.developers.cloudflare.com/agents/concepts/human-in-the-loop/
https://developers.cloudflare.com/agents/api-reference/chat-agents/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/chat-agents/
https://developers.cloudflare.com/agents/api-reference/websockets/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/websockets/
https://developers.cloudflare.com/agents/api-reference/configuration/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/configuration/
https://developers.cloudflare.com/agents/getting-started/add-to-existing-project/ https://agents-updates.preview.developers.cloudflare.com/agents/getting-started/add-to-existing-project/
https://developers.cloudflare.com/agents/api-reference/mcp-client-api/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/mcp-client-api/
https://developers.cloudflare.com/agents/api-reference/schedule-tasks/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/schedule-tasks/
https://developers.cloudflare.com/agents/concepts/agent-class/ https://agents-updates.preview.developers.cloudflare.com/agents/concepts/agent-class/
https://developers.cloudflare.com/agents/api-reference/queue-tasks/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/queue-tasks/
https://developers.cloudflare.com/agents/getting-started/quick-start/ https://agents-updates.preview.developers.cloudflare.com/agents/getting-started/quick-start/
https://developers.cloudflare.com/agents/api-reference/callable-methods/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/callable-methods/
https://developers.cloudflare.com/agents/api-reference/client-sdk/ https://agents-updates.preview.developers.cloudflare.com/agents/api-reference/client-sdk/

@threepointone threepointone merged commit a02cdc6 into production Apr 11, 2026
16 checks passed
@threepointone threepointone deleted the agents-updates branch April 11, 2026 15:30
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. size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants