langchain-sandbox-opensandbox
OpenSandbox sandbox integration for Deep Agents.
Quick Install
uv add langchain-sandbox-opensandbox
The distribution is published as
langchain-sandbox-opensandbox, but the import package islangchain_opensandbox.
from opensandbox import SandboxSync
from langchain_opensandbox import OpenSandboxBackend
sandbox = SandboxSync.create("python:3.12")
backend = OpenSandboxBackend(sandbox=sandbox, timeout=300)
result = backend.execute("echo hello")
print(result.output)
🤔 What is this?
OpenSandboxBackend adapts the OpenSandbox
Python SDK to the BaseSandbox interface used by Deep Agents, so you can run
agent-generated commands and file operations inside an OpenSandbox environment.
It implements the three sandbox primitives — execute, upload_files, and
download_files — on top of the OpenSandbox SDK. The higher-level file helpers
(ls, read_file, write_file, glob, grep) are provided by BaseSandbox
and built on top of execute.
Configuration
OpenSandboxBackend wraps an existing opensandbox.SandboxSync instance, so it
inherits the SDK's configuration. The SDK reads connection settings from the
environment:
| Variable | Description |
|---|---|
OPENSANDBOX_DOMAIN |
Host (and optional port) of the OpenSandbox server. |
OPENSANDBOX_PROTOCOL |
Protocol used to reach the server (http or https). |
OPENSANDBOX_API_KEY |
API key, if the server requires authentication. |
Development
uv sync
make lint # ruff check + format --diff
make test # unit tests (no network)
make integration_tests # conformance suite (requires a running OpenSandbox server)
make build # build wheel + sdist
The integration tests run the standard SandboxIntegrationTests conformance
suite from langchain-tests. They are skipped unless OPENSANDBOX_DOMAIN is
set.
Releases & Versioning
This package follows semantic versioning.
Contributing
Contributions are welcome. Please open an issue or pull request on GitHub.
License
Apache License 2.0. See LICENSE.
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_sandbox_opensandbox-0.1.0.tar.gz.
File metadata
- Download URL: langchain_sandbox_opensandbox-0.1.0.tar.gz
- Upload date:
- Size: 161.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
334a6c4bbb73fcbb3ad21114af2f86319b7f0cb90dfb4dcb7291ce8f226b699e
|
|
| MD5 |
d3fa8b802eab2c61ee80855dfdcf278a
|
|
| BLAKE2b-256 |
ee6c5d50a8d35c07effc4ae59e140df2a223ebb50f8daf0edd59692e4359c2ac
|
File details
Details for the file langchain_sandbox_opensandbox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_sandbox_opensandbox-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6f26cbc3824d345ebfa321911e052c7e00a049d14cde948138f6fef009ce6a7
|
|
| MD5 |
e892a706d6d6faa34f928809b52ca599
|
|
| BLAKE2b-256 |
4da0a9fde7b2b0ddea7500f504b56cf6ed583e83f2b6f83bdd84f364bb236462
|