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.4.tar.gz
(21.6 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.4.tar.gz.
File metadata
- Download URL: langchain_sandrpod-0.2.4.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4de7a262c2b8c8652b713a0dc5a48e4dcd10ff26e5c564a5ce9c1ebf65e66fa1
|
|
| MD5 |
7a7132aa326b889ca0ae3aaaef63050d
|
|
| BLAKE2b-256 |
668e5d2fc8d901375a9f844bf1e891f5a2521bebbd135756ea9407dcad44086d
|
File details
Details for the file langchain_sandrpod-0.2.4-py3-none-any.whl.
File metadata
- Download URL: langchain_sandrpod-0.2.4-py3-none-any.whl
- Upload date:
- Size: 16.5 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 |
9ef0d1b38c37f3e57310c557f5c6f008960d23488b34b830ba34a236a4be03eb
|
|
| MD5 |
70d1f42111d74c79b2afae73349cecfc
|
|
| BLAKE2b-256 |
7da8d7d616ed5ef5db580a9b59506699a1079cf7d15dbec8e80dc141818f6d09
|