Skip to main content

KasbahOS — AI governance middleware. Govern every LLM call in real time.

Project description

kasbah-control

KasbahOS Python SDK — govern every AI agent call.

Install

pip install kasbah-control

Quick Start

from kasbah_control import protect
import openai

# One line — all calls governed
client = protect(openai.OpenAI())

response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello"}]
)

Get an API Key (free)

curl -X POST https://api.bekasbah.com/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com","tier":"free"}'

Direct Usage

from kasbah_control import KasbahAgentControl

control = KasbahAgentControl(
    api_url="https://api.bekasbah.com",
    api_key="kg_your_key_here"
)

decision = control.govern(prompt="User message here")
if decision.verdict == "DENY":
    raise PermissionError(f"Blocked: {decision.threats}")

License

MIT — bekasbah.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kasbah_control-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kasbah_control-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file kasbah_control-1.0.0.tar.gz.

File metadata

  • Download URL: kasbah_control-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for kasbah_control-1.0.0.tar.gz
Algorithm Hash digest
SHA256 72a05b505482ef686db1fdff8cdfb9a4aa140e7d87c9b5e439ecf4fd7834be4d
MD5 f36415fc18a5f8b1f111cfcd1f89eac4
BLAKE2b-256 e15c6983bbc1672be8ec713df05056d7e49bad6cd23d4486368bf4f8db6fab3c

See more details on using hashes here.

File details

Details for the file kasbah_control-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: kasbah_control-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for kasbah_control-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc7bf6b21f5a094a2a28d50b5938b63d82d681bd3c3cea697d2070bc292caaca
MD5 68c499dc052cf57fdc3ed16e333298db
BLAKE2b-256 2cd6898190cf7d9c5416e552fe1dd849c54fe0276afe7b32fc9c53190a5d8ede

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page