Skip to main content
E2B cloud agents provide instant, isolated sandboxes in the cloud with pre-configured development environments.

Quick Start

1

Setup E2B API Key

Get your API key from E2B Dashboard
2

Basic E2B Agent


How It Works

E2B provides instant sandbox provisioning with pre-built environments, eliminating container startup time.

Sandbox Management

Instant Provisioning

Code Execution

File Operations


LLM Integration


Common Patterns

Data Science Workflow

Web Scraping

API Testing


Configuration Options

E2B Configuration

Available Templates

Custom Templates


Best Practices

Use base for general Python work. Use python template for data science with pre-installed packages. Create custom templates for repeated setups.
Install packages once per sandbox session. E2B sandboxes persist packages during the session but reset between sessions.
E2B sandboxes auto-shutdown after timeout. Always call shutdown_compute() to clean up resources and avoid charges.
Store E2B_API_KEY securely. Never commit API keys to code. Use environment variables or secure secret management.

Managed Agents

Overview of managed agent concepts

Modal Compute

Serverless compute environments