This document describes the compatibility of Agent Sandbox Flash Edition with the E2B SDK and E2B CLI. Other getting-started documents keep only the minimum integration steps, so use this topic as the reference for API boundaries before you integrate.
For more information, see Usage constraints.
Compatibility overview
| Capability | Status | Notes |
| Sandbox | Partially compatible (pause and resume require allowlist access only on the first-generation runtime, not on the second-generation runtime; SDK 2.51.0 does not yet support creating or connecting to sandboxes) | Supports create, connect, inspect, timeout updates, pause, kill, upload and download URLs, and port access URLs. Use an SDK version earlier than 2.51.0. |
| Commands | Compatible | Supports command execution, management of running processes, standard input, and PTY. |
| Filesystem | Partially compatible | Supports file read and write, directory management, rename, delete, existence checks, and directory watching. Agent Sandbox Flash Edition supports custom file metadata only on the second-generation runtime (microVM). The first-generation runtime does not support custom file metadata. |
| Code Interpreter | Compatible | Supports code execution, context management, execution outputs, streaming output, and state persistence across runs. Charts can only be retrieved as files through Filesystem or download URLs. |
| Template | Compatible | Supports template create, read, update, and delete. Templates can be built from images. |
| CLI | Partially compatible | Supports the commonly used sandbox and template commands. |
| Network Config Update | Compatible | Supports updating the network configuration of a running sandbox. |
| Snapshots | Compatible (requires allowlist access) | Supports creating, listing, and deleting snapshots, and restoring a sandbox from a snapshot ID or qualified name. Available only on the second-generation runtime (microVM); retained for 7 days by default from creation. For usage notes, see Snapshots. |
| Volume / Access Token | Not currently compatible | These capabilities are not recommended as part of the Agent Sandbox Flash Edition integration path. Manage teams in the console. |
Compatible APIs
Sandbox
Pause and resume is available only to allowlisted accounts on the first-generation runtime. Complete allowlist enablement before calling sandbox.pause() or connecting to a paused sandbox. The second-generation runtime supports pause and resume by default, without allowlist access.
Snapshots are also available only to allowlisted accounts, and only on the second-generation runtime (microVM). Complete allowlist enablement before calling snapshot-related APIs.
The following sandbox lifecycle and access capabilities are supported:
-
Sandbox.create() -
Sandbox.connect(sandboxId) -
Sandbox.list() -
Sandbox.getInfo(sandboxId) -
Sandbox.kill(sandboxId) -
Sandbox.setTimeout(sandboxId, ms) -
sandbox.getInfo() -
sandbox.isRunning() -
sandbox.setTimeout(ms) -
sandbox.pause() -
sandbox.kill() -
sandbox.downloadUrl(path) -
sandbox.uploadUrl(path) -
sandbox.getHost(port) -
sandbox.createSnapshot({ name? })/Sandbox.createSnapshot(sandboxId, { name? }) -
Sandbox.listSnapshots({ sandboxId?, name?, limit?, nextToken? }) -
Sandbox.deleteSnapshot(snapshotId | qualifiedName) -
Python:
sandbox.create_snapshot(name=...)/Sandbox.create_snapshot(sandbox_id, name=...),Sandbox.list_snapshots(...),Sandbox.delete_snapshot(snapshot_id | qualified_name)
Sandbox.connect(sandboxId) can attach to an existing sandbox. If the target sandbox is paused, it is automatically resumed when you connect.
The template parameter of Sandbox.create() can be a snapshot ID or the qualified name of a named snapshot, in addition to a template name or template ID. For snapshot usage limits and naming rules, see Snapshots.
Commands
The following command execution and process management capabilities are supported:
-
sandbox.commands.run() -
sandbox.commands.list() -
sandbox.commands.connect() -
sandbox.commands.sendStdin() -
sandbox.commands.kill()
Use the sandbox.pty API for interactive terminals and tasks that depend on TTY.
Filesystem
The following filesystem capabilities are supported:
-
sandbox.files.list() -
sandbox.files.exists() -
sandbox.files.getInfo()/sandbox.files.get_info() -
sandbox.files.read() -
sandbox.files.write() -
sandbox.files.makeDir()/sandbox.files.make_dir() -
sandbox.files.remove() -
sandbox.files.rename() -
sandbox.files.watchDir()/sandbox.files.watch_dir()
sandbox.files.write() supports text, binary, and streaming content. Directory watching is useful for waiting for agent output files or syncing task artifacts.
Agent Sandbox Flash Edition does not support custom file metadata on the first-generation runtime. For example, the files.write() signature in Python SDK e2b==2.31.0 accepts the metadata parameter. However, a first-generation sandbox runs envd 0.5.2. Before it sends the write request, the SDK raises TemplateException: File metadata requires envd 0.6.2 or later.
Code Interpreter
The core Code Interpreter capabilities are supported:
-
sandbox.runCode()/sandbox.run_code() -
sandbox.createCodeContext()/sandbox.create_code_context() -
sandbox.listCodeContexts()/sandbox.list_code_contexts() -
sandbox.restartCodeContext()/sandbox.restart_code_context() -
sandbox.removeCodeContext()/sandbox.remove_code_context() -
Execution outputs, including stdout, stderr, execution count, bare expression results, and rich results in
execution.results. -
In streaming scenarios, stdout, stderr, and result callbacks.
-
Variable and context state persistence across multiple code executions.
-
Execution of Python, JavaScript, TypeScript, and Bash through the
languageparameter.
For charts and visualizations, Agent Sandbox Flash Edition supports the file-based fallback path only: generate image files inside the sandbox and retrieve them through Filesystem or download URLs.
Template
Operations for creating, querying, updating, and deleting templates (CRUD) are supported. The current template build supports creating templates from images. For details, see Build and manage templates.
CLI
Agent Sandbox Flash Edition is compatible with the commonly used E2B CLI sandbox commands and extends part of the template management workflow:
| Command | Agent Sandbox Flash Edition status | Notes |
sandbox create <template> |
Supported | Creates a sandbox and connects to an interactive terminal. The sandbox is automatically terminated after you exit the terminal. |
sandbox list |
Supported | Returns running sandboxes by default. Supports --state, --metadata, --limit, and --format. |
sandbox kill |
Supported | Supports killing by ID and bulk killing with --all. |
sandbox connect |
Supported | Connects to an existing sandbox and opens an interactive terminal. Exiting the terminal does not terminate the sandbox. |
sandbox exec |
Supported | Executes a command inside a running sandbox and returns the output to the local terminal. |
template list |
Agent Sandbox Flash Edition extension |
Lists the templates available in Agent Sandbox Flash Edition. Output fields may change across versions. Run template list --help to view the specific parameters.
|
New E2B CLI versions authenticate with E2B_API_KEY. For configuration details, see Use Agent Sandbox Flash Edition with the CLI.
Metrics
E2B metrics are supported, and the console provides observability. The Metrics API is not currently supported.
Limited capabilities
-
The latest SDK 2.51.0 does not yet support
Sandbox.create()orSandbox.connect(). Use an SDK version earlier than 2.51.0. The officially recommended versions are as follows:Python:
e2b==2.31.0ande2b-code-interpreter==2.8.1Node.js:
e2b@^2.31.0and@e2b/code-interpreter@^2.6.1
Capabilities not currently supported
The following capabilities are not part of the primary E2B-compatible integration path for Agent Sandbox Flash Edition:
-
Volume API.
-
Team management (manage teams in the console).
-
API key and access token management.
If you need persistent storage or cloud data access, use Alibaba Cloud storage services such as NAS or OSS first. To preserve sandbox runtime state, use Snapshots. Create and manage API keys in the Agent Sandbox console, not through the E2B SDK. For details, see Create an API Key.
Capabilities such as VPC access, OSS integration, log collection, and monitoring alerts belong to the Agent Sandbox Flash Edition Extensions (cloud extensions) and are not native E2B SDK-compatible interfaces.
Extension capabilities
Beyond E2B compatibility, Agent Sandbox Flash Edition also provides Extensions (cloud extensions) that connect to Function Compute and Alibaba Cloud infrastructure. These capabilities do not change the basic usage of the E2B SDK or CLI:
-
Extensions overview: an overview of the extension capabilities and the entry point to each sub-capability.
-
VPC network configuration: allows a sandbox to access resources in your VPC, such as RDS, Redis, NAS, and internal APIs.
-
Custom Domains for Agent Sandbox Flash Edition: access services in a sandbox through your own fixed domain name and certificate.
-
Dynamic OSS Mounts: mount an OSS bucket or subdirectory to a local directory inside a sandbox when the sandbox is created.
-
Monitoring and logs: view the running status and resource usage of a sandbox, and collect stdout and stderr logs to Simple Log Service.
-
Team Quota Management: set CPU and memory quotas per team for resource isolation and cost control.
-
Create an OSS Volume: save the mount configuration of an existing OSS bucket so that sandboxes can mount it by volume name.
-
Create an AgenticFS Volume: save the mount configuration of an existing AgenticFS access point so that sandboxes can mount it by volume name.
Migration recommendations
-
If you already have an E2B-based application, keep the SDK call pattern unchanged first and only replace the API key, API URL, and domain.
-
Start with
code-interpreter-v1and a minimal sandbox example to verify sandbox creation, command execution, file I/O, and cleanup. -
If your application depends on the Metrics API, Logs, or Volume, adjust the design before migration instead of assuming the original E2B path will work unchanged. Snapshots are supported, but their naming, deletion paths, and restore constraints differ from those in official E2B. Before migrating, read Snapshots.
-
In production code, always call
sandbox.kill()explicitly to avoid leaving sandboxes running longer than intended.