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:
    # 直接执行命令
    result = sb.execute("python3 -c 'print(42)'")
    print(result.output)  # 42

    # 或者接入 deepagents agent
    agent = create_deep_agent(
        middleware=[FilesystemMiddleware(backend=sb)]
    )
    result = agent.invoke({"messages": [{"role": "user", "content": "列出 /workspace 下的文件"}]})

Sandbox surface

能力 方法
一次性执行 execute(cmd)
文件 ls / read / write / edit / delete / grep / glob / upload_files / download_fileswrite 覆盖已有文件;delete 原生走 /files/delete,对齐 deepagents 契约)
有状态解释器(变量跨调用保留) run_code(code, context_id=…) + create/list/restart/remove_code_context
目录监视 watch_dir(path) / get_new_events(watcher_id)
资源用量 metrics()
MCP 配置与调用 mcp_ls / mcp_add / mcp_rm / mcp_tools / mcp_manifest / mcp_url

示例见 examples/(含 04_personal_mcp.py:把员工机上的个人 MCP 工具通过沙箱 /mcp 端点交给远端 agent)。

Environment Variables

Variable Description Default
SANDRPOD_API_URL API Server 地址 http://localhost:8080
SANDRPOD_API_TOKEN 平台层 Bearer token (empty)
SANDRPOD_MCP_TOKEN 资源层 mcp_token(沙箱内 bridge 的共享密钥,可选) (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.6.tar.gz (23.7 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.6-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_sandrpod-0.2.6.tar.gz
  • Upload date:
  • Size: 23.7 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.6.tar.gz
Algorithm Hash digest
SHA256 b716461fb789a666fb4b92bb3bb0b764c586155b5e2b7c462a1d9ceb50cf22e6
MD5 686f56e6283b3535c40b293c7a268739
BLAKE2b-256 341fd4ea8d66bf9e8eb7a734c35f2f670e9915433e9cbfc950ac413e364a56e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_sandrpod-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3c04e10fc5ad9727db7b50e49bc78f2de72944cc1734e1e885bd42af8dcf2710
MD5 04f1b8fc23c5c6983a419052a57e39ce
BLAKE2b-256 ee9e2f135a7e3f8c67c3acff806b924465ed72aca5f367067d62c32187faa1f6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.7

2 files

This release

0.2.6 This release

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