E2B sandbox integration for Deep Agents
Project description
langchain-e2b
Quick Install
pip install langchain-e2b
Deep Agents SDK
from e2b import Sandbox
from langchain_e2b import E2BSandbox
e2b_sandbox = Sandbox.create()
backend = E2BSandbox(sandbox=e2b_sandbox)
try:
result = backend.execute("echo hello")
print(result.output)
finally:
e2b_sandbox.kill()
Deep Agents Code
Install langchain-e2b into the dcode environment, then run with the E2B
sandbox provider:
dcode --install langchain-e2b --package
export E2B_API_KEY=...
dcode --sandbox e2b
What is this?
langchain-e2b adapts an existing E2B sandbox to the Deep Agents sandbox
protocol. It uses the low-level e2b SDK so Deep Agents can run shell commands
and move files through the standard Deep Agents sandbox interface.
For SDK use, this package intentionally does not hide E2B sandbox lifecycle
management. Use the E2B SDK to create, connect to, configure, and kill
sandboxes, then pass the connected sandbox object to E2BSandbox.
For Deep Agents Code, the package also exposes a dcode sandbox provider entry
point. The provider creates, reconnects to, and deletes E2B sandboxes for
dcode --sandbox e2b.
Contributing
Contributions are welcome. Keep the adapter focused on implementing the Deep Agents sandbox backend protocol over the official E2B SDK.
Development
uv sync --group test
make test
make lint
Integration tests require E2B_API_KEY:
E2B_API_KEY=... make integration_tests
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_e2b-0.0.4.tar.gz.
File metadata
- Download URL: langchain_e2b-0.0.4.tar.gz
- Upload date:
- Size: 207.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf543ad7394b83c3f097c9914adfc59bb3af3af9837dea9ada5064abcf4666d2
|
|
| MD5 |
549eb6d8a2a5d1b2842db9beb4b82dd4
|
|
| BLAKE2b-256 |
3c1aab8db1288a70b25bfb2489327fae0d3a82ea07231d446083a2dcb0bfc174
|
Provenance
The following attestation bundles were made for langchain_e2b-0.0.4.tar.gz:
Publisher:
release.yml on e2b-dev/langchain-e2b
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_e2b-0.0.4.tar.gz -
Subject digest:
bf543ad7394b83c3f097c9914adfc59bb3af3af9837dea9ada5064abcf4666d2 - Sigstore transparency entry: 1854568292
- Sigstore integration time:
-
Permalink:
e2b-dev/langchain-e2b@fba59c9ab4c108f46414ecb342dc36bbe629fca6 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/e2b-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fba59c9ab4c108f46414ecb342dc36bbe629fca6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_e2b-0.0.4-py3-none-any.whl.
File metadata
- Download URL: langchain_e2b-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cf20f155ebf6b1a8f36d69dec4b5925c242dfcf779209c94ccb18fda3296419
|
|
| MD5 |
5efe64864cf9272f0a11d6b2da35c0d3
|
|
| BLAKE2b-256 |
816f4e2263f5372019bd05fc8c7fe50674b041cc6b22df3faf3037897587413f
|
Provenance
The following attestation bundles were made for langchain_e2b-0.0.4-py3-none-any.whl:
Publisher:
release.yml on e2b-dev/langchain-e2b
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_e2b-0.0.4-py3-none-any.whl -
Subject digest:
6cf20f155ebf6b1a8f36d69dec4b5925c242dfcf779209c94ccb18fda3296419 - Sigstore transparency entry: 1854568322
- Sigstore integration time:
-
Permalink:
e2b-dev/langchain-e2b@fba59c9ab4c108f46414ecb342dc36bbe629fca6 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/e2b-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fba59c9ab4c108f46414ecb342dc36bbe629fca6 -
Trigger Event:
release
-
Statement type: