freshcrate
Skin:/
Home > AI Agents > e2b

e2b

E2B SDK that give agents cloud environments

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

<p align="center"> <img width="100" src="https://raw.githubusercontent.com/e2b-dev/E2B/refs/heads/main/readme-assets/logo-circle.png" alt="e2b logo"> </p> <h4 align="center"> <a href="https://pypi.org/project/e2b/"> <img alt="Last 1 month downloads for the Python SDK" loading="lazy" decoding="async" style="color:transparent;width:170px;height:18px" src="https://static.pepy.tech/personalized-badge/e2b?period=monthly&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=PyPi%20Monthly%20Downloads"> </a> </h4> ## What is E2B? [E2B](https://www.e2b.dev/) is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/e2b) or [Python SDK](https://pypi.org/project/e2b). ## Run your first Sandbox ### 1. Install SDK ``` pip install e2b ``` ### 2. Get your E2B API key 1. Sign up to E2B [here](https://e2b.dev). 2. Get your API key [here](https://e2b.dev/dashboard?tab=keys). 3. Set environment variable with your API key ``` E2B_API_KEY=e2b_*** ``` ### 3. Start a sandbox and run commands ```py from e2b import Sandbox with Sandbox.create() as sandbox: result = sandbox.commands.run('echo "Hello from E2B!"') print(result.stdout) # Hello from E2B! ``` ### 4. Code execution with Code Interpreter If you need [`run_code()`](https://e2b.dev/docs/code-interpreting), install the [Code Interpreter SDK](https://github.com/e2b-dev/code-interpreter): ``` pip install e2b-code-interpreter ``` ```py from e2b_code_interpreter import Sandbox with Sandbox.create() as sandbox: execution = sandbox.run_code("x = 1; x += 1; x") print(execution.text) # outputs 2 ``` ### 5. Check docs Visit [E2B documentation](https://e2b.dev/docs). ### 6. E2B cookbook Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.

Release History

VersionChangesUrgencyDate
@e2b/python-sdk@2.59.0### Minor Changes - e5a9fa6: Add `dnsServers` to the network options (`dns_servers` in Python): the DNS servers a sandbox can reach when `allowOut` contains a domain. Leave it out to allow the default, 8.8.8.8, pass a list of IPs to allow those instead, or pass `[]` to allow none. It only opens the firewall and doesn't change the sandbox's `/etc/resolv.conf`. `updateNetwork`/`update_network` reset it to the default when it is left out, like the other fields, and `getInfo`/`get_info` report it wHigh10/22/2026
@e2b/desktop-python@2.7.2### Patch Changes - 2416fdb: Require `pillow` 13 (`pillow>=13.0.0,<14`) to pick up the fixes for CVE-2026-112404 and CVE-2026-112895High10/22/2026
@e2b/code-interpreter-python@2.11.2### Patch Changes - d7ed073: Remove Python 3.10 compatibility shims (Python >=3.11 is already required). - Updated dependencies [d7ed073] - Updated dependencies [3c4c7cf] - @e2b/python-sdk@2.58.0High10/20/2026
@e2b/code-interpreter-python@2.11.0### Minor Changes - 547decc: Require Python 3.11 or newer (Python 3.10 is no longer supported). ### Patch Changes - Updated dependencies [547decc] - Updated dependencies [775f017] - @e2b/python-sdk@2.56.0High10/13/2026
@e2b/python-sdk@2.55.1### Patch Changes - 29064bc: `ConnectionConfig.get_sandbox_url` / `get_sandbox_direct_url` take an optional `port` (defaults to the envd port).High10/9/2026
@e2b/python-sdk@2.55.0### Minor Changes - b52cd30: Add `mode: 'full' | 'filesystem'` (exported as the `SnapshotMode` type) to `createSnapshot` / `create_snapshot`. With `'filesystem'`, only the filesystem is persisted: the snapshot is smaller and faster to take, and sandboxes created from it cold-boot (start fresh from disk) instead of restoring memory. The source sandbox keeps running either way. Omitted, the API default (a full memory snapshot) applies. `pause()` and the `lifecycle.onTimeout` / `lifecycle["on_tHigh10/9/2026
e2b@2.53.1### Patch Changes - cd4c62b: Publish the changes from the previous release, which was versioned but failed to publish to npm and PyPI.High10/6/2026
@e2b/python-sdk@2.52.1### Patch Changes - cc29617: Match BuildKit when filtering the template build context with `.dockerignore`: a leading `**` followed by literal characters (e.g. `**.txt`) now matches at any depth, a negated pattern matching only a parent directory (e.g. `src/app.ts` then `!src`) no longer re-includes the path, and in the JS SDK `?` and bracket expressions match characters outside the BMP (e.g. emoji) as a single character. - 3ba1d05: Retry a `502` response only for operations that are safe to reHigh10/5/2026
e2b@2.52.0### Minor Changes - 2de0cc3: Cap sandbox fork count at 20. `e2b sandbox fork --count`, JavaScript `Sandbox.fork({ count })`, and Python `Sandbox.fork(count=...)` reject a count outside 1–20 before the API call. Counts from 21 through 100 used to reach the API. Omitting count still leaves the field off the request so the API default applies. - 03887ad: Apply `.dockerignore` and `fileIgnorePatterns` / `file_ignore_patterns` the way Docker does when copying files into a template, so ignored files High10/1/2026
e2b@2.51.0### Minor Changes - 5c0f6eb: Remove SDK-side defaults from API request payloads so the API defaults apply when options are omitted. Sandbox create/fork/connect no longer preset a 5-minute timeout, fork no longer presets `count: 1`, create no longer presets `allow_internet_access`, pause no longer presets keeping memory, and template builds no longer preset CPU/memory. Explicitly provided values are still sent unchanged. Sandbox create and connect now use the v2 API endpoints (`POST /v2/sandbHigh9/18/2026
@e2b/cli@2.20.0### Minor Changes - 6a608ef: Add `e2b sandbox fork` command to fork a running sandbox into one or more new sandboxesHigh9/18/2026
@e2b/cli@2.19.1### Patch Changes - 5b015ad: Removed the hidden `e2b template build` command (alias `bd`). It printed a V1 deprecation notice and exited 1; the V1 build system it fronted is gone from the API. A script still calling it now gets commander's unknown-command error with the same exit code. Build templates with `e2b template create` or the Template SDK; `e2b template migrate` still converts a V1 project (see https://e2b.dev/docs/template/migration-v2). - Updated dependencies [956e3ab] - Updated depeHigh9/16/2026
@e2b/python-sdk@2.49.1### Patch Changes - 5e418dc: Document that `onResume` / `on_resume` needs a control plane that knows the option: an older self-hosted or BYOC control plane drops the `memory` field and restores memory while reporting success, instead of rejecting the request. - 9136603: Retry control-plane HTTP requests up to three times after `429` responses using the server's delta-seconds `Retry-After` delay. Retries can be configured or disabled with `retries`, and stop when waiting would exhaust the requesHigh9/10/2026
@e2b/python-sdk@2.46.4### Patch Changes - 6146cd0: Improve reliability for high-concurrency sandbox workloads by spreading envd traffic across four HTTP/2 connection pools. Set `E2B_ENVD_POOL_SHARDS` before importing the SDK to adjust the pool count.High9/2/2026
@e2b/python-sdk@2.45.1### Patch Changes - b17b726: Stop the shared retrying transports from mirroring streamed request bodies in memory. pyqwest's retry middleware keeps a non-`bytes` body replayable by copying it as it is sent, so a streamed `files.write` of a file-like object or `volume.write_file` grew a full in-RAM mirror and peak memory scaled with file size. The transports now declare pyqwest's `RetryMode.UNBUFFERED`: a streamed body is replayed only while nothing has been read from it, which is all High8/21/2026
e2b@2.38.3### Patch Changes - cab27aa: Kill newly created sandboxes when MCP gateway startup fails. The failure now surfaces as `SandboxError` (JS) / `SandboxException` (Python) with a `Failed to start MCP gateway: <stderr>` message instead of a bare command exit error.High8/10/2026
@e2b/cli@2.16.0### Minor Changes - 48e9249: Bump `@npmcli/package-json` from `^5.2.1` to `^7.0.5`, clearing the last `npm warn deprecated glob@10.5.0` warning printed on every `@e2b/cli` install (`@npmcli/package-json@5` pinned `glob@10`; `7.0.4` moved to `glob@13`). Together with the `e2b` glob bump, a fresh `npm install @e2b/cli` is now warning-free and drops from 183 to 145 packages. `@npmcli/package-json@7` requires Node `^20.17.0 || >=22.9.0`, so the CLI's Node 22 floor moves from `>=22` to `>=22.9.0`High7/27/2026
@e2b/python-sdk@2.34.0### Minor Changes - 95e4dc2: Add `sandbox.fork()` / `Sandbox.fork(sandbox_id)` (and the `AsyncSandbox` equivalents) for forking a running sandbox. The sandbox is checkpointed in place (briefly paused, snapshotted with its full memory state, and resumed — its ID and expiration stay untouched) and `count` new sandboxes are created from that snapshot. Each fork succeeds or fails independently: the returned list contains one entry per requested fork, either a running sandbox instance or an exceptioHigh7/17/2026
@e2b/cli@2.13.1### Patch Changes - 2869feb: Add override options to `e2b template migrate`: `--name`/`-n` to override the generated template name, `--cmd`/`-c` for the start command, `--ready-cmd` for the ready command, and `--cpu-count` / `--memory-mb` for sandbox resources. Each falls back to the value from the config file (`e2b.toml`) when not provided. `--cpu-count` and `--memory-mb` (on both `migrate` and `create`) now reject non-numeric values at parse time instead of silently becoming `NaN`. Template nHigh7/8/2026
e2b@2.31.0### Minor Changes - 7e7e951: Add an object form to the sandbox `lifecycle.onTimeout` (`on_timeout` in Python) that controls the snapshot kind taken when a sandbox auto-pauses on timeout, via `keepMemory` (`keep_memory`). `onTimeout` now accepts either the existing bare action (`'pause'` / `'kill'`) or the object form. The object form is a discriminated union on `action`: `keepMemory` is only accepted alongside `action: 'pause'` — pairing it with `action: 'kill'` is a compile-time tHigh6/25/2026
@e2b/python-sdk@2.29.4### Patch Changes - 726ced6: Fix duplicate logo on NPM/PyPI by switching to `<picture>` element.High6/19/2026
@e2b/python-sdk@2.28.2### Patch Changes - 554dc88: Create Python SDK sync HTTP clients from the calling thread, including sandbox envd clients and API clients used by template uploads. - 82d6e32: Use dedicated HTTP/1.1 clients for Python template file uploads to signed storage URLs.High6/12/2026
e2b@2.28.0### Minor Changes - 073661a: Add API-only custom header options for the JavaScript and Python SDKs. ### Patch Changes - e7a82ea: Remove unused internal code: `wait` helper (js-sdk), `asSandboxTemplate`/`asHeadline`/`selectOption`/`basicDockerfile` (cli), and `format_execution_timeout_error` (python-sdk). No public API changes. - 5b2bb94: Return a dedicated rate limit error for HTTP 429 responses from the envd API. Previously these were surfaced as a generic sandbox error, unlike the main API High6/6/2026
@e2b/python-sdk@2.25.1### Patch Changes - 4b9cc04: Use the stable sandbox host for envd requests on supported E2B domains and give envd traffic a separate HTTP transport cache from API traffic. Sync envd transports are cached per thread to avoid sharing a single HTTP/2 connection across threaded sync workloads. High5/29/2026
@e2b/cli@2.10.2### Patch Changes - 6d66d15: Fix `e2b auth login` crashing on headless machines where `xdg-open` is unavailable. The CLI now spawns the browser opener directly so it can catch the spawn `ENOENT` synchronously, prints the login URL so the user can open it manually, and suggests setting `E2B_API_KEY` when interactive login is not possible. High5/22/2026
e2b@2.21.0### Minor Changes - 2ac5de2: Add `signal: AbortSignal` option to JS SDK methods to support cancelling in-flight requests. The signal can be passed to `Sandbox.create`, `Sandbox.connect`, `sandbox.commands.run`, `sandbox.files.*`, volume methods, and other request options. When the signal is aborted, the underlying `fetch` is aborted and the returned promise rejects with an `AbortError`. `SandboxPaginator.nextItems` and `SnapshotPaginator.nextItems` now accept a `SandboxApiOpts` argument High5/18/2026
e2b@2.20.1### Patch Changes - eaf452a: add optional name parameter to createSnapshot and return snapshot names High5/14/2026
e2b@2.20.0### Minor Changes - b2a2786: Compatibility for turbopack High5/11/2026
e2b@2.19.5### Patch Changes - f7a97e6: Use HTTP/2 for JS SDK envd/api requests and require Node.js 20.18.1 or newer. High5/6/2026
e2b@2.19.4### Patch Changes - ae13876: drop unused `npm-check-updates` devDependency to clear remaining `tar@6` Dependabot security alerts High4/30/2026
e2b@2.19.2### Patch Changes - 2c995d4: added opt-in `useOctetStream` / `use_octet_stream` option to sandbox file write; default is now `multipart/form-data` regardless of envd version High4/27/2026
e2b@2.19.1### Patch Changes - 3167e19: fix(js-sdk): buffer template tar archive before upload so `fetch` sets `Content-Length` instead of falling back to `Transfer-Encoding: chunked`. S3 presigned PUT URLs reject chunked requests with `501 NotImplemented`, breaking template uploads in self-hosted deployments backed by S3-compatible storage. Aligns the JS SDK with the Python SDK, which already buffers via `io.BytesIO`. - 2f0ff5f: fix(sdk): prevent shell injection in MCP config by using proper shell esHigh4/24/2026
2.20.0Imported from PyPI (2.20.0)Low4/21/2026
@e2b/python-sdk@2.20.0### Minor Changes - cf35f61: switch to application/octet-stream for file uploads - 1cc385a: Edit README ### Patch Changes - ef46004: Increase default timeout for volume file uploads to 1 hour Medium4/2/2026
e2b@2.19.0### Minor Changes - cf35f61: switch to application/octet-stream for file uploads - 1cc385a: Edit README ### Patch Changes - ef46004: Increase default timeout for volume file uploads to 1 hour Medium4/2/2026
@e2b/python-sdk@2.19.0### Minor Changes - 6d7e72e: added volumes support to the SDKs Medium3/26/2026
e2b@2.18.0### Minor Changes - 6d7e72e: added volumes support to the SDKs Medium3/26/2026
e2b@2.17.0### Minor Changes - f7f1f29: Update SDK READMEs Medium3/25/2026
@e2b/python-sdk@2.18.0### Minor Changes - f7f1f29: Update SDK READMEs Medium3/25/2026
@e2b/cli@2.9.0### Minor Changes - dcaca73: cli supports info command which is the equivilent of the getInfo ### Patch Changes - Updated dependencies [1c55083] - Updated dependencies [7c8d298] - e2b@2.16.0 Medium3/23/2026
e2b@2.16.0### Minor Changes - 7c8d298: adds network configs and lifecycle handling to info responses ### Patch Changes - 1c55083: Fix missing instance config propagation in Sandbox pause/connect and add regression tests for config forwarding + overrides. Medium3/23/2026
@e2b/python-sdk@2.17.0### Minor Changes - 7c8d298: adds network configs and lifecycle handling to info responses ### Patch Changes - 1c55083: Fix missing instance config propagation in Sandbox pause/connect and add regression tests for config forwarding + overrides. Medium3/23/2026
@e2b/python-sdk@2.16.0### Minor Changes - ca85620: Add `fixMissing` / `fix_missing` option to `aptInstall` / `apt_install` to support the `--fix-missing` flag in apt-get install ### Patch Changes - 5a673d1: chore: distinguish between Sandbox and file not found Medium3/23/2026
e2b@2.15.0### Minor Changes - ca85620: Add `fixMissing` / `fix_missing` option to `aptInstall` / `apt_install` to support the `--fix-missing` flag in apt-get install ### Patch Changes - 5a673d1: chore: distinguish between Sandbox and file not found Medium3/23/2026
@e2b/cli@2.8.2### Patch Changes - ba7caa5: Fix update notifier not displaying by replacing update-notifier with simple-update-notifier - 8abfa62: fix(cli): use `name` parameter instead of deprecated `alias` in template init generated code - Updated dependencies [ca85620] - Updated dependencies [5a673d1] - e2b@2.15.0 Medium3/23/2026
@e2b/python-sdk@2.15.3### Patch Changes - 710fae6: request_timeout applies to connect/pool/write Low3/18/2026
@e2b/python-sdk@2.15.2### Patch Changes - 16c86d1: Support multiple asyncio loops Low3/9/2026
@e2b/cli@2.8.1### Patch Changes - b0ab7f7: Add implicit limit for sandbox list query to CLI Low3/9/2026
@e2b/python-sdk@2.15.1### Patch Changes - 222105d: include .dot files in template file upload Low3/6/2026
e2b@2.14.1### Patch Changes - 222105d: include .dot files in template file upload - 3c56842: fix: pass sandbox headers to EnvdApiClient Low3/6/2026
e2b@2.14.0### Minor Changes - 7027f36: Adds lifecycle prop to control pausing and auto-resume Low3/4/2026
@e2b/python-sdk@2.15.0### Minor Changes - 7027f36: Adds lifecycle prop to control pausing and auto-resume Low3/4/2026
e2b@2.13.1### Patch Changes - e83cf86: Add `getTags`/`get_tags` method to list all tags for a template Low3/4/2026
@e2b/python-sdk@2.14.1### Patch Changes - 6371d0c: Fix sandbox not found error message in set_timeout - e83cf86: Add `getTags`/`get_tags` method to list all tags for a template Low3/4/2026
@e2b/cli@2.8.0### Minor Changes - bcc6ea8: Add `pause` and `resume` commands to manage sandbox state. - `e2b sandbox pause <sandboxID>` - pause a running sandbox - `e2b sandbox resume <sandboxID>` - resume a paused sandbox ### Patch Changes - Updated dependencies [e83cf86] - e2b@2.13.1 Low3/4/2026
@e2b/cli@2.7.3### Patch Changes - b989b29: fix crash on invalid status codes in error handler Low2/26/2026
@e2b/cli@2.7.2### Patch Changes - 6c1db7d: fix issue with pagination on listSandboxes Low2/25/2026
@e2b/python-sdk@2.14.0### Minor Changes - a55ca21: Add snapshot API for creating persistent sandbox snapshots Low2/24/2026
e2b@2.13.0### Minor Changes - a55ca21: Add snapshot API for creating persistent sandbox snapshots Low2/24/2026
@e2b/cli@2.7.1### Patch Changes - a2cd86c: added -d option to create sandbox in detached mode - 8f53fdc: set default template to spawn command - a26e213: Print Sandbox Inspect url for E2B Dashboard Inspection Low2/21/2026
@e2b/python-sdk@2.13.3### Patch Changes - c38a181: fixes type errors when using with ty Low2/21/2026
@e2b/cli@2.7.0### Minor Changes - 87ceec2: Implement closeStdin to allow piping commands into the CLI Low2/12/2026
@e2b/cli@2.6.1### Patch Changes - 575d5bc: Fix CLI team ID resolution when E2B_API_KEY is set via environment variable. Add E2B_TEAM_ID env var support. Previously, the CLI always used the team ID from ~/.e2b/config.json, causing "Team ID param mismatch" errors when the API key belonged to a different team. Low2/9/2026
@e2b/python-sdk@2.13.2### Patch Changes - 6395a5f: Fix type checker compatibility for class_method_variant descriptor Low2/9/2026
e2b@2.12.1### Patch Changes - 8efc53c: Use chunked transfer encoding for tar uploads to reduce memory usage - 5e9c6d6: fix: validate copy src paths are relative and within context directory - 1780a0c: Fix error handling for API responses with empty body. Low2/9/2026
@e2b/python-sdk@2.13.1### Patch Changes - 5e9c6d6: fix: validate copy src paths are relative and within context directory - 1a8fed0: Consolidate logic on the git functionality and tests to ensure parity on sync/async functionality Low2/9/2026
e2b@2.12.0### Minor Changes - 77b08f5: Adds first class support to git commands to the sandbox sdk. Low1/29/2026
@e2b/python-sdk@2.13.0### Minor Changes - 77b08f5: Adds first class support to git commands to the sandbox sdk. Low1/29/2026
@e2b/python-sdk@2.12.2### Patch Changes - 4af9b4c: avoid reading files on upload Low1/29/2026
@e2b/cli@2.6.0### Minor Changes - 631522d: Use v2 template update endpoint and display namespaced template name after publishing ### Patch Changes - Updated dependencies [631522d] - Updated dependencies [4af9b4c] - e2b@2.11.2 Low1/29/2026
e2b@2.11.2### Patch Changes - 631522d: Add v2 template update endpoint with TemplateUpdateResponse containing namespaced names - 4af9b4c: avoid reading files on upload Low1/29/2026
@e2b/python-sdk@2.12.1### Patch Changes - 07ef17f: deprecate aliasexists and add exists Low1/27/2026
e2b@2.11.1### Patch Changes - 07ef17f: deprecate aliasexists and add exists Low1/27/2026
@e2b/cli@2.5.1### Patch Changes - 10abab8: Update templates to use new `Template.build()` format - Updated dependencies [10abab8] - e2b@2.11.0 Low1/27/2026
@e2b/python-sdk@2.12.0### Minor Changes - 10abab8: Add template versioning with tags support - `Template.build()` now accepts names in `name:tag` format (e.g., `"my-template:v1.0"`) - New `Template.assignTags()` / `Template.assign_tags()` to assign tags to existing builds - New `Template.removeTags()` / `Template.remove_tags()` to remove tags Low1/27/2026
e2b@2.11.0### Minor Changes - 10abab8: Add template versioning with tags support - `Template.build()` now accepts names in `name:tag` format (e.g., `"my-template:v1.0"`) - New `Template.assignTags()` / `Template.assign_tags()` to assign tags to existing builds - New `Template.removeTags()` / `Template.remove_tags()` to remove tags Low1/27/2026
e2b@2.10.5### Patch Changes - 1c5cf95: Use portable mode for deterministic gzip output Low1/26/2026
@e2b/python-sdk@2.11.0### Minor Changes - ae48a0a: Drop support for Python 3.9 Low1/26/2026
e2b@2.10.4### Patch Changes - c1ee183: Add writeFiles function to sync with Python SDK Low1/23/2026
@e2b/cli@2.5.0### Minor Changes - 4ebabfe: Add exec command Low1/22/2026
e2b@2.10.3### Patch Changes - 5fd71a2: Add user-agent header to EnvdApiClient Low1/20/2026
e2b@2.10.2### Patch Changes - a8e5201: fix float timeout to int conversion for Go backend compatibility - ab906ad: fix: adjust timestamp conversion to remove milliseconds Low1/15/2026
@e2b/python-sdk@2.10.2### Patch Changes - ab906ad: fix:timestamp conversion for metric endpoints Low1/15/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

langgraph-prebuiltLibrary with high-level APIs for creating and executing LangGraph agents and tools.1.2.17
claude-agent-sdkPython SDK for Claude Codev0.2.174
bedrock-agentcoreAn SDK for using Bedrock AgentCorev1.25.0
newrelicNew Relic Python Agentv14.1.0
strands-agentsA model-driven approach to building AI agents in just a few lines of codeharness-cli/v0.2.2

More in AI Agents

claude-memA Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future ses
AIGC-Interview-Book【三年面试五年模拟】AIGC算法工程师面试秘籍。涵盖AIGC、LLM大模型、AI Agent、传统深度学习、自动驾驶、机器学习、计算机视觉、自然语言处理、强化学习、大数据挖掘、具身智能、元宇宙、AGI等AI行业面试笔试干货经验与核心知识。
letta-codeThe memory-first coding agent
nano-banana-pro-prompts-recommend-skillAI skill for OpenClaw & Claude Code — recommend from 10000+ Nano Banana Pro (Gemini) image prompts. Smart search by use case, content remix, sample images.