◆SkillAgentic capabilityFree
E2B Code Interpreter SDK
Secure cloud sandboxes for running AI-generated code — spin up a Python/JS interpreter in 150ms from your agent.
Installs175k
Rating★ 4.7
Reviews58
E2B Code Interpreter SDK
The E2B SDK provides secure, isolated cloud micro-VMs that let AI agents safely execute code generated by LLMs. Each sandbox starts in ~150ms and can run arbitrary Python, JavaScript, shell commands, and Jupyter-style notebooks — without any risk to the host system.
Key Features
- Sub-200ms cold start: VMs are pre-warmed; your agent never waits long for a sandbox
- Persistent state: variables, files, and installed packages persist for the lifetime of the sandbox session
- Code interpreter: Jupyter-compatible kernel with stdout, stderr, rich display (plots, DataFrames, HTML)
- File system: upload/download files, mount datasets, and share artifacts back to the user
- Custom images: bake in your own dependencies with a one-line template definition
- Multi-language: Python, Node.js, Java, Go, Rust — any language installable in a Debian container
Quick Start
pip install e2b-code-interpreter
from e2b_code_interpreter import Sandbox
with Sandbox() as sbx:
execution = sbx.run_code("""
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({'x': range(10), 'y': [i**2 for i in range(10)]})
df.plot(x='x', y='y')
plt.savefig('chart.png')
print('Chart saved!')
""")
print(execution.text)
sbx.files.download('chart.png', 'local_chart.png')
npx ai-supply add e2b-code-interpreter-sdk
Curated mirror of the open-source E2B SDK (Apache-2.0). Get it from the source.