Skip to content

Commit ec93ffe

Browse files
authored
Update README.md
1 parent fc5c52a commit ec93ffe

File tree

1 file changed

+21
-86
lines changed

1 file changed

+21
-86
lines changed

README.md

Lines changed: 21 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -2,86 +2,48 @@
22
<img width="100" src="/readme-assets/logo-circle.png" alt="e2b logo">
33
</p>
44

5-
6-
<h1 align="center">
7-
E2B SDK
8-
</h1>
9-
105
<h4 align="center">
116
<a href="https://pypi.org/project/e2b/">
127
<img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
138
style="color:transparent;width:auto;height:100%" src="https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads">
149
</a>
1510
<a href="https://www.npmjs.com/package/e2b">
16-
<img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
11+
<img alt="Last 1 month downloads for the JavaScript SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
1712
style="color:transparent;width:auto;height:100%" src="https://img.shields.io/npm/dm/e2b?label=NPM%20Downloads">
1813
</a>
1914
</h4>
2015

2116
<!---
2217
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
23-
2418
--->
19+
## What is E2B?
20+
[E2B](https://www.e2b.dev/) is an open-source infrastructure that allows you run to AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter).
2521

26-
---
27-
### What is E2B?
28-
29-
[E2B](https://www.e2b.dev/) is an open-source runtime for running AI-generated code in secure cloud Sandboxes. It's tailor-made for agentic & AI use cases.
30-
31-
### E2B Sandbox
32-
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.:
33-
34-
- Running LLM generated code
35-
- Cloud browsers
36-
- GitHub repositories and CLIs
37-
- Coding tools like linters, autocomplete, "go-to defintion"
38-
- Audio & video editing
39-
40-
<!---
41-
<h3 align="center">
42-
SDK made to control the E2B Sandboxes - secure cloud environments for running LLM-generated code
43-
</h3>
44-
--->
45-
46-
### E2B SDK
47-
48-
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.
49-
50-
- ✔️ Works with any LLM and AI framework (see [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) for examples)
51-
- ✔️ Supports streaming content like charts and stdout, stderr
52-
- ✔️ Python & JS SDK
53-
- ✔️ Runs on serverless and edge functions
54-
- ✔️ Runs AI-generated code in secure sandboxed environments
55-
- ✔️ 100% open source (including [infrastructure](https://github.com/e2b-dev/infra))
56-
57-
58-
##### 💻 Supported language runtimes
59-
- ✔️ Python
60-
- JavaScript
61-
- R
62-
- Java
63-
64-
65-
<h1 align="center">
66-
Start with E2B SDK
67-
</h1>
68-
22+
## Run your first Sandbox
6923

7024
### 1. Install SDK
7125

72-
JavaScript/TypeScript
26+
JavaScript / TypeScript
7327
```
7428
npm i @e2b/code-interpreter
7529
```
7630

7731
Python
7832
```
79-
pip install e2b
33+
pip install e2b-code-interpreter
34+
```
35+
36+
### 2. Get your E2B API key
37+
1. Sign up to E2B [here](https://e2b.dev).
38+
2. Get your API key [here](https://e2b.dev/dashboard?tab=keys).
39+
3. Set environment variable with your API key
8040
```
41+
E2B_API_KEY=e2b_***
42+
```
8143

82-
### 2. Execute code with code interpreter inside Sandbox
44+
### 3. Execute code with code interpreter inside Sandbox
8345

84-
**JavaScript**
46+
JavaScript / TypeScript
8547
```ts
8648
import { Sandbox } from '@e2b/code-interpreter'
8749

@@ -90,47 +52,20 @@ await sbx.runCode()('x = 1')
9052

9153
const execution = await sbx.runCode()('x+=1; x')
9254
console.log(execution.text) // outputs 2
93-
94-
await sandbox.close()
9555
```
9656

97-
**Python**
57+
Python
9858
```py
9959
from e2b_code_interpreter import Sandbox
10060

10161
with Sandbox() as sandbox:
10262
sandbox.run_code()("x = 1")
103-
10463
execution = sandbox.run_code()("x+=1; x")
10564
print(execution.text) # outputs 2
10665
```
10766

108-
### 3. More resources
109-
- Check out the [JavaScript/TypeScript](https://e2b.dev/docs/hello-world/js) and [Python](https://e2b.dev/docs/hello-world/py) "Hello World" guides to learn how to use our SDK.
110-
111-
- See [E2B documentation](https://e2b.dev/docs) to get started.
112-
113-
- Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.
114-
115-
116-
## Repository Structure
117-
118-
This repository is a monorepo containing:
119-
120-
1. [Python SDK](/packages/python-sdk)
121-
1. [JS SDK](/packages/js-sdk)
122-
1. [CLI](/packages/cli)
123-
1. [Documentation](/apps/web/)
124-
125-
___
67+
### 4. Check docs
68+
Visit [E2B documentation](https://e2b.dev/docs).
12669

127-
<div align='center'>
128-
<!-- <a href="https://e2b.dev/docs" target="_blank">
129-
<img src="https://img.shields.io/badge/docs-%2300acee.svg?color=143D52&style=for-the-badge&logo=x&logoColor=white" alt=docs style="margin-bottom: 5px;"/></a> -->
130-
<a href="https://twitter.com/e2b_dev" target="_blank">
131-
<img src="https://img.shields.io/badge/x (twitter)-%2300acee.svg?color=000000&style=for-the-badge&logo=x&logoColor=white" alt=linkedin style="margin-bottom: 5px;"/></a>
132-
<a href="https://discord.com/invite/U7KEcGErtQ" target="_blank">
133-
<img src="https://img.shields.io/badge/discord -%2300acee.svg?color=143D52&style=for-the-badge&logo=discord&logoColor=white" alt=discord style="margin-bottom: 5px;"/></a>
134-
<a href="https://www.linkedin.com/company/e2b-dev/" target="_blank">
135-
<img src="https://img.shields.io/badge/linkedin-%2300acee.svg?color=000000&style=for-the-badge&logo=linkedin&logoColor=white" alt=linkedin style="margin-bottom: 5px;"/></a>
136-
</div align='center'>
70+
### 5. E2B cookbook
71+
Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.

0 commit comments

Comments
 (0)