Skip to main content

Kave Python SDK - control plane for AI agents

Project description

Kave Python SDK

Install:

uv add kave-sdk
pip install kave-sdk

Quickstart:

from kave import SyncClient
from kave.control.v1 import control_pb2

with SyncClient("localhost:19090", token="kv_...") as kave:
    org = kave.ensure_organization(control_pb2.CreateOrganizationRequest(name="Acme", slug="acme"))
    print(org.id)

Auth

Pass token="..." to add Authorization: Bearer ... on every RPC. Direct proto RPCs are reachable through client.control, client.runtime, and client.audit.

TLS

Use SyncClient(addr="api.example.com:443", tls=True) for system-root TLS, or pass custom grpc.ChannelCredentials with credentials=....

Retry

Idempotent List*, Get*, and Watch* RPCs retry 3 times by default: 200 ms base, 2x exponential backoff, +/-20% jitter, 5 s cap. Mutating RPCs do not retry. Use retry=NO_RETRY or pass a RetryPolicy to customize.

Async

from kave import AsyncClient

async with AsyncClient("localhost:19090") as kave:
    async for agent in kave.aiter_agents(env_id):
        print(agent.name)

Errors

SDK calls wrap gRPC failures in KaveError. Use predicates such as is_not_found(err), is_permission_denied(err), and is_unavailable(err).

Django

Install kave-sdk[django], add kave.contrib.django to INSTALLED_APPS, define KAVE = {...}, and run python manage.py kave_reconcile on deploy.

See examples/ and ../CONTRACT.md for the full parity contract.

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

kave_sdk-0.1.0.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

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

kave_sdk-0.1.0-py3-none-any.whl (102.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kave_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kave_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 934dd0b135ab2d5040830873d2455a2e640093ed5c32b3e5165d9b4e92b42775
MD5 25489a3b52d6aadea5d2c07a488b9a74
BLAKE2b-256 5ce7a9e727db9dd9f610bb68aa094b99cd67356cc83905d9da6711592c7bfd1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kave_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 102.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kave_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3999680c8e8bdff5b5504baea978ea09687cbe60b8d450369e0f3f4cfd85c9
MD5 f0cfd0faa3d80c6cde8e546f70893083
BLAKE2b-256 48a379a03719cb875fcad4f6c4fedf403a21a721d3ad0b983985030a3c4e0ba9

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