Skip to main content

langchain-sandrpod

SandrPod sandbox integration for Deep Agents.

Installation

pip install langchain-sandrpod

Quick Start

from langchain_sandrpod import SandrPodClient
from deepagents import create_deep_agent
from deepagents.middleware import FilesystemMiddleware

client = SandrPodClient(api_url="http://localhost:8080")

with client.sandbox("my-sandbox") as sb:
    # Run a command directly
    result = sb.execute("python3 -c 'print(42)'")
    print(result.output)  # 42

    # Or plug the sandbox into a deepagents agent
    agent = create_deep_agent(
        middleware=[FilesystemMiddleware(backend=sb)]
    )
    result = agent.invoke({"messages": [{"role": "user", "content": "List the files under /workspace"}]})

Sandbox surface

Capability Methods
One-shot execution execute(cmd)
Files ls / read / write / edit / delete / grep / glob / upload_files / download_files (write overwrites existing files; delete natively calls /files/delete — both match the deepagents backend contract)
Stateful interpreter (variables persist across calls) run_code(code, context_id=…) + create/list/restart/remove_code_context
Directory watch watch_dir(path) / get_new_events(watcher_id)
Resource usage metrics()
MCP config & calls mcp_ls / mcp_add / mcp_rm / mcp_tools / mcp_manifest / mcp_url

See examples/ — including 04_personal_mcp.py, which exposes the personal MCP tools on an employee machine to a remote agent via the sandbox's /mcp endpoint.

Environment Variables

Variable Description Default
SANDRPOD_API_URL API Server address http://localhost:8080
SANDRPOD_API_TOKEN Platform-layer Bearer token (empty)
SANDRPOD_MCP_TOKEN Resource-layer mcp_token (shared secret of the in-sandbox bridge, optional) (empty)

Metadata

Release files for langchain-sandrpod 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-sandrpod 0.2.7
File Size Uploaded
langchain_sandrpod-0.2.7.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-sandrpod 0.2.7
File Interpreter ABI Platform
langchain_sandrpod-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 41.7 kB

Release files / langchain_sandrpod-0.2.7.tar.gz

Download URL langchain_sandrpod-0.2.7.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cba457eec925b75c0a04723bff87abd7347c04447bd6826795f9edd7c866b630
BLAKE2b-256 checksum
How to use checksums
12414d43aa3a7f5d0c3184faea5914390cc9982f15b65f65ad8ce619b825a275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / langchain_sandrpod-0.2.7-py3-none-any.whl

Download URL langchain_sandrpod-0.2.7-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1805d30c9a122ba13756730dc010f309ec3e0fbe65a992f8e5fa5f76dc0964a
BLAKE2b-256 checksum
How to use checksums
a14cbb20c60b2343f5368c6603a310effc2b19f646a7215df574b59a57f240e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page