Skip to main content
The SDKs aren’t published yet. The install commands below will work once @kallabot/sdk is on npm and kallabot is on PyPI. Until then, call the API directly; every example in these docs also has a curl tab.

TypeScript / JavaScript

npm i @kallabot/sdkNode 18+, Deno, Bun, Cloudflare Workers, Vercel Edge, and browsers (for voice calls). No runtime dependencies.

Python

pip install kallabotPython 3.9+. Sync Kallabot and async AsyncKallabot clients with the same methods.
Both are generated from the same OpenAPI spec as the API reference, so every operation, field and scope is there, with editor completion.

Quickstart

Methods are named after their resource: calls.create(), agents.list(), agents.publish(), agents.versions.list(), knowledge.sources.create(), webhooks.create(), webCalls.create() (web_calls.create() in Python). TypeScript reads with get(), Python with retrieve(). Both kinds of API key work the same way.

What the SDKs do for you

Every create and action gets a fresh Idempotency-Key, reused on every retry, so a retried calls.create can never ring someone twice. Pass your own to dedupe across your own retries:
Network errors, timeouts, 408, retryable 5xx (only where a repeat can’t run twice), 429 and 409 idempotency_in_progress are retried with exponential backoff and jitter. A 429 waits exactly Retry-After. Set maxRetries / max_retries (default 2). Errors that need a change to the request are never retried.
Every API error is an exception carrying the stable code, status, detail, field problems and requestId / request_id.
Iterate a list and the SDK fetches further pages as you go:
Pass the revision you read so a stale write is refused: { ifMatch: agent.revision } in TypeScript, if_match=agent.revision in Python.
verify checks the Standard Webhooks signature and timestamp and returns a typed event.
See Webhooks.
Every result knows its response: agent.lastResponse.requestId and .rateLimit in TypeScript; agent.request_id and agent.rate_limit in Python.
knowledge.sources.create sends files as multipart: toFile(buffer, "menu.pdf") in TypeScript, a Path, an open file or bytes in Python. See Knowledge.

Browser voice calls

@kallabot/sdk/web connects a web page to an agent over WebRTC. It never sees an API key: your server creates the session and hands the browser a single-use grant.
See Web calls for the server side.
The main client refuses to start in a web page, whichever key you pass, because anyone could read the key there. In the browser, use only @kallabot/sdk/web.

Pin the API version

Set Kallabot-Version once as a default header, so a future API version never changes behaviour under you:
Each request also identifies the SDK release (X-Kallabot-SDK). If a release is ever retired, the API answers 426 sdk_version_unsupported and the SDK tells you how to upgrade. See Versioning.