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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_sandrpod-0.2.7.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_sandrpod-0.2.7-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file langchain_sandrpod-0.2.7.tar.gz.

File metadata

  • Download URL: langchain_sandrpod-0.2.7.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for langchain_sandrpod-0.2.7.tar.gz
Algorithm Hash digest
SHA256 cba457eec925b75c0a04723bff87abd7347c04447bd6826795f9edd7c866b630
MD5 e397a66c9520fb777334f2c9293e6ada
BLAKE2b-256 12414d43aa3a7f5d0c3184faea5914390cc9982f15b65f65ad8ce619b825a275

See more details on using hashes here.

File details

Details for the file langchain_sandrpod-0.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_sandrpod-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f1805d30c9a122ba13756730dc010f309ec3e0fbe65a992f8e5fa5f76dc0964a
MD5 9100301871196d9f35c287d034f68c8f
BLAKE2b-256 a14cbb20c60b2343f5368c6603a310effc2b19f646a7215df574b59a57f240e5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page