Skip to main content

sandflare-langchain

LangChain tool integration for Sandflare — run agent-generated code in isolated Firecracker microVM sandboxes.

Installation

pip install sandflare-langchain

Usage

from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain_openai import ChatOpenAI
from sandflare_langchain import SandflareCodeInterpreter

tool = SandflareCodeInterpreter(api_key="sf-...")

llm = ChatOpenAI(model="gpt-4o")
agent = create_openai_tools_agent(llm, [tool], prompt)
executor = AgentExecutor(agent=agent, tools=[tool])

result = executor.invoke({"input": "Plot a sine wave and save it as plot.png"})

How it works

Each tool call creates a fresh Sandflare microVM sandbox, executes the code, streams stdout/stderr back to LangChain, and auto-deletes the sandbox when done.

Metadata

Release files for sandflare-langchain 0.1.6

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

Source distribution (sdist)

Source distribution for sandflare-langchain 0.1.6
File Size Uploaded Provenance Actions
sandflare_langchain-0.1.6.tar.gz 2.8 kB Without provenance Details for sandflare_langchain-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sandflare-langchain 0.1.6
File Interpreter ABI Platform Actions
sandflare_langchain-0.1.6-py3-none-any.whl Python 3 none any Details for sandflare_langchain-0.1.6-py3-none-any.whl

Total release size: 5.9 kB

Release files / sandflare_langchain-0.1.6.tar.gz

Download URL sandflare_langchain-0.1.6.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8c209e7c3490dd1bea1f88fa9c06adaede2665d261cdb4cf0e8a95f514f37798
BLAKE2b-256 checksum
How to use checksums
b5f2d8345e43b9dc32cd7feb103cf3042781b79630863dc6fc4d78ad5621c256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / sandflare_langchain-0.1.6-py3-none-any.whl

Download URL sandflare_langchain-0.1.6-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77ecb7d63b527e2027355c805c0f2286f3f6282efbc11bda99eb1b8f31e7d865
BLAKE2b-256 checksum
How to use checksums
99b26f1bef4dcd67c095b14a4c2714e4450e535cf7e909f49d8daaa16b73526b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for sandflare-langchain 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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