The Universal Open Standard for Compute Sandboxes
OpenRuntime is a protocol-first, polyglot, production-ready standard for compute sandboxes that works everywhere—from browsers to Kubernetes clusters.
Current sandbox solutions are fragmented across languages and providers. OpenRuntime provides:
- 🌐 Universal Protocol: OpenRPC-based JSON-RPC 2.0 standard
- 🔌 Provider Agnostic: Works with E2B, Modal, Daytona, Cloudflare, Vercel, custom providers
- 🚀 Production Ready: Built-in pooling, retry, circuit breakers
- 📊 Observable: Native OpenTelemetry integration
- 💰 Cost Aware: Automatic cost optimization and routing
- 🔒 Secure: mTLS, secret masking, audit logging
- 🎯 Type Safe: Generated SDKs for Python, TypeScript, Go, Rust
┌─────────────────────────────────────────────────────────┐
│ Application Layer │
│ Next.js, Django, CLI, Jupyter, VS Code Extensions │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ SDK Layer (Auto-Generated) │
│ Python, TypeScript, Go, Rust, Java │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Control Plane (Go Reference Server) │
│ Routing, Pooling, Cost Optimizer, Observability │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Provider Adapters (WebAssembly Plugins) │
│ E2B, Modal, Vercel, Custom Providers │
└─────────────────────────────────────────────────────────┘
# Python
pip install openruntime
# TypeScript
npm install openruntimefrom openruntime import Runtime
# Auto-discovers best provider based on requirements
async with Runtime.create(
runtime="python",
features=["filesystem"],
max_cost_per_hour=0.50
) as sandbox:
result = await sandbox.execute("print('Hello, OpenRuntime!')")
print(result.stdout)import { createRuntime } from 'openruntime';
const sandbox = await createRuntime({
runtime: 'node',
features: ['filesystem', 'network'],
maxCostPerHour: 0.50
});
const result = await sandbox.execute("console.log('Hello, OpenRuntime!')");
console.log(result.stdout);OpenRuntime automatically selects the best provider based on your requirements:
sandbox = await Runtime.create(
runtime="python",
min_memory_gb=4,
features_required=["filesystem", "terminal"],
features_optional=["gpu"],
constraints={
"max_cost_per_hour": 0.50,
"preferred_regions": ["us-east-1"],
"min_availability_sla": 99.9
}
)Built-in connection pooling with LRU eviction and TTL:
pool = await RuntimePool.create(
min_idle=2,
max_total=10,
idle_timeout=600,
ttl=3600,
template="python:3.11-ml"
)
sandbox = await pool.acquire(labels={"session": "user_123"})
# ... use sandbox ...
await pool.release(sandbox)Production-grade resilience patterns:
runtime = Runtime(
retry=RetryConfig(
max_attempts=3,
exponential_base=2.0,
jitter=True
),
circuit_breaker=CircuitBreakerConfig(
failure_threshold=5,
recovery_timeout=60
)
)Native OpenTelemetry integration:
# Automatic traces, metrics, and logs
sandbox = await Runtime.create(runtime="python")
# Traces include:
# - runtime.provider = "e2b"
# - runtime.region = "us-east-1"
# - runtime.cost_per_hour = 0.35
# Metrics include:
# - runtime_sandbox_create_duration_seconds
# - runtime_sandbox_active_count
# - runtime_execution_errors_total
# - runtime_cost_total_usdopenruntime/
├── spec/ # OpenRPC specification
│ ├── openruntime.json # Main protocol spec
│ └── capabilities/ # Capability schemas
├── server/ # Go reference server
│ ├── cmd/ # CLI entrypoint
│ ├── internal/ # Core implementation
│ └── plugins/ # Provider adapters
├── sdk/ # Auto-generated SDKs
│ ├── python/
│ ├── typescript/
│ └── go/
├── providers/ # Provider adapter examples
│ ├── e2b/
│ ├── modal/
│ └── template/
└── docs/ # Documentation
- OpenRPC specification
- Go reference server
- Provider adapter framework
- E2B + Modal adapters
- Python SDK (auto-generated)
- TypeScript SDK (auto-generated)
- Framework integrations (Next.js, Django, FastAPI)
- Provider marketplace
- Cost optimizer
- Enterprise features (RBAC, SSO, audit)
- Cross-provider migration tools
We welcome contributions! See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.
- Documentation: https://openruntime.io
- GitHub: https://github.com/openruntime/openruntime
- Discord: https://discord.gg/openruntime
- Twitter: @openruntime
Built with ❤️ by the open-source community