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.5.tar.gz
(21.8 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.5.tar.gz.
File metadata
- Download URL: langchain_sandrpod-0.2.5.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a7f94f8ebac77f7a77a564393361262e71fbbb98e3a4672ace45b84fc7eb60a
|
|
| MD5 |
f56c133085876b3399b978bfffab157a
|
|
| BLAKE2b-256 |
8a3fd26b43b235bc5434379edefeb94c1a421875829c91608ca0ac67ba9134bd
|
File details
Details for the file langchain_sandrpod-0.2.5-py3-none-any.whl.
File metadata
- Download URL: langchain_sandrpod-0.2.5-py3-none-any.whl
- Upload date:
- Size: 16.7 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 |
e47ec8ebf1054917f46bad474b30b31feca3fbfacb682c93f4ed3fc239dab39f
|
|
| MD5 |
f0589e316cb5cc47d57aeb6018d966f7
|
|
| BLAKE2b-256 |
b0bf7c15e8fb35c5b659e48c6a4ceeddffccf3ed8e9fdb40aaa904ac6cfa6282
|