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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sandflare_llamaindex-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a458105c883fb02903b6bfef5be9622732f96ec24b8b330250187a2ff878a909
MD5 14a02a2b1ef183c412799ed65d7fd408
BLAKE2b-256 5a0955acea02cfc96d5e872ef0ee17261769076c04ae327692693b014fb3a1c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sandflare_llamaindex-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0998265aff371c510ed36abda1c9adabbaa130a6d74c31effc7c864589012ed1
MD5 6bfad57d395993095fbd8b94c1420403
BLAKE2b-256 1f86c18571eae6749715c976f6a6e1194f505b01199dfaba4531bf3aa635761f

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