Skip to content
Appearance

Follows your device’s appearance.

Python Client

The runvero Python package is a small client for the RunVero gateway’s HTTP and MCP APIs. It has no required dependencies and needs Python 3.8 or newer.

Terminal window
git clone https://github.com/runvero-labs/runvero.git
pip install ./runvero/adapters/python

The examples below call a local gateway serving the starter tools from the Quick Start:

Terminal window
export RUNVERO_AUTH_TOKEN="$(openssl rand -hex 24)"
runvero serve --tools-dir target/catalog
import os
from runvero import RunveroClient
client = RunveroClient(
base_url="http://127.0.0.1:8080",
auth_token=os.environ["RUNVERO_AUTH_TOKEN"],
)
print([t["name"] for t in client.list_tools()])
result = client.execute(
"sqlite-runner",
arguments={"query": "SELECT 6 * 7 AS answer"},
fuel=10_000_000,
memory_mb=64,
timeout_ms=5000,
)
print(result.output)
print(result.fuel_consumed, f"{result.latency_ms:.2f} ms")
['calculator', 'regex-extractor', 'sqlite-runner']
{"columns":["answer"],"rows":[[42]],"truncated":false}
333588 5.38 ms

arguments is checked against the tool’s input schema. fuel, memory_mb and timeout_ms are optional; the gateway uses its own defaults when you leave them out.

print(client.mcp_call_tool("calculator", {"expression": "2 + 3 * 4"}).output)
{"result":14}

execute and mcp_call_tool send an Idempotency-Key header, generated for you unless you pass idempotency_key=. The client never retries a call on its own: a timeout or lost response can mean the tool ran. To retry safely against RunVero Cloud, save your own key with the request and reuse both. The self-hosted gateway accepts the header but does not deduplicate calls.

The client can describe a gateway tool for an agent framework:

  • client.as_langchain_tool("calculator") returns a LangChain tool (install ./runvero/adapters/python[langchain]).
  • client.to_openai_tool("calculator") and client.to_anthropic_tool("calculator") return tool definitions for the OpenAI and Anthropic APIs.

See the client README for every method and option.