Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Nov 26, 2025

Summary

Documents the new WebSocket transport feature for the Cloudflare Sandbox SDK introduced in cloudflare/sandbox-sdk#253.

This PR adds documentation for the WebSocket transport mode, which allows multiplexing all SDK requests over a single persistent WebSocket connection. This reduces sub-request count when running inside Workers/Durable Objects.

Changes

  • Sandbox options (/sandbox/configuration/sandbox-options/):

    • Add transportMode configuration option with HTTP and WebSocket modes
    • Document when to use each transport mode
    • Include code examples showing both HTTP and WebSocket usage
    • Add "When to use transportMode" guidance section
  • Architecture concepts (/sandbox/concepts/architecture/):

    • Update architecture diagram to show "HTTP API or WebSocket" as transport option
    • Add "Transport modes" section explaining the two modes
    • Update request flow to mention both HTTP and WebSocket

Why this matters

When making many SDK operations in quick succession, the default HTTP transport can hit Worker sub-request limits (1000 per request in free tier). WebSocket transport solves this by multiplexing all operations over a single connection, significantly reducing sub-request count.

Related PR

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

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

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

Documents the new WebSocket transport mode introduced in PR #253.
This feature allows multiplexing all SDK requests over a single
WebSocket connection, reducing sub-request count in Workers/DOs.

Changes:
- Add transportMode configuration option in sandbox-options.mdx
- Document HTTP vs WebSocket modes with usage examples
- Add "When to use transportMode" guidance section
- Update architecture diagram to show WebSocket as transport option
- Add transport modes explanation in architecture concepts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@agents-git-bot agents-git-bot bot changed the title Ws transport Add WebSocket transport documentation for Sandbox SDK Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants