cubesandbox-ai-sandbox
БесплатноБез исполняемых скриптовНе проверенCubeSandbox — instant, hardware-isolated, E2B-compatible sandbox service for AI agents built on RustVMM/KVM
от reason-machines★ 99 звёзд на GitHubОб этом скилле
CubeSandbox AI Sandbox Skill
Skill by ara.so — Daily 2026 Skills collection.
CubeSandbox is a high-performance secure sandbox service built on RustVMM and KVM. It provides hardware-isolated (dedicated Guest OS kernel) sandbox environments that start in under 60ms, consume less than 5MB memory overhead per instance, and are fully compatible with the E2B SDK — making it a drop-in replacement for E2B with better performance and true VM-level isolation.
What CubeSandbox Does
- Spins up KVM-backed microVMs in <60ms using snapshot cloning + CoW memory
- Provides thousands of concurrent isolated sandboxes per node (<5MB RAM overhead each)
- Offers E2B SDK compatibility — just change one env var to migrate
- Enforces kernel-level network isolation via eBPF (CubeVS)
- Supports single-node and multi-node cluster deployments
- Enables code execution, shell commands, file ops, browser automation, and RL training
Requirements
- x86_64 Linux with KVM enabled (bare metal, WSL2, or cloud bare-metal)
- Not supported on shared VMs that don't allow nested virtualization
Check KVM availability:
ls /dev/kvm && echo "KVM available"
Installation
Option A: Development VM (WSL2 / no bare metal)
git clone https://github.com/tencentcloud/CubeSandbox.git
cd CubeSandbox/dev-env
./prepare_image.sh # one-time: downloads runtime image
./run_vm.sh # start the dev VM (keep terminal open)
# In a second terminal:
./login.sh # shell into the dev VM
Option B: Bare-Metal / Cloud Server
Inside the target Linux host (or the dev VM from Option A):
# Global users:
curl -sL https://github.com/tencentcloud/CubeSandbox/raw/master/deploy/one-click/online-install.sh | bash
# Mainland China mirror:
curl -sL https://cnb.cool/CubeSandbox/CubeSandbox/-/git/raw/master/deploy/one-click/online-install.sh | MIRROR=cn bash
This installs cubemastercli and starts the CubeAPI service on port 3000.
Key CLI: cubemastercli
Create a Template from a Docker Image
cubemastercli tpl create-from-image \
--image ccr.ccs.tencentyun.com/ags-image/sandbox-code:latest \
--writable-layer-size 1G \
--expose-port 49999 \
--expose-port 49983 \
--probe 49999
# Returns a job_id
Watch Build Progress
cubemastercli tpl watch --job-id <job_id>
# Wait for status: READY
# Note the template_id from output
List Templates
cubemastercli tpl list
Delete a Template
cubemastercli tpl delete --template-id <template_id>
List Running Sandboxes
cubemastercli sandbox list
Kill a Sandbox
cubemastercli sandbox kill --sandbox-id <sandbox_id>
Environment Variables
# Required for SDK usage
export E2B_API_URL="http://127.0.0.1:3000" # CubeAPI endpoint
export E2B_API_KEY="dummy" # any non-empty string (auth not required locally)
export CUBE_TEMPLATE_ID="<your-template-id>" # from cubemastercli tpl watch output
export SSL_CERT_FILE="/root/.local/share/mkcert/rootCA.pem" # local CA cert
Python SDK Usage (E2B-Compatible)
Install the E2B SDK:
pip install e2b-code-interpreter
Basic Code Execution
import os
from e2b_code_interpreter import Sandbox
template_id = os.environ["CUBE_TEMPLATE_ID"]
with Sandbox.create(template=template_id) as sandbox:
result = sandbox.run_code("print('Hello from CubeSandbox!')")
print(result.text)
# Output: Hello from CubeSandbox!
Run Python with Return Values
import os
from e2b_code_interpreter import Sandbox
with Sandbox.create(template=os.environ["CUBE_TEMPLATE_ID"]) as sandbox:
result = sandbox.run_code("""
import math
data = [1, 4, 9, 16, 25]
roots = [math.sqrt(x) for x in data]
print(roots)
roots
""")
print(result.text) # stdout
print(result.results) # return value of last expression
Shell Command Execution
import os
from e2b_code_interpreter import Sandbox
with Sandbox.create(template=os.environ["CUBE_TEMPLATE_ID"]) as sandbox:
# Run shell commands
result = sandbox.run_code("import subprocess; print(subprocess.check_output(['ls', '-la', '/'], text=True))")
print(result.text)
File Operations
import os
from e2b_code_interpreter import Sandbox
with Sandbox.create(template=os.environ["CUBE_TEMPLATE_ID"]) as sandbox:
# Write a file
sandbox.files.write("/tmp/hello.txt", "Hello, CubeSandbox!")
# Read the file back
content = sandbox.files.read("/tmp/hello.txt")
print(content)
# List directory
entries = sandbox.files.list("/tmp")
for entry in entries:
print(entry.name, entry.type)
Install Packages at Runtime
import os
from e2b_code_interpreter import Sandbox
with Sandbox.create(template=os.environ["CUBE_TEMPLATE_ID"]) as sandbox:
# Install a package inside the sandbox
Установить cubesandbox-ai-sandbox в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cubesandbox-ai-sandbox?
CubeSandbox — instant, hardware-isolated, E2B-compatible sandbox service for AI agents built on RustVMM/KVM
Как установить скилл cubesandbox-ai-sandbox?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cubesandbox-ai-sandbox запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic