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.5.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.5-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sandflare_llamaindex-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 13331da82c7938d27b124a9efaee2128bd6d1110082910cb58fec83139dc16bb
MD5 e72d30c5e6208198c23b700c7b20bd8b
BLAKE2b-256 9ea2839ce48d91b6e63b9cbd8130c4fb602012971f3710f1e4c611f73554133b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sandflare_llamaindex-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b74913ac7a4cb8f615d6637398153bc73929c8f083fb7dc205f8dad13ae094dd
MD5 4b9cc4bff137b33502090e893387422a
BLAKE2b-256 26e448067310843736e21ceba7e6b99a0b6dd9d58f9bef063312d76c58c105e2

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