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_HOST Self-hosted API URL
ZIZKADB_TELEMETRY Set false to opt out

Self-host dashboard

  1. docker compose -f infra/docker-compose.yml up -d
  2. NEXT_PUBLIC_API_URL=http://localhost:8000 NEXT_PUBLIC_DEV_MODE=true npm run dev in dashboard/
  3. Open http://localhost:3000/loginOpen 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.4.tar.gz (21.6 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.4-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zizkadb_sdk-0.2.4.tar.gz
  • Upload date:
  • Size: 21.6 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.4.tar.gz
Algorithm Hash digest
SHA256 25c9cb26bd2cbe8ea76ea5b80edb9e1db6340c6db991f6c52b738eafca527220
MD5 547ee63642ff472ec13990ebc4836481
BLAKE2b-256 d1f9d98614936f8325a83c07bed4119d0e0c800c23946adc449e00b78eecbd8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zizkadb_sdk-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 29.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9bc5c9443760f3c1eb11002bd2de93fb4a69888e3492fe421f5315122545898a
MD5 e5b5d48b245126972de959748b7239de
BLAKE2b-256 3ce5b5a414ba1229b882d5cf77c6f84a3162dd66df55947c730d42ebf804da7d

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