env.dev

Emergent (E2B)

Cloud sandboxes for AI agents. Secure, isolated environments for running LLM-generated code safely.

Visit Emergent (E2B)

Overview

E2B (Emergent) provides secure cloud sandboxes designed for AI agents. Each sandbox is a lightweight VM where LLM-generated code can run safely — install packages, write files, and execute commands without risk to the host system. E2B is the infrastructure layer for autonomous AI coding.

Key Features

  • Instant sandbox creation in under 200ms
  • Python and Node.js runtimes pre-configured
  • Filesystem access for reading and writing files
  • Package installation (pip, npm) within sandboxes
  • Persistent sessions across multiple LLM interactions
  • Simple SDK for integration with any AI framework

Example: Running AI-Generated Code

TypeScript
import { Sandbox } from '@e2b/code-interpreter';

const sandbox = await Sandbox.create();
const result = await sandbox.runCode(`
  import pandas as pd
  df = pd.DataFrame({'name': ['Alice', 'Bob'], 'score': [95, 87]})
  print(df.describe())
`);
console.log(result.text);
await sandbox.close();

Use Cases

Code Interpreters

Build ChatGPT-style code interpreters that execute user code safely in isolated sandboxes.

Autonomous Agents

Give AI agents a safe environment to install packages, run scripts, and test their own code.

Data Analysis

Execute data analysis pipelines with pandas, matplotlib, and other Python libraries in sandboxes.

Frequently Asked Questions

What is E2B?

E2B provides cloud sandboxes where AI agents can safely execute LLM-generated code, install packages, and interact with the filesystem in isolated environments.

What are the use cases?

AI-powered code interpreters, autonomous agent environments, data analysis pipelines, and any scenario where LLM-generated code needs secure execution.

How fast are E2B sandboxes?

E2B sandboxes start in under 200ms, making them suitable for real-time AI agent interactions.