Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_sandrpod-0.2.4-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

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

Hashes for langchain_sandrpod-0.2.4.tar.gz
Algorithm Hash digest
SHA256 4de7a262c2b8c8652b713a0dc5a48e4dcd10ff26e5c564a5ce9c1ebf65e66fa1
MD5 7a7132aa326b889ca0ae3aaaef63050d
BLAKE2b-256 668e5d2fc8d901375a9f844bf1e891f5a2521bebbd135756ea9407dcad44086d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_sandrpod-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9ef0d1b38c37f3e57310c557f5c6f008960d23488b34b830ba34a236a4be03eb
MD5 70d1f42111d74c79b2afae73349cecfc
BLAKE2b-256 7da8d7d616ed5ef5db580a9b59506699a1079cf7d15dbec8e80dc141818f6d09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page