Leap0 sandbox integration for Deep Agents
Project description
langchain-leap0
Leap0 integration for LangChain Deep Agents: a BaseSandbox backend that runs shell commands and file transfers inside a Leap0 sandbox.
Leap0 is enterprise-grade cloud sandboxes for AI agents. Launch isolated sandboxes in ~200ms. Give every agent its own compute, filesystem, and network boundary while your agents run safely.
Quick install
pip install langchain-leap0
Set your API key (see Leap0 for account and key management):
export LEAP0_API_KEY="your-key"
Minimal usage with the [leap0](https://pypi.org/project/leap0/) SDK and Leap0Sandbox:
from leap0 import Leap0Client
from langchain_leap0 import Leap0Sandbox
client = Leap0Client()
sandbox = client.sandboxes.create()
backend = Leap0Sandbox(client=client, sandbox=sandbox)
try:
result = backend.execute("echo 'Hello LangChain from Leap0.dev'")
print(result.output)
finally:
client.sandboxes.delete(sandbox)
client.close()
Examples
Runnable scripts for Deep Agents sandboxes. See [examples/README.md](examples/README.md) for environment variables and how they map to LangChain **SandboxIntegrationTests**.
| Script | Summary |
|---|---|
| examples/basic_sandbox.py | Minimal: create a sandbox, Leap0Sandbox.execute(), teardown. |
| examples/deep_agent_sandbox.py | create_deep_agent(..., backend=Leap0Sandbox(...)) — create and run a script; prints a short execute summary. |
From the repo root:
uv run python examples/basic_sandbox.py
uv run python examples/deep_agent_sandbox.py
Developing from source
From this directory (alongside leap0-python in the Leap0 workspace). Uses pyproject.toml dependencies; run:
cd langchain-leap0
uv sync --all-groups
Running tests
From the package root:
# Unit tests
make test
# LangChain standard sandbox integration tests
make integration_test
Integration tests require:
export LEAP0_API_KEY="your-key"
Documentation
Full documentation is available at leap0.dev/docs.
License
Apache License 2.0. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
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_leap0-0.2.0.tar.gz.
File metadata
- Download URL: langchain_leap0-0.2.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76cee0a1ae3dbdfcf4ce02599f5e5ee964ae11e49c44d05848986e6d97c145d2
|
|
| MD5 |
483dee1316aac72a8a663f0e1c3b9b5e
|
|
| BLAKE2b-256 |
761669b97aebed6d0f9c0fb36ece5fc6d9534f41808e4f86ee77a5a652c28a39
|
Provenance
The following attestation bundles were made for langchain_leap0-0.2.0.tar.gz:
Publisher:
release.yml on leap0-dev/langchain-leap0-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_leap0-0.2.0.tar.gz -
Subject digest:
76cee0a1ae3dbdfcf4ce02599f5e5ee964ae11e49c44d05848986e6d97c145d2 - Sigstore transparency entry: 1280968953
- Sigstore integration time:
-
Permalink:
leap0-dev/langchain-leap0-python@1dd820dee9132bd77d78e5ee6e72ce8848ea3930 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/leap0-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1dd820dee9132bd77d78e5ee6e72ce8848ea3930 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_leap0-0.2.0-py3-none-any.whl.
File metadata
- Download URL: langchain_leap0-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4cc2c091560389b5eadb83675b7e4318a74745ae3a5b83798259077da7864d9
|
|
| MD5 |
95dd84d0321ba713848666c1e83dfbee
|
|
| BLAKE2b-256 |
5808f9e6335b18473d1892fd4aced03ea09fe420d1fe33fd47dcf55c50966b86
|
Provenance
The following attestation bundles were made for langchain_leap0-0.2.0-py3-none-any.whl:
Publisher:
release.yml on leap0-dev/langchain-leap0-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_leap0-0.2.0-py3-none-any.whl -
Subject digest:
f4cc2c091560389b5eadb83675b7e4318a74745ae3a5b83798259077da7864d9 - Sigstore transparency entry: 1280968956
- Sigstore integration time:
-
Permalink:
leap0-dev/langchain-leap0-python@1dd820dee9132bd77d78e5ee6e72ce8848ea3930 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/leap0-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1dd820dee9132bd77d78e5ee6e72ce8848ea3930 -
Trigger Event:
release
-
Statement type: