TitanVX Developer Hub
Back

SDK

Python SDK

Lightweight helper for calling Metis TPS via the TitanVX gateway. All commands are sent to POST /demo/v1/Metis/tps and routed by the service field.

Use /apidocs to discover available services and payload shapes.

Contents

  1. Install
  2. Authentication
  3. Quickstart
  4. Client reference
  5. Errors
  6. Examples
  7. Operational tips

Install

Install from this repo (editable) while developing:

cd sdk/python
python -m pip install -e .

Verify install:

python -c "from titanvx_sdk import TitanVxClient; print(TitanVxClient())"

Quickstart

from titanvx_sdk import TitanVxClient

client = TitanVxClient(
    base_url="https://api.titanvx.com",
    api_key="TITAN-REPLACE-ME",
)

resp = client.tps.call(
    service="TPR_SRV_US_LOGON",
    vx={"passcode": "1234", "confirm-passcode": "1234"},
)
print(resp)

Authentication

API key

Docs/testing & gateway keys.

client = TitanVxClient(
    api_key="TITAN-REPLACE-ME",
)

Bearer

Titan session JWT.

client = TitanVxClient(
    bearer_token="YOUR_JWT",
)

Optional: pass session_id to send a Session-Id header when the service expects it.

Client reference

TitanVxClient constructor

TitanVxClient(
    base_url="https://api.titanvx.com",
    api_key=None,
    bearer_token=None,
    session_id=None,
    timeout_seconds=45.0,
)

tps.call()

client.tps.call(
    service: str,                 # required, e.g. "TPR_SRV_AP_CHAT"
    vx: dict | None = None,       # optional
    target: dict | None = None,   # optional
    access: dict | None = None,   # optional
    cmd: dict | None = None,      # optional
    **extra,                      # any other top-level fields for the service
) -> dict

Envelope fields

resp = client.tps.call(
    service="TPR_SRV_AP_CHAT",
    content="Hello",
    rule=False,
)

Errors

from titanvx_sdk import TitanVxClient, TitanVxHttpError, TitanVxTransportError

client = TitanVxClient(api_key="TITAN-REPLACE-ME")

try:
    client.tps.call(service="TPR_SRV_US_READ")
except TitanVxHttpError as e:
    print("HTTP failed:", e.status_code, e.response_text[:300])
except TitanVxTransportError as e:
    print("Transport failed:", str(e))

Examples

User: logon

resp = client.tps.call(
    service="TPR_SRV_US_LOGON",
    vx={"passcode": "1234", "confirm-passcode": "1234"},
    target={"user": "your_user_name"},
)

Agent: chat

resp = client.tps.call(
    service="TPR_SRV_AP_CHAT",
    content="Hello",
    rule=False,
)

MCP tools (list / install / invoke)

# List tools/templates visible to your account
tools = client.mcp.list_tools()
print("tools:", len(tools))

# Install (claim) a template by id
# client.mcp.install_tool(template_id="tpl_123", note="Enable for my project")

# Invoke a tool (gateway proxies to the tool runtime)
# out = client.mcp.invoke(tool_name="http_get_json", arguments={"url": "https://example.com"})
# print(out)

Skills (list / install)

skills = client.skills.list()
print("skills:", len(skills))

# Install (enable) a published skill by name
# client.skills.install(skill_name="json_pretty")

Operational tips

Download as PDF: click Download PDF and choose “Save as PDF” in your browser print dialog.