Skip to main content

LangChain tools backed by cocoon microVM sandboxes

Project description

cocoonstack-sandbox-langchain

LangChain tools backed by cocoon microVM sandboxes: a CocoonToolkit claims one sandbox lazily on first tool use and exposes it as StructuredTools an agent can call — shell exec, file read/write, and directory listing, with disk state persisting across calls.

from cocoonsandbox_langchain import CocoonToolkit

with CocoonToolkit("10.0.0.5:7777", api_token="...") as kit:
    agent = create_react_agent(model, kit.get_tools())
    agent.invoke({"messages": [("user", "run the tests in /work")]})

from_checkpoint="ck_..." branches the sandbox from a checkpoint's captured moment instead of a clean template — agents resume from prepared state (dependencies installed, repo cloned) in milliseconds.

Sync-native (_run calls the stdlib-only cocoonstack-sandbox SDK directly); async agents get _arun bridged via asyncio.to_thread.

Full reference: https://cocoonstack.github.io/sandbox/langchain

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

cocoonstack_sandbox_langchain-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file cocoonstack_sandbox_langchain-0.1.0.tar.gz.

File metadata

File hashes

Hashes for cocoonstack_sandbox_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 78644e053d1009b70ae2e4135cae7bf3a726c6e03d62f863bf0a1bef236a97f7
MD5 273a19565df33bcbe00ce2dd9ef81691
BLAKE2b-256 b27505b42387c298a7f0e8c33fe84cb1f6c377ec23aec9d1294aa95dc17d3ade

See more details on using hashes here.

Provenance

The following attestation bundles were made for cocoonstack_sandbox_langchain-0.1.0.tar.gz:

Publisher: publish-pypi.yml on cocoonstack/sandbox

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

File details

Details for the file cocoonstack_sandbox_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cocoonstack_sandbox_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87a70e5c601e4b2e26f14f3b2baa721ba9cb71c3cdd99e515f6ee2fe3b3a3c04
MD5 a6c5497a53c637cc60be1ccba5d5d818
BLAKE2b-256 6b900b8f388ed8e989d364252725356f79fa1ef405ea5cf9d4171ddeb82e1f75

See more details on using hashes here.

Provenance

The following attestation bundles were made for cocoonstack_sandbox_langchain-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on cocoonstack/sandbox

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