Skip to main content

LlamaIndex tool for Sandflare Firecracker microVM sandboxes — run agent-generated code safely

Project description

sandflare-llamaindex

LlamaIndex code interpreter tool for Sandflare — execute agent-generated code in isolated Firecracker microVM sandboxes.

Installation

pip install sandflare-llamaindex

Usage

from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI
from sandflare_llamaindex import SandflareCodeInterpreterTool

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

agent = ReActAgent.from_tools(
    [tool],
    llm=OpenAI(model="gpt-4o"),
    verbose=True,
)

response = agent.chat("Compute the first 20 Fibonacci numbers and plot them")
print(response)

How it works

Each tool call creates a fresh Sandflare microVM sandbox, runs the code, and returns stdout/stderr to the LlamaIndex agent as a tool response.

Links

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

sandflare_llamaindex-0.1.3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

sandflare_llamaindex-0.1.3-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file sandflare_llamaindex-0.1.3.tar.gz.

File metadata

  • Download URL: sandflare_llamaindex-0.1.3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sandflare_llamaindex-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f90972ff4495e599c728c96896c5a9b57e71474a2f5ffbf5f96369819cfd78dd
MD5 34f3d881759041c06073b3ab542feabe
BLAKE2b-256 8492d4373c525a4dcbe83e984107cf79a55929f9d598e5d6e6d974f55e648a55

See more details on using hashes here.

File details

Details for the file sandflare_llamaindex-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sandflare_llamaindex-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4716d97bc8a19855a78a2f7eb7cc98bb53214c3c7f4da2202582eef886bb541e
MD5 49eb17e57f429846f419ed81d294cdc6
BLAKE2b-256 ebf7c6c311da5e7d47ce14cf723a1f104c5879b71d5950149d445a135fce91ac

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