Sandboxes
Containerized execution environments that provide secure, isolated spaces for AI coding assistants to run code and interact with your projects.
What is a Sandbox?
A Sandbox is a persistent Cloudflare Container that provides a secure execution environment for your projects. AI coding assistants like Claude Code, Cursor, and Windsurf connect to sandboxes via WebSocket to execute commands, read/write files, and interact with your codebase.
Containerized
Built on Cloudflare's Sandbox SDK for secure, isolated execution.
WebSocket Connected
Real-time communication with AI assistants via WebSocket gateway.
Persistent
State persists across sessions for continuous development workflows.
Connection Architecture
How AI Assistants Connect
wss://api.rizome.dev/v1/sandbox/{sandboxId}/connect?token={jwt_or_api_key}Creating Sandboxes
From Project
Create a sandbox linked to a specific project (recommended):
Standalone Sandbox
Create a sandbox without a specific project (for experimentation):
Sandbox Operations
Command Execution
Execute commands in the sandbox environment:
{
"type": "exec",
"id": "req-1",
"payload": {
"command": "npm install",
"cwd": "/workspace/project"
}
}File Operations
Read, write, and watch files in real-time:
{
"type": "file.read",
"id": "req-2",
"payload": {
"path": "/workspace/src/index.ts"
}
}Port Forwarding
Expose ports for preview and testing:
POST /v1/sandboxes/:id/portshttps://sbx-123-3000.rizome.devGit Integration
Full git operations within the sandbox:
git status, git commit, git pushAI Assistant Integration
Claude Code
claude --connect-sandbox sbx_123Direct integration with Claude Code's native sandbox protocol.
Cursor
cursor --remote-ssh rizome://sbx_123Connect via SSH tunnel to work with remote development.
Windsurf
windsurf --workspace wss://api.rizome.dev/...WebSocket connection for real-time collaboration.
Instance Types
Basic
RecommendedStandard
PopularPerformance
High-endSecurity & Isolation
Built-in Security Features
Container Isolation
Each sandbox runs in a fully isolated container with no access to other workspaces
Path Restrictions
All file operations limited to /workspace directory
Resource Limits
CPU, memory, and disk usage capped per instance type
Encrypted Communication
All WebSocket connections secured with TLS encryption
Access Control
JWT and API key authentication required for all connections
Audit Logging
Complete audit trail of all operations and connections
Next Steps
Technical Reference
Detailed technical documentation for sandbox operations and WebSocket protocol.