e2b-dev / E2B

Secure cloud runtime for AI apps & AI agents. Fully open-source.
https://e2b.dev/docs
Apache License 2.0
6.32k stars 394 forks source link
agent ai ai-agent ai-agents code-interpreter copilot development devtools gpt gpt-4 javascript llm nextjs openai python react software typescript

e2b logo

Cloud Runtime for AI Agents

Secure sandboxed cloud environments made for AI agents and AI apps

Docs | Website | Discord | Twitter

Last 1 month downloads for the Python SDK Last 1 month downloads for the Python SDK

Cover image

What is E2B?

E2B Sandbox is a secure sandboxed cloud environment made for AI agents and AI apps. Sandboxes allow AI agents and apps to have long running cloud secure environments. In these environments, large language models can use the same tools as humans do. For example:

The E2B sandbox can be connected to any LLM and any AI agent or app.


Code interpreter SDK

We have built a dedicated SDK for building custom code interpreters in your AI apps. It's build on top of E2B and our core E2B SDK.

Getting started & documentation

Please visit documentation to get started.

To create and control a sandbox, you use our SDK:

Python

  1. Install SDK
pip install e2b
  1. Start sandbox
from e2b import Sandbox

# Create sandbox
sandbox = Sandbox()

# Let an LLM use the sandbox here
# Visit https://e2b.dev/docs/sandbox/overview to learn more about sandboxes.

# Close sandbox once done
sandbox.close()

JavaScript & TypeScript

  1. Install SDK
npm install e2b
  1. Start sandbox
import { Sandbox } from "e2b";

// Create sandbox
const sandbox = await Sandbox.create();

// Let an LLM use the sandbox here
// Visit https://e2b.dev/docs/sandbox/overview to learn more about sandboxes.

// Close sandbox once done
await sandbox.close();

Repository Structure

This repository is a monorepo containing:

  1. Python SDK
  2. JS SDK
  3. CLI
  4. Documentation