Skip to main content
Secure Code Sandboxes & Agent RuntimesFreemiumCloud Code Sandbox

E2B Code Interpreter

Secure cloud sandboxes for autonomous AI agent code execution

E2B provides isolated, sub-second cloud sandboxes where AI agents can execute arbitrary Python, JavaScript, and shell code safely.

Quickstart Execution

sandbox.ts

Get started with E2B Code Interpreter in your project.

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

const sbx = await Sandbox.create()
const execution = await sbx.runCode(`
import pandas as pd
data = {"Year": [2022, 2023, 2024], "Revenue_DKK_M": [45.2, 52.8, 61.4]}
df = pd.DataFrame(data)
print(df.describe())
`)

console.log(execution.text)
await sbx.close()

About E2B Code Interpreter

E2B is the default execution runtime for autonomous coding agents. When your agent fetches data from a Danish open API or scraper, E2B gives the agent a complete Linux environment (with preinstalled pandas, matplotlib, httpx, and node) to analyze the data, run statistical regressions, and produce visual reports without risk to the host system.

DK

Danish Product & Data Recipes

How developers and agents use E2B Code Interpreter to connect with Danish digital infrastructure.

Run Financial Analysis on Danish Company Annual Reports

Allow an agent to fetch Danish XBRL/PDF accounting statements from Erhvervsstyrelsen and compute solvency metrics in a safe Python sandbox.

Key Capabilities

Spins up secure Linux micro-VMs in <150ms
Pre-loaded with data science & automation packages
Streaming stdout, stderr, and generated charts/files
Full filesystem access with persistence during session
Official TypeScript and Python SDKs