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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sandflare_llamaindex-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 e5cf6385113f3098418be6850f2eaf13d310e638cdb4dabc2c432ee414b8abab
MD5 2588bd1767cb6a2852e64bbc5d1f7767
BLAKE2b-256 92f10227bfe4cd621471d31adee47f42769a161617787aaed4636d4f374ce780

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sandflare_llamaindex-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3523a5e1cebb605a35a3a4f0cce4ff604c9383006fd7e5f983fbd849696a55b7
MD5 a2d538ef8680a43a27dcfc505916db5a
BLAKE2b-256 96c935e249680472fa2726d0d0a367d8ed99e39bb60c4e6aee39d35fc7a1f57c

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