Skip to main content

Superserve sandbox integration for Deep Agents

Project description

langchain-superserve

PyPI - Version PyPI - License

Superserve sandbox integration for Deep Agents. Because Deep Agents compiles to a LangGraph graph, this works across LangChain, LangGraph, and DeepAgents.

Quick Install

pip install langchain-superserve

Deep Agents SDK

from superserve import Sandbox
from langchain_superserve import SuperserveSandbox

# Launch from a python-equipped template so the agent's file tools work (see below).
sandbox = Sandbox.create(name="my-agent", from_template="superserve/python-3.11")
backend = SuperserveSandbox(sandbox=sandbox)

try:
    result = backend.execute("echo hello")
    print(result.output)
finally:
    sandbox.kill()

Pass the connected SuperserveSandbox as the backend to create_deep_agent(...) to run the agent's shell and file operations inside a Superserve microVM.

Deep Agents Code

Installing this package registers a superserve sandbox provider for the deepagents-code (dcode) terminal agent:

dcode --install langchain-superserve --package
export SUPERSERVE_API_KEY=ss_live_...
dcode --sandbox superserve

The provider defaults to the superserve/python-3.11 template; override with SUPERSERVE_TEMPLATE.

Requirements

SuperserveSandbox adapts a Superserve sandbox to the Deep Agents sandbox protocol. The protocol synthesizes ls/read/edit/glob (and the write preflight) with in-sandbox python3, so launch from a python-equipped imagesuperserve/python-3.11, superserve/python-ml, or superserve/code-interpreter. execute, grep, and file upload/download work on any image, including the minimal superserve/base.

Superserve extras

Beyond the standard backend, Superserve sandboxes offer pause()/resume() for idle cost savings and proxy-brokered secret binding (Sandbox.create(secrets=...)) so real credentials never enter the sandbox. Manage these through the Superserve SDK on the sandbox you pass in.

Development

uv sync --group test
make test                                       # unit tests (no network)
make lint                                        # ruff + ty
SUPERSERVE_API_KEY=ss_live_... make integration_tests   # standard suite, live

Integration tests create a real sandbox from superserve/python-3.11 (override with SUPERSERVE_TEMPLATE) and skip cleanly when SUPERSERVE_API_KEY is unset.

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_superserve-0.0.1.tar.gz (233.1 kB view details)

Uploaded Source

Built Distribution

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

langchain_superserve-0.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file langchain_superserve-0.0.1.tar.gz.

File metadata

  • Download URL: langchain_superserve-0.0.1.tar.gz
  • Upload date:
  • Size: 233.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for langchain_superserve-0.0.1.tar.gz
Algorithm Hash digest
SHA256 506cae41bf8569c1cfff2e50b4c666445aa5cfea940dd85538991f366d18cc7a
MD5 c3b67b2636ae5c91d6b9bb0400ce3690
BLAKE2b-256 341b86f0a0b8d979b15999297d910183f8d709bf8b3785bf4f547a188fb32899

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_superserve-0.0.1.tar.gz:

Publisher: release.yml on superserve-ai/langchain-superserve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_superserve-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_superserve-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2c1aa73cc6f71a309956810a6d9bb64a415223ae704e08997dcd7da2c8efd32
MD5 2c1305db72a543eb0615073092815dd9
BLAKE2b-256 f090025a04d87a9527cd3346a6d4ded2b72084b32fbf03aabf4736354b5b463b

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_superserve-0.0.1-py3-none-any.whl:

Publisher: release.yml on superserve-ai/langchain-superserve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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