StateSet Sandbox
Self-hosted Kubernetes sandbox infrastructure for running AI agents and code execution workloads in isolated containers. REST and WebSocket APIs for creating sandboxes, streaming command output, and managing files.Skill Files
Check for updates: Re-fetch these files anytime to see new features!
API Base URL
Environment Variables:
Architecture Overview
- Isolated execution per sandbox pod with resource limits
- REST and WebSocket APIs for command execution and streaming
- File read/write APIs for workspace workflows
- Prebuilt runtime with Node.js, Python, Go, Rust, and CLI tools
- Automatic cleanup with per-sandbox timeouts
- Warm pool support for sub-100ms startup
Agent Registration
AI agents must register to receive an API key for authentication.Register a New Agent
api_key securely. It is only returned once.
Authentication
All API requests require authentication:Quick Start
1. Create a Sandbox
2. Write Files
3. Execute Commands
4. Read Files
5. Stop Sandbox
TypeScript SDK
Installation
Basic Usage
Streaming Execution
Extended SDK (Advanced Features)
Python SDK
Installation
Basic Usage
Running Claude Code Agent
WebSocket API
Connect for real-time streaming:API Reference
Sandbox Lifecycle
File Operations
Command Execution
Execute Request:
Checkpoints
Artifacts (Cloud Storage)
MCP Servers
Agent Sessions
API Keys
Webhooks
Tunnels (Port Forwarding)
Create Sandbox Options
Agent Sessions
Long-running agent sessions with automatic sandbox rotation:pending- Created, not startedrunning- Active executionrotating- Sandbox rotation in progresspaused- Temporarily suspendedcompleted- Successfully finishedfailed- Error occurredcancelled- Manually stopped
MCP Server Integration
Start Model Context Protocol servers inside sandboxes:filesystem- File operationsgithub- GitHub repository accesspostgres- PostgreSQL queriesslack- Slack messagingbrave-search- Web searchpuppeteer- Browser automation
Checkpoints
Save and restore sandbox state:Webhooks
Subscribe to sandbox events:sandbox.created,sandbox.ready,sandbox.stopped,sandbox.error,sandbox.timeoutcommand.started,command.completed,command.failedfile.written,artifact.uploaded,artifact.deletedcheckpoint.created,checkpoint.restored,checkpoint.deletedmcp.started,mcp.stoppedresource.warning,resource.criticalsecurity.alert
Configuration
Environment Variables
Self-Hosted Deployment
Prerequisites
- Kubernetes cluster (1.24+)
- kubectl configured
- PostgreSQL database
- Redis (optional, for warm pools)
Deploy
Configure Secrets
Security
Container Isolation
- Non-root user: Runs as UID 1001
- Dropped capabilities: ALL capabilities dropped
- Seccomp profile: Enabled by default
- Read-only filesystem: Only /workspace is writable
- Resource limits: CPU, memory, ephemeral storage enforced
Network Isolation
- Egress allowed: HTTPS (443), DNS (53)
- Private ranges blocked: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
- Network policies: Restrictive by default
Authentication
- API Keys: Revocable, organization-scoped
- JWTs: Signed with secret, expiring tokens
- Rate limiting: Per-organization limits
Preinstalled Tools
Each sandbox includes:Quick Reference
CLI Commands (curl)
SDK Quick Reference
Ideas to Try
- Register and create your first sandbox
- Run a Claude Code agent to generate and test code
- Set up checkpoints to save and restore work
- Use MCP servers for database or GitHub integration
- Create agent sessions for long-running tasks
- Set up webhooks for real-time notifications
- Deploy self-hosted with warm pools for fast startup
- Use GPU sandboxes for ML workloads
StateSet Sandbox v0.4.0 January 2026