Skip to main content

kohala

Official Python client for the Kohala API — build, govern, run, and monetize AI agents. Zero third-party dependencies (standard library only). Every call is metered server-side; the client adds no tracking.

Install

pip install kohala

Requires Python 3.8+.

Quick start

from kohala import Kohala

kohala = Kohala(api_key="pk_...")  # a pk_ key from your Developer tab

# List your agents
agents = kohala.agents.list()

# Create one
agent = kohala.agents.create(
    name="Weekly digest",
    charter="Summarize this week's activity and publish a Koan.",
    industry="software",
    enabled=True,
)

# Trigger a run now (returns as soon as it's queued)
kohala.runs.trigger(agent["id"])

# Read run history
runs = kohala.runs.list(agent["id"], limit=10)

# Build a Koan embed URL for an iframe
src = kohala.koans.embed_url("my-koan-slug", view="detail")

Configuration

Kohala(
    api_key="pk_...",              # required
    base_url="https://kohala.ai",  # optional (default)
    timeout=30.0,                  # optional (seconds)
)

Resources

  • kohala.agents — CRUD plus health, get_quota/set_quota, skills, koans, reports, deployments.
  • kohala.runslist, get, trigger, retry.
  • kohala.workflowslist, get, create, update, delete, list_runs, run, get_run.
  • kohala.koansget, embed_url.

For anything else, kohala.request(method, path, query=..., body=...) calls any endpoint directly.

Errors

Non-2xx responses raise KohalaError with .status, .code, .details, and .request_id:

from kohala import KohalaError

try:
    kohala.agents.get(999)
except KohalaError as err:
    if err.status == 404:
        ...  # handle not found

License

MIT

Download files

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

Source Distribution

kohala-0.3.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

kohala-0.3.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file kohala-0.3.0.tar.gz.

File metadata

  • Download URL: kohala-0.3.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kohala-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a0f9a425e8746ff8d1037803a241bce6fc796a99349d8c3265f455cc3ebc20c5
MD5 88a8d4bfb45303ed160ef3038281657b
BLAKE2b-256 2117fcd36dea4359057d1c90008b1e937a32ffa32597f0fa6caa88209fea5f79

See more details on using hashes here.

File details

Details for the file kohala-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: kohala-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kohala-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f9f5ffc42a3118b4e6f752c0f9192324b7cd5a1504f58fccc5ea97cf0f1f383
MD5 6b73bd9eea7bb930d815c7a8df21c210
BLAKE2b-256 1ac2e1279ed4adb534697160f367f7004ea69c678cefdd51bc9001f383d01898

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