開源、安全的環境,提供企業級代理的實務工具。
AI 翻譯
Open-source, secure environment with real-world tools for enterprise-grade agents.
開發工具Python · TypeScriptGitHub @e2b-dev自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.
JavaScript / TypeScript
npm i e2b
Python
pip install e2b
E2B_API_KEY=e2b_***
JavaScript / TypeScript
import Sandbox from 'e2b'
const sandbox = await Sandbox.create()
const result = await sandbox.commands.run('echo "Hello from E2B!"')
console.log(result.stdout) // Hello from E2B!
Python
from e2b import Sandbox
with Sandbox.create() as sandbox:
result = sandbox.commands.run('echo "Hello from E2B!"')
print(result.stdout) # Hello from E2B!
If you need to execute code with runCode()/run_code(), install the Code Interpreter SDK (JavaScript / Python):
npm i @e2b/code-interpreter # JavaScript/TypeScript
pip install e2b-code-interpreter # Python
import { Sandbox } from '@e2b/code-interpreter'
const sandbox = await Sandbox.create()
const execution = await sandbox.runCode('x = 1; x += 1; x')
console.log(execution.text) // outputs 2
For mouse, keyboard, screenshot, application, and desktop streaming APIs, install the Desktop SDK (JavaScript / Python):
npm i @e2b/desktop # JavaScript/TypeScript
pip install e2b-desktop # Python
import { Sandbox } from '@e2b/desktop'
const desktop = await Sandbox.create()
await desktop.launch('google-chrome')
const screenshot = await desktop.screenshot()
Visit E2B documentation.
Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.
Read the embed deployment guide to learn how to set up the E2B runtime on your own. The infrastructure is deployed using Terraform.
Supported cloud providers: