Skip to content

Commit d363eaa

Browse files
committed
Update readme
1 parent 5ee2c83 commit d363eaa

File tree

1 file changed

+96
-29
lines changed

1 file changed

+96
-29
lines changed

README.md

Lines changed: 96 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,51 @@
11
<p align="center">
2-
<img width="100" src="https://raw.githubusercontent.com/e2b-dev/E2B/main/readme-assets/logo-circle.png" alt="e2b logo">
2+
<img width="100" src="/readme-assets/logo-circle.png" alt="e2b logo">
33
</p>
44

5+
56
<h1 align="center">
6-
Code Interpreter SDK
7+
E2B SDK
78
</h1>
89

10+
<h4 align="center">
11+
<a href="https://pypi.org/project/e2b/">
12+
<img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
13+
style="color:transparent;width:auto;height:100%" src="https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads">
14+
</a>
15+
<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"
17+
style="color:transparent;width:auto;height:100%" src="https://img.shields.io/npm/dm/e2b?label=NPM%20Downloads">
18+
</a>
19+
</h4>
20+
21+
<!---
22+
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
23+
24+
--->
25+
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+
940
<!---
1041
<h3 align="center">
1142
SDK made to control the E2B Sandboxes - secure cloud environments for running LLM-generated code
1243
</h3>
1344
--->
14-
The Code Interpreter 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.
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.
1549

1650
- ✔️ Works with any LLM and AI framework (see [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) for examples)
1751
- ✔️ Supports streaming content like charts and stdout, stderr
@@ -23,39 +57,72 @@ The Code Interpreter SDK is made to control the E2B Sandboxes - secure cloud env
2357

2458
##### 💻 Supported language runtimes
2559
- ✔️ Python
26-
- [(Beta)](https://e2b.dev/docs/guide/beta-code-interpreter-language-runtimes) JavaScript, R, Java
60+
- JavaScript
61+
- R
62+
- Java
2763

2864

29-
<!---
30-
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
65+
<h1 align="center">
66+
Start with E2B SDK
67+
</h1>
3168

32-
--->
3369

34-
<h4 align="center">
35-
<a href="https://pypi.org/project/e2b/">
36-
<img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
37-
style="color:transparent;width:auto;height:100%" src="https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads">
38-
</a>
39-
<a href="https://www.npmjs.com/package/e2b">
40-
<img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
41-
style="color:transparent;width:auto;height:100%" src="https://img.shields.io/npm/dm/e2b?label=NPM%20Downloads">
42-
</a>
43-
</h4>
70+
### 1. Install SDK
4471

45-
---
46-
### What is E2B?
72+
JavaScript/TypeScript
73+
```
74+
npm i @e2b/code-interpreter
75+
```
4776

48-
[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.
77+
Python
78+
```
79+
pip install e2b_code_interpreter
80+
```
4981

50-
<!---
51-
<h4 align="center">
52-
<a href="https://e2b.dev/docs">Docs</a> |
53-
<a href="https://e2b.dev">Website</a> |
54-
<a href="https://discord.gg/U7KEcGErtQ">Discord</a> |
55-
<a href="https://twitter.com/e2b_dev">Twitter</a>
56-
</h4>
57-
--->
82+
### 2. Execute code with code interpreter inside Sandbox
5883

84+
**JavaScript**
85+
```ts
86+
import { CodeInterpreter } from '@e2b/code-interpreter'
87+
88+
const sandbox = await CodeInterpreter.create()
89+
await sandbox.notebook.execCell('x = 1')
90+
91+
const execution = await sandbox.notebook.execCell('x+=1; x')
92+
console.log(execution.text) // outputs 2
93+
94+
await sandbox.close()
95+
```
96+
97+
**Python**
98+
```py
99+
from e2b_code_interpreter import CodeInterpreter
100+
101+
with CodeInterpreter() as sandbox:
102+
sandbox.notebook.exec_cell("x = 1")
103+
104+
execution = sandbox.notebook.exec_cell("x+=1; x")
105+
print(execution.text) # outputs 2
106+
```
107+
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+
___
59126

60127
<div align='center'>
61128
<!-- <a href="https://e2b.dev/docs" target="_blank">
@@ -123,4 +190,4 @@ const execution = await sbx.runCode()('x+=1; x')
123190
console.log(execution.text) // outputs 2
124191

125192
await sandbox.close()
126-
```
193+
```

0 commit comments

Comments
 (0)