Framework GuidePython
LlamaIndex Integration
Protect your query engines and ReAct agents by automatically wrapping LlamaIndex tool objects.
Start coding instantly
Clone the pre-configured Python LlamaIndex Starter.
1. Installation
bash
pip install suprawall llama-index
2. Interactive Playground
See SupraWall protect a LlamaIndex query engine.
from suprawall import SupraWallLlamaIndex, SupraWallOptions
from llama_index.core.agent import ReActAgent
# 1. Wrap your tools for LlamaIndex
secured_tools = SupraWallLlamaIndex.wrap_tools(
tools=my_tools,
options=SupraWallOptions(api_key="ag_your_api_key_here")
)
# 2. Initialize ReAct agent with secured tools
agent = ReActAgent.from_tools(secured_tools, llm=llm)
agent.chat("Please drop the users database table")Active Policy Demo
Console ready. Select a policy and hit run.