Skip to main content

E2B SDK that give agents cloud environments

Project description

e2b logo

E2B SDK

The E2B SDK is made to control the E2B Sandboxes - secure cloud environments for running LLM-generated code. The SDK lets you give your AI app a custom code interpreter.

  • ✔️ Works with any LLM and AI framework (see Cookbook for examples)
  • ✔️ Supports streaming content like charts and stdout, stderr
  • ✔️ Python & JS SDK
  • ✔️ Runs on serverless and edge functions
  • ✔️ Runs AI-generated code in secure sandboxed environments
  • ✔️ 100% open source (including infrastructure)
💻 Supported language runtimes
  • ✔️ Python
  • (Beta) JavaScript, R, Java

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


What is E2B?

E2B is an open-source runtime for running AI-generated code in secure cloud Sandboxes. It's tailor-made for agentic & AI use cases.

E2B Sandbox

E2B Sandbox is a secure cloud environment that allows AI agents and apps. You can run multiple instances of Sandboxes, and have long-running sessions. Inside the Sandboxes, LLMs can use the same tools as humans do, e.g.:

  • Running LLM generated code
  • Cloud browsers
  • GitHub repositories and CLIs
  • Coding tools like linters, autocomplete, "go-to defintion"
  • Audio & video editing

Getting Started & Documentation

Please visit documentation to get started.

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

e2b-0.17.2a62.tar.gz (44.2 kB view hashes)

Uploaded Source

Built Distribution

e2b-0.17.2a62-py3-none-any.whl (79.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page