Skip to main content

KubeMind Python SDK (kubemind)

The official Python client library for KubeMind — the self-hosted intelligent AI gateway and governance control plane.

Installation

pip install kubemind

Quickstart

from kubemind import KubeMindClient

# Initialize client with API key and workspace ID
client = KubeMindClient(
    api_key="your-api-key",
    workspace_id="default",
    router_url="http://localhost:9080",
    mind_url="http://localhost:9081",
    sentinel_url="http://localhost:9083",
)

# 1. Chat completion with intent classification & sensitivity governance
completion = client.chat_completion(
    model="llama3.1",
    messages=[
        {"role": "user", "content": "Email alice@example.com the summary report"}
    ]
)
print("Response:", completion["choices"][0]["message"]["content"])
print("Routing Decision:", completion.get("routing_decision"))

# 2. Semantic prompt routing
route = client.route("What is our company expense policy?")
print("Content:", route.get("content"))
print("Retrieval Status:", route.get("retrieval_status"))

# 3. CFO Cost & Usage Analytics
analytics = client.get_cost_analytics(window_hours=24)
print(f"Total Requests: {analytics['total_requests']}")
print(f"Estimated Spend ($): {analytics['estimated_spend_usd']}")

# 4. Cryptographic Ledger Verification
audit = client.verify_audit_ledger()
print("Ledger Intact:", audit.get("verified"))

Features

  • Pre-Dispatch Sensitivity Gating: Inline regex + local offline NER tokenization with in-memory reversible restoration.
  • Intent-Driven Routing: Routes prompts dynamically based on classified semantic intent.
  • Fail-Closed Grounding: Distinguishes verified corporate knowledge from hallucinations.
  • SHA-256 Tamper-Evident Ledger: Verifiable cryptographic audit trail for HIPAA/SOC2 compliance.
  • Granular RBAC: Supports role-scoped API keys (admin, developer, auditor, viewer).

Metadata

Release files for kubemind 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kubemind 0.1.2
File Size Uploaded Provenance Actions
kubemind-0.1.2.tar.gz 4.2 kB Without provenance Details for kubemind-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kubemind 0.1.2
File Interpreter ABI Platform Actions
kubemind-0.1.2-py3-none-any.whl Python 3 none any Details for kubemind-0.1.2-py3-none-any.whl

Total release size: 8.4 kB

Release files / kubemind-0.1.2.tar.gz

Download URL kubemind-0.1.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4931b34bbebc6f2967b8c55efe2c37123d7207b3034d6be45c4d92e963f885be
BLAKE2b-256 checksum
How to use checksums
706727f11ca6d86a88a834ebd758bfd5d84901a34a14ed1830c2f6c6d98223ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / kubemind-0.1.2-py3-none-any.whl

Download URL kubemind-0.1.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bfb5a8b62bb312b02654f83c7ab5ceec0e82371618a031dd637d21011408cfb
BLAKE2b-256 checksum
How to use checksums
c43b31861a90726a2c101085fcee66e1bc05e2ef4e258f18d8a3dec4aaea60f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for kubemind 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page