How e2b-dev/e2b works
E2B is a cloud sandbox platform exposed through JavaScript and Python SDKs, with a CLI and specialized Code Interpreter and Desktop packages. The principal workflow is to configure a client, create or connect to a sandbox, then execute commands or interact with its files and processes. Template building, volumes, sandbox lifecycle controls, code interpretation, and desktop automation are distinct capabilities. The graph emphasizes Python SDK paths where source relationships are indexed or excerpted; other package links follow README-described capabilities, so some connections remain undocumented at source level.
Main entry points: sandbox_sync/main.py Sandbox Lifecycle · __init__.py SDK Exports · e2b_desktop/main.py Desktop Controls · template/main.py Template Builder
Components 18
Core SDKs
- SDK Exports
packages/python-sdk/e2b/__init__.py - Client Setup
packages/python-sdk/e2b/connection_config.py
Sandbox Runtime
- Sandbox Lifecycle
packages/python-sdk/e2b/sandbox_sync/main.py - Async Sandbox
packages/python-sdk/e2b/sandbox_async/main.py - Sandbox Base
packages/python-sdk/e2b/sandbox/main.py - Sandbox Interface
packages/python-sdk/e2b/envd/api.py - Command Execution
packages/python-sdk/e2b/sandbox/commands/command_handle.py - File Operations
packages/python-sdk/e2b/sandbox/filesystem/filesystem.py - Sandbox Git
packages/python-sdk/e2b/sandbox_sync/git.py
Specialized SDKs
- Code Interpreter
packages/code-interpreter-js/src/client.ts - Code Execution
packages/code-interpreter-js/src/sandbox.ts - Desktop SDK
packages/desktop-python/e2b_desktop/client.py - Desktop Controls
packages/desktop-python/e2b_desktop/main.py
Templates and Storage
- Template Builder
packages/python-sdk/e2b/template/main.py - Build Workflow
packages/python-sdk/e2b/template_sync/main.py - Persistent Volumes
packages/python-sdk/e2b/volume/volume_sync.py
Other components
- Developer
- E2B Cloud
Connections 25
- Developer → SDK Exports: uses
README.md - SDK Exports → Sandbox Lifecycle: exports
packages/python-sdk/e2b/__init__.py - SDK Exports → Client Setup: exports
packages/python-sdk/e2b/__init__.py - SDK Exports → Template Builder: exports
packages/python-sdk/e2b/__init__.py - SDK Exports → Persistent Volumes: exports
packages/python-sdk/e2b/__init__.py - Client Setup → E2B Cloud: configures requests
- Sandbox Lifecycle → Sandbox Base: uses
packages/python-sdk/e2b/sandbox_sync/main.py - Sandbox Lifecycle → Sandbox Interface: uses
packages/python-sdk/e2b/sandbox_sync/main.py - Async Sandbox → Sandbox Base: uses
packages/python-sdk/e2b/sandbox_async/main.py - Async Sandbox → Sandbox Interface: uses
packages/python-sdk/e2b/sandbox_async/main.py - Sandbox Lifecycle → E2B Cloud: controls sandboxes
README.md - Sandbox Lifecycle → Command Execution: exposes
packages/python-sdk/e2b/sandbox_sync/main.py - Sandbox Lifecycle → File Operations: exposes
packages/python-sdk/e2b/sandbox_sync/main.py - Sandbox Lifecycle → Sandbox Git: exposes
packages/python-sdk/e2b/sandbox_sync/main.py - Developer → Template Builder: defines template
packages/python-sdk/e2b/template/main.py - Template Builder → Build Workflow: builds with
packages/python-sdk/e2b/template_sync/main.py - Build Workflow → E2B Cloud: submits build
- Developer → Persistent Volumes: uses
- Developer → Code Interpreter: installs and uses
README.md - Code Interpreter → Code Execution: creates
packages/code-interpreter-js/src/client.ts - Code Execution → Sandbox Lifecycle: extends sandbox
README.md - Developer → Desktop SDK: installs and uses
README.md - Desktop SDK → Desktop Controls: creates
packages/desktop-python/e2b_desktop/client.py - Desktop Controls → Command Execution: runs desktop commands
packages/desktop-python/e2b_desktop/main.py - Desktop Controls → File Operations: reads screenshots
packages/desktop-python/e2b_desktop/main.py