Skip to main content

langchain-husk

PyPI - Version PyPI - License

Husk sandbox integration for Deep Agents.

Quick install

uv add langchain-husk
# or
pip install langchain-husk

Quickstart

from husk_client import Husk

from langchain_husk import HuskSandbox

# Provision the sandbox using husk_client (the SDK).
sandbox = Husk(base_url="http://localhost:8000", api_key="hk_...").create(
    image="python:3.12-slim",
    cpu=2,
    memory_mb=1024,
)

# Wrap it for Deep Agents.
backend = HuskSandbox(sandbox=sandbox, timeout=300)

result = backend.execute("python -c 'print(1+2)'")
print(result.output)        # "3\n"
print(result.exit_code)     # 0

# Use it as a Deep Agents backend:
# from deepagents import DeepAgent
# agent = DeepAgent(backend=backend, ...)

# Always destroy when finished.
sandbox.destroy()

The pattern matches langchain-daytona: the partner package wraps an existing SDK sandbox object, it does NOT manage lifecycle. Provisioning goes through husk_client.Husk, destruction through sandbox.destroy().

What is Husk?

Husk is a lightweight, MIT-licensed AI code sandbox runtime — single-process FastAPI control plane + a Go daemon that runs inside each container. Single docker run to start, no Postgres / Redis / OIDC required.

License

MIT.

Metadata

Release files for langchain-husk 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-husk 0.0.1
File Size Uploaded
langchain_husk-0.0.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-husk 0.0.1
File Interpreter ABI Platform
langchain_husk-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / langchain_husk-0.0.1.tar.gz

Download URL langchain_husk-0.0.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
00c87d108bde7e4c7f96be70b5f715324dc2d68208651e67f65ece77224db639
BLAKE2b-256 checksum
How to use checksums
ac0164bb0014e06a77402b6de42cad12c7f26910504fa150b9f31755f00cee6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / langchain_husk-0.0.1-py3-none-any.whl

Download URL langchain_husk-0.0.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5607e471174472658b7e45887cd5362e11e3fa1b1a1af00b50582c1a6b4eac21
BLAKE2b-256 checksum
How to use checksums
b39ad901c3210a857188d0245c0b675333d5307db65a685a5cf777823637ee2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page