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.Quickstart
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
Automatic idempotency keys
Automatic idempotency keys
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:Retries with backoff
Retries with backoff
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.Typed errors
Typed errors
Every API error is an exception carrying the stable
code, status, detail, field problems and requestId / request_id.Auto-pagination
Auto-pagination
Iterate a list and the SDK fetches further pages as you go:
Revisions
Revisions
Pass the
revision you read so a stale write is refused: { ifMatch: agent.revision } in TypeScript, if_match=agent.revision in Python.Webhook verification
Webhook verification
Request IDs and rate limits
Request IDs and rate limits
Every result knows its response:
agent.lastResponse.requestId and .rateLimit in TypeScript; agent.request_id and agent.rate_limit in Python.File uploads
File uploads
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.
Pin the API version
SetKallabot-Version once as a default header, so a future API version never changes behaviour under you:
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.