Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Update readmes

Tereza Tizkovac682d94bc820
diff --git a/packages/js-sdk/README.md b/packages/js-sdk/README.md
index adb279982..6ea2718ff 100644
--- a/packages/js-sdk/README.md
+++ b/packages/js-sdk/README.md
@@ -81,31 +81,36 @@ E2B Sandbox is a secure cloud environment that allows AI agents and apps. You ca
## Getting Started & Documentation
-> Please visit [documentation](https://e2b.dev/docs) to get started.
+Please visit [documentation](https://e2b.dev/docs) to get started.
-To create and control a sandbox, you use our SDK:
+### 1. Install SDK
-### Install SDK
-
-```bash
-npm install e2b
+```
+npm i @e2b/code-interpreter
```
-### Start sandbox
+### 2. Execute code with code interpreter inside Sandbox
-```js
-import { Sandbox } from "e2b";
+```ts
+import { Sandbox } from '@e2b/code-interpreter'
-// Create sandbox
-const sandbox = await Sandbox.create();
+const sandbox = await Sandbox.create()
+await sbx.runCode()('x = 1')
-// Let an LLM use the sandbox here
-// Visit https://e2b.dev/docs/sandbox/overview to learn more about sandboxes.
+const execution = await sbx.runCode()('x+=1; x')
+console.log(execution.text) // outputs 2
-// Close sandbox once done
-await sandbox.close();
+await sandbox.close()
```
+### 3. More resources
+- 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.
+
+- See [E2B documentation](https://e2b.dev/docs) to get started.
+
+- Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.
+
+
## Development
You can use the SDK with a locally running [`envd`](https://github.com/e2b-dev/infra/blob/main/packages/envd) (that usually runs inside the sandbox and allows the SDK to interact with it) by passing `E2B_DEBUG=true` to `.env` or by using `debug: true` in the `Sandbox.create` or `Sandbox.connect` method options.
@@ -134,3 +139,16 @@ Use `pnpm test` to run the test suite or `pnpm example` to run the example code.
Pass `E2B_DEBUG=true` to `.env` to run against the locally running envd (usually run via Docker).
> When running with a local environment the environment is not cleaned up after every test run as when running the test againts production. This might lead to some issues when running the tests multiple times and it is good to keep in mind.
+
+___
+
+<div align='center'>
+<!-- <a href="https://e2b.dev/docs" target="_blank">
+<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> -->
+<a href="https://twitter.com/e2b_dev" target="_blank">
+<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>
+<a href="https://discord.com/invite/U7KEcGErtQ" target="_blank">
+<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>
+<a href="https://www.linkedin.com/company/e2b-dev/" target="_blank">
+<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>
+</div align='center'>
\ No newline at end of file
diff --git a/packages/python-sdk/README.md b/packages/python-sdk/README.md
index 68f639584..b8ececf7e 100644
--- a/packages/python-sdk/README.md
+++ b/packages/python-sdk/README.md
@@ -81,50 +81,42 @@ E2B Sandbox is a secure cloud environment that allows AI agents and apps. You ca
## Getting Started & Documentation
-> Please visit [documentation](https://e2b.dev/docs) to get started.
+### 1. Install SDK
-**Python**
-
-1. Install SDK
-
-```bash
+```
pip install e2b
```
-2. Start sandbox
+### 2. Execute code with code interpreter inside Sandbox
```py
-from e2b import Sandbox
-
-# Create sandbox
-sandbox = Sandbox()
+from e2b_code_interpreter import Sandbox
-# Let an LLM use the sandbox here
-# Visit https://e2b.dev/docs/sandbox/overview to learn more about sandboxes.
+with Sandbox() as sandbox:
+ sandbox.run_code()("x = 1")
-# Close sandbox once done
-sandbox.close()
+ execution = sandbox.run_code()("x+=1; x")
+ print(execution.text) # outputs 2
```
-**JavaScript & TypeScript**
-1. Install SDK
+### 3. More resources
+- 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.
-```bash
-npm install e2b
-```
-
-2. Start sandbox
+- See [E2B documentation](https://e2b.dev/docs) to get started.
-```js
-import { Sandbox } from "e2b";
+- Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.
-// 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();
-```
\ No newline at end of file
+<div align='center'>
+<!-- <a href="https://e2b.dev/docs" target="_blank">
+<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> -->
+<a href="https://twitter.com/e2b_dev" target="_blank">
+<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>
+<a href="https://discord.com/invite/U7KEcGErtQ" target="_blank">
+<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>
+<a href="https://www.linkedin.com/company/e2b-dev/" target="_blank">
+<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>
+</div align='center'>
\ No newline at end of file