Skip to main content

zizkadb-sdk

PyPI: zizkadb-sdk 0.2.8

Python SDK for ZizkaDBWhy did your agent do that? Call db.why(event_id) or zizkadb why <id> after logging with parent_id.

Setup (managed cloud)

  1. Sign up at db.zizka.ai
  2. Dashboard → Create agent (e.g. my-bot) — you get an API key for that agent
  3. Use the same agent name in every db.log() call
  4. Set ZIZKADB_API_KEY (or pass the key to the constructor)

Important: The agent in db.log(agent="...", ...) must match the agent you created in the dashboard. A mismatch returns 403 AgentScopeError.

Install

pip install zizkadb-sdk

Note: There is an unrelated package called agentdb on PyPI. Install zizkadb-sdk. Import: from zizkadb import ZizkaDB.

Scaffold a project

pip install zizkadb-sdk
zizkadb init my-agent --template basic
cd my-agent && cp .env.example .env   # paste your key into ZIZKADB_API_KEY
pip install -r requirements.txt
python agent.py

Templates: basic, openai, langchain, crewai, mcp-cursor.

Framework packages (optional)

Package Install Use case
zizkadb-langchain pip install zizkadb-langchain LangChain callbacks
zizkadb-crewai pip install zizkadb-crewai CrewAI crew logger
zizkadb-livekit pip install zizkadb-livekit LiveKit voice → Sessions + Events

See integrations/ and docs/integrations/livekit.md.

Quickstart

from zizkadb import ZizkaDB

# Key from Dashboard → Settings → API keys → create "my-bot" → copy key
db = ZizkaDB("zizkadb_live_xxxx")

async with db:
    result = await db.log(
        agent="my-bot",  # must match dashboard agent name
        event="tool_call",
        data={"tool": "search", "query": "billing"},
    )
    chain = await db.why(result.event_id)
    chain.print()

Multi-agent apps (one key, many agent names)

If your app logs to different agent ids per user (e.g. conv-alice, conv-bob), create a tenant-wide key in Settings → Tenant-wide API key. Per-agent keys only work for that one agent name.

Errors

Exception Meaning
AuthError Invalid or revoked API key
AgentScopeError Key is for agent A but you logged to agent B
NotFoundError Event or agent not found

Environment variables

Variable Purpose
ZIZKADB_API_KEY Your cloud API key (preferred)
AGENTDB_API_KEY Legacy alias for ZIZKADB_API_KEY
ZIZKADB_AGENT Default agent name (used in templates/examples)
ZIZKADB_HOST Self-hosted API URL
ZIZKADB_TELEMETRY Set false to opt out (anonymous ping on client construct)

Self-host dashboard

  1. bash scripts/setup-local.sh (API + dashboard on port 3001)
  2. Open http://localhost:3001/login → Open my dashboard →

Links

Download files

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

Source Distribution

zizkadb_sdk-0.2.8.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

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

zizkadb_sdk-0.2.8-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file zizkadb_sdk-0.2.8.tar.gz.

File metadata

  • Download URL: zizkadb_sdk-0.2.8.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for zizkadb_sdk-0.2.8.tar.gz
Algorithm Hash digest
SHA256 c7a2bb56937885d180899d69cb05c9ea3da24b650d38227eb46e1c7e9e65b8db
MD5 aaf0f893e8390e313a8abea5928e3389
BLAKE2b-256 ded8e592a20eca31a08cc47cfc6f410d1451495162ab236cce8d4fa4e443fc60

See more details on using hashes here.

File details

Details for the file zizkadb_sdk-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: zizkadb_sdk-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for zizkadb_sdk-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0a47bef68184c7384120e1acc255d8ba5ecf60b22c2b6faf55843e1a5d3e40
MD5 c93f6e179fcd861460f0c8fd933bc01d
BLAKE2b-256 7578ae4d7efaad2a8a06e7bd2f661f7d1c726784fbb4b5d8fdd9589c6bfa6cb2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page