mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
* depracting docker exec box * remove doc exec from workflow and docs * remove background commands * Update tests/unit/test_sandbox.py Co-authored-by: Engel Nyst <enyst@users.noreply.github.com> * replace for-loop with assignment * fix integration tests * fix integration tests for shell script * fix integration tests * increase max iter to fix some monologue agent issue * fix integration test again * fix integration tests (seems related to run_user issue) --------- Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
How to use E2B
E2B is an open-source secure cloud environment (sandbox) made for running AI-generated code and agents. E2B offers Python and JS/TS SDK to spawn and control these sandboxes.
Getting started
-
Set your E2B API key to the
E2B_API_KEYenv var when starting the Docker container -
Optional - Install the CLI with NPM.
npm install -g @e2b/cli@latestFull CLI API is here.
OpenDevin sandbox
You can use the E2B CLI to create a custom sandbox with a Dockerfile. Read the full guide here. The premade OpenDevin sandbox for E2B is set up in the containers directory. and it's called open-devin.
Debugging
You can connect to a running E2B sandbox with E2B CLI in your terminal.
-
List all running sandboxes (based on your API key)
e2b sandbox list -
Connect to a running sandbox
e2b sandbox connect <sandbox-id>