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.2.tar.gz
(20.3 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.2.tar.gz.
File metadata
- Download URL: langchain_sandrpod-0.2.2.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9561e885b3e0b297e451ca5c0ce5a0aac29cc10f8cde099777a3ecb134a93fb
|
|
| MD5 |
92f9e2ebd0d46633512426562f255d96
|
|
| BLAKE2b-256 |
1429ef2fddd12f2834cd83d1398968eac3b01fd3717ca099615d65d4c16953fc
|
File details
Details for the file langchain_sandrpod-0.2.2-py3-none-any.whl.
File metadata
- Download URL: langchain_sandrpod-0.2.2-py3-none-any.whl
- Upload date:
- Size: 15.2 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 |
7d5906cd79670d67f46b63e01e57c797d319171ec50fb30ce24a2e03c9022b65
|
|
| MD5 |
78e6bdd83ccef42979cca9128842dce4
|
|
| BLAKE2b-256 |
478608cd860c15ffad7b4a40fcadbb9a46cf42b71bf7ac35b112cc00bcf6dc76
|