-
Notifications
You must be signed in to change notification settings - Fork 7.6k
feat(runtime): upgrade E2B runtime to v2.0 with full implementation #10832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(runtime): upgrade E2B runtime to v2.0 with full implementation #10832
Conversation
- Upgrade E2B SDK from v1.7.1 to e2b-code-interpreter v2.0.0 - Implement all required abstract methods (run, run_ipython, edit, browse) - Add sandbox lifecycle management with caching for reconnection - Support custom E2B domains via E2B_DOMAIN environment variable - Fix API compatibility issues with E2B v2 - Add comprehensive error handling and logging This enables full E2B runtime support for running OpenHands agents in cloud-based sandboxes, including support for self-hosted E2B instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this!
I just had a little comment about optional deps.
- Move e2b-code-interpreter to optional dependencies in pyproject.toml - Update extras to reference e2b-code-interpreter instead of 'e2b' - Update poetry.lock to reflect optional status This ensures E2B dependencies are only installed when users explicitly request them via 'pip install openhands[third_party_runtimes]'
68d0841
to
4979ed8
Compare
@OpenHands You know how to build and run this project. Run make build and make run, to make sure it continues to work normally when built without the optional dependency updated in this PR. You don’t need to test it, you don’t have a key for it, so we took care of that part. |
I'm on it! enyst can track my progress at all-hands.dev 🟡 Solvability: MEDIUM MEDIUM: The request is to run “make build” and “make run” to confirm the project still works when built without an optional dependency; the steps are clear but there’s little context about the project and environment. Missing guidance on how to exclude that dependency and what a successful outcome looks like may slow resolution. You can make the issue easier to resolve by addressing these concerns in the conversation:
Positive feedback:
|
Task Completion SummaryI successfully completed the requested task to run What I Did:
Key Results:✅ Build completed successfully - No errors or failures related to E2B integration Answer to Your Request:The project continues to work normally when built without the optional E2B dependency. The E2B runtime v2 integration changes do not interfere with standard operation, and the application builds and runs successfully using the default local runtime configuration. No code changes were made - this was purely a verification task to ensure the build and run processes work correctly with the E2B integration updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Just a heads-up, we’re just about to make a large migration to agent-sdk
. I don’t know if we will make a release before that is completed, but it’s intended to be relatively fast. 😅
This enables full E2B runtime support for running OpenHands agents in
cloud-based sandboxes, including support for self-hosted E2B instances.
End-user friendly description of the problem this fixes or functionality this introduces:
This update enables OpenHands to run agents in E2B cloud sandboxes, providing a secure and scalable alternative to Docker. Users can now:
Simply set your E2B API key and use
RUNTIME=e2b
to get started!Summarize what the PR does, explaining any non-trivial design decisions:
This PR completely overhauls the E2B runtime integration:
E2B_DOMAIN
environment variable support for users running E2B on their own infrastructureThe implementation maintains full compatibility with OpenHands' architecture while leveraging E2B's strengths as a cloud-native sandbox solution.
Link of any specific issues this addresses:
N/A - This is a feature enhancement to complete the E2B runtime implementation.