Gå til hovedindhold
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.

Kom hurtigt i gang

sandbox.ts

Kom i gang med E2B Code Interpreter i dit projekt.

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()

Om 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

Danske data- og produkt-guides

Hvordan udviklere og agenter bruger E2B Code Interpreter til at tilgå dansk digital infrastruktur.

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.

Nøglefunktioner

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