Skip to main content

ZizkaDB tells you when your agent stops behaving like itself. Causal lineage, time travel and behavioral baselines for any AI agent.

Project description

zizkadb-sdk

Python SDK for ZizkaDB — the operational database for AI agents.

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.

Quickstart

from zizkadb import ZizkaDB

# Key from Dashboard → Agents → 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

Self-host dashboard

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

Links

Project details


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.5.tar.gz (19.3 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.5-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zizkadb_sdk-0.2.5.tar.gz
Algorithm Hash digest
SHA256 41cc3a21f345118024a72a9d8f31f94810ae6a28316fa8091cc6177d147af31e
MD5 8a81370637182b5750e88d2806d1772b
BLAKE2b-256 d14e2912b3a3971297a81659549675c9c79af3376238e2dea1d87292904482c5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zizkadb_sdk-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c80e9a007c87d14ef183896f523ff5ed91b347d5f1fe52fef86485bc9c8e96cd
MD5 bbe9a82b54092f799843abf0dca8d28d
BLAKE2b-256 6474a4b8020ab8fa901c7f0d15c885befda697ddeb42080603a4df5658c0ac4a

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