☁️ E2B Cloud Sandbox
E2B (Excelsior-to-Browser) is a cloud-native code interpretation infrastructure. HelseCLI integrates E2B to provide high-performance, secure sandboxes without requiring local Docker.
E2B (Excelsior-to-Browser) is a cloud-native code interpretation infrastructure. HelseCLI integrates E2B to provide high-performance, secure sandboxes without requiring local Docker.
⚙️ Configuration
To use E2B, you need an API key:
- Get a key at e2b.dev.
- Add it to your
.env:E2B_API_KEY=e2b_... - Set your default sandbox type:
HELSE_SANDBOX_TYPE=e2b
🚀 Key Advantages
1. Zero Local Runtime
You can execute complex Python, Node.js, or Go code without having those runtimes installed on your machine. Everything happens in the cloud.
2. High Compute
E2B snapshots provide powerful CPU and RAM allocations, making them ideal for heavy data science tasks that might slow down your local machine.
3. State Persistence
E2B allows the AI to keep a sandbox running across multiple prompts. This means variables and files created in "Step 1" are still there in "Step 10."
🛠️ How HelseCLI Uses E2B
When the AI calls the execute_python tool with environment="e2b":
- VM Launch: HelseCLI starts a new session in an E2B sandbox.
- Context Upload: Any local files the script needs are uploaded to the VM.
- Execution: The script runs on E2B's infrastructure.
- Download: Any results or generated artifacts (images, CSVs) are downloaded back to your project folder.
💡 Best For
- Data analysis with large datasets.
- Running experiments that require high isolation.
- Users who don't want to manage Docker locally.
- Shared environments where local Docker might not be available (like GitHub Codespaces).