Skip to content

Python Agent SDK

The runvero Python SDK provides zero-overhead client bindings to communicate with the RunVero gateway.

Terminal window
pip install runvero
from runvero import RunveroClient
# Connect to the RunVero gateway
client = RunveroClient(base_url="http://127.0.0.1:8080")
# Discover registered WASI tools
tools = client.list_tools()
print("Available tools:", [t["name"] for t in tools])
# Execute with deterministic fuel and memory bounds
result = client.execute(
tool="mock_tool",
input_data={"query": "analyze security logs"},
fuel=10_000_000,
memory_mb=16,
timeout_ms=5000,
)
print(f"Output: {result.output}")
print(f"Fuel Consumed: {result.fuel_consumed}")
print(f"Execution Latency: {result.latency_ms:.2f}ms")

Wrap any RunVero sandboxed component as a standard LangChain tool:

from runvero import RunveroClient
client = RunveroClient(base_url="http://127.0.0.1:8080")
# Export as LangChain BaseTool
secure_calculator = client.as_langchain_tool("calculator")
# Pass to any LangChain Agent
agent = initialize_agent(
tools=[secure_calculator],
llm=chat_model,
agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
)