# E2B — Secure Sandboxes for AI Code Execution > Open-source cloud sandboxes for AI agents to execute code safely. Isolated Linux environments with filesystem, networking, and process control. 11.5K+ stars. ## Install Save as a script file and run: ## Quick Use ```bash pip install e2b-code-interpreter ``` ```python from e2b_code_interpreter import Sandbox with Sandbox() as sandbox: execution = sandbox.run_code("print('Hello from sandbox!')") print(execution.text) ``` Get API key at [e2b.dev](https://e2b.dev). --- ## Intro E2B provides open-source, secure cloud sandboxes for AI agents to execute code safely. Each sandbox is an isolated Linux environment with its own filesystem, networking, and process control — spun up in ~150ms. Used by major AI companies for code execution in chatbots, coding agents, and data analysis pipelines. 11,500+ GitHub stars, Apache 2.0. **Best for**: AI applications that need to execute user or AI-generated code safely **Works with**: OpenAI, Anthropic, LangChain, CrewAI, AutoGen, any agent framework --- ## Key Features ### Instant Sandboxes Spin up isolated Linux environments in ~150ms. Each sandbox runs in its own microVM. ### Code Interpreter SDK Execute Python, JavaScript, R, Java, and more with output capture: ```python result = sandbox.run_code(""" import matplotlib.pyplot as plt plt.plot([1,2,3], [4,5,6]) plt.savefig('chart.png') """) # result.artifacts contains the chart image ``` ### Filesystem & Networking Full Linux filesystem, install packages, make HTTP requests, run servers inside the sandbox. ### Custom Templates Pre-configure sandboxes with specific languages, packages, and tools. ### Security Isolated microVMs — no access to host system. Auto-terminate after timeout. --- ### FAQ **Q: What is E2B?** A: Secure cloud sandboxes for AI code execution. Isolated Linux environments that spin up in 150ms. Used for AI chatbots, coding agents, and data analysis. 11.5K+ stars. **Q: Is E2B free?** A: Free tier with 100 sandbox hours/month. Open-source self-hosting available. --- ## Source & Thanks > Created by [E2B](https://github.com/e2b-dev). Licensed under Apache 2.0. > [e2b-dev/e2b](https://github.com/e2b-dev/e2b) — 11,500+ GitHub stars --- Source: https://tokrepo.com/en/workflows/49c40861-0582-4894-a6ab-5841858eb6d7 Author: Script Depot