Skip to main content
E2B provides cloud sandboxes for running AI-generated code in isolated environments. See the E2B docs for signup, authentication, and platform details.

Installation

Authentication

Set your E2B API key:
Configure E2B-specific options, such as templates or sandbox lifetime, through the E2B SDK when creating the sandbox.

Create a sandbox

In Python, you create the sandbox using the E2B SDK, then wrap it with the deepagents backend.

Use with Deep Agents

Cleanup

Always kill E2B sandboxes when you are done to avoid ongoing resource usage. See also: Sandboxes.