e2bgateway

mcp
Security Audit
Fail
Health Warn
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Fail
  • Hardcoded secret — Potential hardcoded credential in .github/workflows/e2e.yml
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

E2BGateway is a unified gateway that enables the official E2B client to interoperate with multiple agent runtimes including agent-sandbox and OpenSandbox, delivering standardized sandbox APIs for AI agents.

README.md

E2BGateway

License
Go Version
Release
Stars

E2BGateway acts as an abstraction gateway layer for AI agent sandboxes. It provides a fully compatible interface aligned with the official E2B client protocol, transparently routing requests to diverse underlying agent runtime implementations such as agent-sandbox and OpenSandbox.

Why E2BGateway?

  • Eliminate vendor lock-in — Write once, run against any sandbox backend
  • Zero-code migration — Existing E2B SDK users connect with only a URL change
  • Multi-backend routing — Dynamic routing, load balancing, and failover between sandbox clusters
  • Production ready — Auth, rate limiting, audit logging, and OpenTelemetry observability built-in

Quick Start

import os

# Point E2B SDK at your E2BGateway instance
os.environ["E2B_API_URL"] = "https://sandbox.example.com"
os.environ["E2B_API_KEY"] = "your-api-key"

from e2b_code_interpreter import Sandbox

# Standard E2B code — no modifications needed
sbx = Sandbox.create(template="code-interpreter")
result = sbx.run_code("print('Hello from E2BGateway!')")
print(result.text)
sbx.kill()

Supported Backends

Backend Type Status Description
E2B Cloud SaaS passthrough ✅ Supported Transparent proxy to official E2B API
agent-sandbox K8s CRD-based ✅ Supported Kubernetes-native sandbox via SandboxClaim CRDs with warm pool
OpenSandbox Container-based ✅ Supported Alibaba's open-source container sandbox runtime
CubeSandbox Container-based 🚧 Planned High-performance container sandbox with plugin-based integration
AgentENV Environment-based 🚧 Planned Agent environment platform with plugin-based integration

Architecture

image

See the full architecture design for details.

API Compatibility

E2BGateway implements the complete E2B REST API:

  • POST/GET/DELETE /api/v1/sandboxes — Sandbox lifecycle
  • POST /api/v1/sandboxes/{id}/code — Code execution
  • POST /api/v1/sandboxes/{id}/commands — Shell commands
  • POST/GET /api/v1/sandboxes/{id}/files/* — Filesystem operations
  • GET /api/v1/sandboxes/{id}/ports — List open ports (port forwarding)
  • GET /api/v1/sandboxes/{id}/ports/{port} — Get port URL (port forwarding)
  • GET/POST/DELETE /api/v1/templates — Template management
  • WebSocket channels for streaming code execution, terminals, and port forwarding

Build & Run

# Build
make build

# Run locally
make run

# Run tests
make test

# Docker
make docker-build

# Helm
helm install e2bgateway deploy/helm/e2bgateway

Configuration

See configs/e2bgateway-default.yaml for the default configuration and configs/e2bgateway-example.yaml for a full example with all backends.

Documentation

Related Projects

License

Apache License 2.0. See LICENSE.

Reviews (0)

No results found