ZizkaDB README

The project's README from github.com/ZIZKA-AI-SL/ZizkaDB. As one markdown file: README.md.

ZizkaDB — visit db.zizka.ai

ZizkaDB

The audit trail database for AI agents

Tamper-evident, checksum-backed decision logs with session replay and time-travel debugging,
built to support EU AI Act Article 12 record-keeping.

Drift detection · MCP server · Python & TypeScript SDKs · Self-host or cloud

Quickstart · Docs · Integrations · Connect · Cloud · Discussions · Contributing

CI License: AGPL-3.0 Release Python SDK TypeScript SDK GitHub stars

Every agent team eventually asks: Why did it say that? Why did it call that tool? ZizkaDB links every agent step to the step that caused it, so you get the answer in one call instead of scrolling through traces.

Animated: db.why() walks from a tool_call back through llm_response to the root-cause user_message

Contents


Quickstart (60 seconds)

From zero to your first causal chain with one command. No repo clone needed.

Terminal animation: one curl command downloads config, pulls images, starts the stack, installs the SDK and prints a causal chain

1. Start Docker. Docker must be running. The first image pull can take 5–10 minutes; later starts take seconds.

2. Install and run. This downloads config and pre-built images, starts Postgres, Qdrant, Redis, the API and the dashboard, then runs a demo agent:

curl -fsSL https://raw.githubusercontent.com/Zizka-ai/ZizkaDB/main/scripts/quickstart-remote.sh | bash

3. See why. The demo prints the causal chain behind the agent's tool call:

tool_call · lookup_order · ORD-8842
  └── llm_response · gpt-4o
        └── user_message · Why was my order delayed?

4. Open the dashboard. localhost:3001/login → Open my dashboard → Activity → click any event → Why? (causal) tab.

Run the demo again anytime: pip install zizkadb-sdk && zizkadb demo

Self-host from a clone

git clone https://github.com/Zizka-ai/ZizkaDB.git && cd ZizkaDB
bash scripts/setup-local.sh
Service URL
API http://localhost:8000
Dashboard http://localhost:3001/login
Swagger http://localhost:8000/swagger

Full guide: DEVELOPMENT.md · Troubleshooting: wiki/Troubleshooting.md


Integrations

Works with the stack you already use — add one package and every step is logged with its cause.

Python    TypeScript    LangChain    CrewAI    LiveKit    MCP    REST API

IntegrationInstallWhat you get
 Python pip install zizkadb-sdk Any Python agent
 TypeScript npm install zizkadb-sdk Any JavaScript / TypeScript agent
 LangChain pip install zizkadb-langchain Drop-in callback handler
 CrewAI pip install zizkadb-crewai Crew logger for your agents
 LiveKit pip install zizkadb-livekit Voice agents — one call, one session
 MCP uvx zizkadb-mcp Ask Cursor or Claude why
 REST API Swagger docs Any language

Click a name for its setup guide. New project? Scaffold one with zizkadb init my-agent --template basic.


Connect your agent

import asyncio
from zizkadb import ZizkaDB

async def main():
    async with ZizkaDB(host="http://localhost:8000") as db:
        user = await db.log(agent="my-bot", event="user_message", data={"text": "Why is my order late?"})
        tool = await db.log(agent="my-bot", event="tool_call", data={"tool": "lookup_order"}, parent_id=user.event_id)
        (await db.why(tool.event_id)).print()

asyncio.run(main())
TypeScript
import { ZizkaDB } from 'zizkadb-sdk'

const db = new ZizkaDB({ host: 'http://localhost:8000' })

const user = await db.log({ agent: 'my-bot', event: 'user_message', data: { text: 'Why is my order late?' } })
const tool = await db.log({ agent: 'my-bot', event: 'tool_call', data: { tool: 'lookup_order' }, parentId: user.eventId })
;(await db.why(tool.eventId)).print()

From the terminal: zizkadb why <event_id>. Full guide: CONNECT.md


What it does

Function What you get
db.why(event_id) The causal chain behind any event
db.at(agent, timestamp) What the agent knew at a past moment
db.search(query) Semantic search over the agent's history
db.context_for(agent, task) Relevant past events, ready to inject into the next prompt
db.baseline(agent) Drift detection: alerts when agent behavior shifts from past sessions
db.forget(key, value) GDPR erasure by metadata filter, including the search index

Audit trail and EU AI Act Article 12

Article 12 of the EU AI Act requires high-risk AI systems to automatically keep logs of what they did. ZizkaDB gives you that record:

ZizkaDB supports your record-keeping obligations; it doesn't make a system compliant on its own.

ZizkaDB dashboard showing agent activity


How it works

flowchart LR
    A[Your agent<br/>SDK · LangChain · CrewAI · LiveKit] -->|events + parent_id| B[ZizkaDB API]
    D[Dashboard] --> B
    M[MCP server<br/>Cursor · Claude] --> B
    B --> P[(PostgreSQL<br/>source of truth)]
    B --> Q[(Qdrant<br/>semantic search)]
    B --> R[(Redis<br/>cache)]

Use with your AI assistant (MCP)

Ask Cursor or Claude "why did support-bot call lookup_order?" and get the chain back. Add this to your MCP config:

{
  "mcpServers": {
    "zizkadb": {
      "command": "uvx",
      "args": ["zizkadb-mcp"],
      "env": { "ZIZKADB_HOST": "http://localhost:8000" }
    }
  }
}

For ZizkaDB Cloud, use ZIZKADB_API_KEY instead. Setup for each client: mcp/README.md. The MCP server is MIT-licensed.


ZizkaDB vs. tracing tools

Tools like Langfuse and LangSmith observe span trees. ZizkaDB audits decisions.

ZizkaDB Typical LLM tracing tools
Explicit cause → effect links ✅ Span nesting
One-call root cause (db.why()) ✅ Manual trace reading
Time-travel to past agent state ✅ —
Memory for future runs (db.context_for()) ✅ —
Pricing Free self-host (AGPL) Often per-trace

Managed cloud (Pro / Team)

The same features, hosted at db.zizka.ai. No Docker to maintain.

Pro Team
Price €29 / mo €69 / mo
Events / mo† 50k 100k
API keys 2 5

Sign up →

† Plan targets on managed cloud; not enforced in API yet. See docs/README.md.

FAQ

Do I need to clone this repo?
No. The curl quickstart downloads config and Docker images only.

Do I need an API key locally?
No. http://localhost:8000 uses a built-in dev key.

zizkadb demo says connection refused?
The stack isn't running. Start it with the curl command above or bash scripts/setup-local.sh.

Docs & community
Worked example worked/01-support-order-delay
Examples examples/
Self-hosting DEVELOPMENT.md · wiki/Self-Hosting
Integrate any agent docs/integrate/
Issues · Discussions Issues · Discussions
Security SECURITY.md
AI-assisted development AGENTS.md

Contributors

Thanks to everyone who has helped build ZizkaDB. Want to join? Read CONTRIBUTING.md or pick up an open issue.

saadamjad
saadamjad
Zizka-ai
Zizka-ai
arshadgit23
arshadgit23
saadwashmen
saadwashmen
Subhajitdas99
Subhajitdas99
mikeaig4real
mikeaig4real
aqilaziz
aqilaziz
lamenting-hawthorn
lamenting-hawthorn
abdurrehman616
abdurrehman616
HafizHamzaShahid
HafizHamzaShahid
eaz1337
eaz1337
mbilalzeeshan
mbilalzeeshan
AbdelazizBs
AbdelazizBs
Mephistopheles9631
Mephistopheles9631
Qalbeabbas-12
Qalbeabbas-12
towfiq-ul
towfiq-ul

AGPL-3.0 · MCP server MIT · Disable telemetry: export ZIZKADB_TELEMETRY=false
This repo is the open-source self-host stack. The operator console and VPC deploy live in a private repo (why).

ZizkaDB (ZIZKA-AI-SL/ZizkaDB)

Searching Database…

这是什么?ZizkaDB 是一个为 AI 智能体构建的审计追踪数据库。它记录智能体的每个决策,附有 SHA-256 校验和以及指向成因的因果链接,因此你可以回放会话并“时间旅行”到过去任一时刻,查看智能体当时确切知道什么,支持欧盟 AI 法案第 12 条的记录保存要求。
它与 Langfuse 或 LangSmith 这类追踪工具有什么不同?追踪工具观察的是需要你手动阅读的跨度树;ZizkaDB 在每个事件上都存储显式的父 ID,因此 db.why() 一次调用就能沿因果链回溯到根本原因,它还增加了回到智能体过去状态的时间旅行功能,这是常见追踪工具做不到的。
怎么把它跑起来?启动 Docker,然后运行快速开始安装命令——它会拉取配置和预构建镜像,启动 Postgres、Qdrant、Redis、API 和仪表盘,并运行一个演示智能体,无需克隆仓库。要接入你自己的智能体,添加“pip install zizkadb-sdk”或“npm install zizkadb-sdk”,或者用“zizkadb init my-agent --template basic”脚手架创建新项目。
试用它需要 Docker 或 API 密钥吗?自托管必须运行 Docker;首次拉取镜像可能需要 5-10 分钟,之后的启动只需几秒。本地使用不需要 API 密钥,因为它使用内置的开发密钥,但 ZizkaDB Cloud 需要 ZIZKADB_API_KEY。
使用 ZizkaDB 就自动让我的 AI 系统符合第 12 条要求了吗?不能——README 明确指出 ZizkaDB 只是支持你的记录保存义务,本身并不能让系统合规。此外,云套餐的月度事件上限(5 万 / 10 万)只是声称的目标,API 中尚未强制执行。
如果我自己托管,我的数据会去哪里?自托管的数据绝不会离开你自己的基础设施。ZizkaDB 还通过 db.forget(key, value) 支持 GDPR 删除,它会移除匹配的记录并将其从搜索索引中清除。
除了原生 Python/TypeScript,哪些智能体框架有现成的集成?有即插即用的包:LangChain(回调处理器)、CrewAI(crew 日志记录器)和 LiveKit(语音智能体),还提供 MCP 服务器,任何支持 MCP 的客户端(如 Cursor 或 Claude)都可以查询它。
我可以直接问 Claude 或 Cursor 我的智能体为什么做了某件事吗?可以——把 MCP 服务器(uvx zizkadb-mcp)添加到客户端配置中,你就可以问诸如“support-bot 为什么调用 lookup_order?”这样的问题,并获得返回的因果链。
托管云的定价是多少?ZizkaDB Cloud Pro 为每月 29 欧元,含 5 万事件和 2 个 API 密钥;Team 为每月 69 欧元,含 10 万事件和 5 个 API 密钥;在 AGPL-3.0 下自托管免费,不按追踪条数计费。
ZizkaDB 不用图数据库是如何存储因果链的?每个事件都存储在 Postgres 中并带有对其父事件的引用,db.why() 用递归 SQL 查询沿该链回溯;事件还会镜像到 Qdrant 用于语义搜索,因此不需要单独的图存储。
Size
5.8 MB
Stars
142
Age
5mo
Commits · 90 Days