zizkadb-sdk
PyPI: zizkadb-sdk 0.2.8
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)
- Sign up at db.zizka.ai
- Dashboard → Create agent (e.g.
my-bot) — you get an API key for that agent - Use the same agent name in every
db.log()call - Set
ZIZKADB_API_KEY(or pass the key to the constructor)
Important: The
agentindb.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
agentdbon PyPI. Installzizkadb-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
bash scripts/setup-local.sh(API + dashboard on port 3001)- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a2bb56937885d180899d69cb05c9ea3da24b650d38227eb46e1c7e9e65b8db
|
|
| MD5 |
aaf0f893e8390e313a8abea5928e3389
|
|
| BLAKE2b-256 |
ded8e592a20eca31a08cc47cfc6f410d1451495162ab236cce8d4fa4e443fc60
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c0a47bef68184c7384120e1acc255d8ba5ecf60b22c2b6faf55843e1a5d3e40
|
|
| MD5 |
c93f6e179fcd861460f0c8fd933bc01d
|
|
| BLAKE2b-256 |
7578ae4d7efaad2a8a06e7bd2f661f7d1c726784fbb4b5d8fdd9589c6bfa6cb2
|