Repository navigation
TypeScript SDK
Saadamjad edited this page Jul 14, 2026
·
1 revision
Package: zizkadb-sdk on npm
npm install zizkadb-sdkimport { ZizkaDB } from 'zizkadb-sdk'
const db = new ZizkaDB({ apiKey: process.env.ZIZKADB_API_KEY! })
const result = await db.log({
agent: 'my-bot',
event: 'tool_call',
data: { tool: 'search' },
})
const chain = await db.why(result.eventId)
chain.print()| Variable | Purpose |
|---|---|
ZIZKADB_API_KEY |
Cloud API key |
AGENTDB_API_KEY |
Legacy alias |
ZIZKADB_HOST |
Self-hosted URL |
ZIZKADB_TELEMETRY |
Set false to opt out |
Core HTTP client only — LangChain and CrewAI adapters are Python packages (zizkadb-langchain, zizkadb-crewai).
const db = new ZizkaDB({ host: 'http://localhost:8000' })import { AuthError, AgentScopeError, ZizkaDBError } from 'zizkadb-sdk'-
AuthError— 401 invalid key -
AgentScopeError— 403 agent name mismatch -
NotFoundError— 404
Server-side env vars are baked at npm run build. After changing .env, rebuild before restarting PM2.
- Getting Started
- CONNECT.md — connect your stack
- Worked example 01
- Agents and API Keys
- Troubleshooting