Skip to main content

zizkadb-sdk

PyPI: zizkadb-sdk 0.3.0

Python SDK for ZizkaDB — Why 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 (ZizkaDB Cloud)

An API key works for one agent name. Running several agents — and agent-to-agent messaging between them — is a ZizkaDB Cloud feature; create each agent and its key in the dashboard.

Self-hosted ZizkaDB is single-agent: log everything under one agent name and use session_id to separate users or conversations. A second agent name is rejected with 409 agent_limit_reached.

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 →

Metadata

Release files for zizkadb-sdk 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zizkadb-sdk 0.3.0
File Size Uploaded Provenance
zizkadb_sdk-0.3.0.tar.gz 43.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zizkadb-sdk 0.3.0
File Interpreter ABI Platform
zizkadb_sdk-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.2 kB

Release files / zizkadb_sdk-0.3.0.tar.gz

Download URL zizkadb_sdk-0.3.0.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
155af6e399a7f0e831dc17847394412e95b889f558684670e89f82ff916349ef
BLAKE2b-256 checksum
How to use checksums
ee3ac2b2c5518adf28b7badaeb574443e9713d25a76b4cef52a4322f8eb5c497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / zizkadb_sdk-0.3.0-py3-none-any.whl

Download URL zizkadb_sdk-0.3.0-py3-none-any.whl
Size 38.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96effccbb24e3c48710c7fb050e8335c1093a8e69798ff0b24e859a5bd6c5fe4
BLAKE2b-256 checksum
How to use checksums
0a31c7602067298e422081d7b4867bc34680cd17084922a4f6cd90ee85d0d14e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for zizkadb-sdk 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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