Skip to main content

Kybernis Python SDK

Project description

Kybernis Python SDK (beta)

This SDK lets multi-agent builders (LangGraph, CrewAI, LangChain) route tool calls through the Kybernis execution gate, emit execution spans, and report tool health/cost.

Install (local dev)

  • Add sdk/python to your PYTHONPATH or vendor the package into your app.
  • Or set KYB_SDK_PATH to the absolute path of sdk/python.

Minimal usage

  • Set env: KYB_API_BASE, KYB_API_TOKEN, KYB_TENANT_ID, KYB_RUN_ID
  • Enable SDK: KYB_SDK_ON=1

The SDK provides:

  • KybernisClient for tool registry, health, events, cost, and gate requests.
  • kyb_tool decorator to gate tool calls before framework-level HITL.
  • install() auto-patches requests/httpx to inject Kybernis headers.
  • derive_idempotency_key() to match proxy idempotency hashing.
  • span() helpers for non-HTTP execution spans.
  • Side-effect helpers: webhook(), email(), charge().

Env flags

  • KYB_SDK_ON=1 enable SDK
  • KYB_API_BASE control plane base URL
  • KYB_API_TOKEN auth token
  • KYB_TENANT_ID tenant scope
  • KYB_RUN_ID run scope (set per run)
  • KYB_TOOL_REGISTER=1 auto-register tools
  • KYB_GATE_AUTO_APPROVE=1 auto-approve gate unless overridden
  • KYB_TOOL_CALL_LIMIT=0 per-tool call limit (0 = unlimited)
  • KYB_ENFORCE_EGRESS=1 fail-closed if HTTP(S)_PROXY is not set

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

kybernis-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

kybernis-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file kybernis-0.1.0.tar.gz.

File metadata

  • Download URL: kybernis-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0b4

File hashes

Hashes for kybernis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a7dd59d47fc4a27703866d221fefdc94e20e2419302dab17a990f85891a6c14a
MD5 c2e62c377556f60f8ac3903470285e65
BLAKE2b-256 5770289cde93a1a990d4a5637079c36bca458a48330b0a4e04c228460b077346

See more details on using hashes here.

File details

Details for the file kybernis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kybernis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0b4

File hashes

Hashes for kybernis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 351a249fd049f4238568ff3bea46b22977eac8855a20298eaedeb660d8b8ef35
MD5 92b059f15a5162b9e069f603ead7a07b
BLAKE2b-256 d68271169a351e6dd02ad002faa727b5a7a835ba695200b495b52ce220e9bf04

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