SandrPod sandbox integration for Deep Agents
Project description
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:18080")
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 下的文件"}]})
Environment Variables
| Variable | Description | Default |
|---|---|---|
SANDRPOD_API_URL |
API Server 地址 | http://localhost:18080 |
SANDRPOD_API_TOKEN |
Bearer 认证 token | (empty) |
Project details
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.3.tar.gz
(21.4 kB
view details)
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_sandrpod-0.2.3.tar.gz.
File metadata
- Download URL: langchain_sandrpod-0.2.3.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b525d428856f7c8f66d149ffe95af4676b8e10f98c2ee9d8dc13a92ce871fc71
|
|
| MD5 |
33dc00d6afccac70dd549d4adbd5702a
|
|
| BLAKE2b-256 |
7f083f85191765ebb7336f9f3febb8be257dc76564666b8b484992473c0e64bf
|
File details
Details for the file langchain_sandrpod-0.2.3-py3-none-any.whl.
File metadata
- Download URL: langchain_sandrpod-0.2.3-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbff3a510a2fcec631bc1efe697771b974432bd46f26fb3d2af0bff83ac8f54d
|
|
| MD5 |
ecf1bf7247d0b78939e9b84c55413512
|
|
| BLAKE2b-256 |
7c13ce6602e7a4ac8c18216b5c91d7ca530b0905e0d5b235226751d19bc7b99e
|