ZizkaDB + LiveKit Agents
PyPI: zizkadb-livekit 0.2.3 · depends on zizkadb-sdk>=0.5.0 + livekit-agents>=1.3.0
Log voice calls to ZizkaDB with the same Activity → Sessions / Events model as text agents.
- One
session_idper call (use the LiveKit room name or job id) - Transcript only — text copied from LiveKit's chat history and
make_session_report()(no audio in ZizkaDB) - Pipeline events — tool calls, handoffs, state changes, interruptions, token usage
- Causal lineage — a single-stranded
parent_idchain for Why? in the dashboard - Never on the audio path — writes are queued and drained in the background; a ZizkaDB outage degrades observability, never the call
Install
pip install "zizkadb-livekit>=0.2.3"
Start ZizkaDB (Docker quickstart):
curl -fsSL https://raw.githubusercontent.com/ZIZKA-AI-SL/ZizkaDB/main/scripts/quickstart-remote.sh | bash
Usage
import os
from livekit.agents import AgentServer, JobContext, AgentSession, Agent
from zizkadb import ZizkaDB
from zizkadb_livekit import ZizkaDBLiveKitObserver, pop_observer, register_observer
server = AgentServer()
async def on_session_end(ctx: JobContext) -> None:
# on_session_end receives the same JobContext as the entrypoint, so the
# observer is looked up per call. One worker serves many calls concurrently;
# a module-level observer would let them overwrite each other's transcripts.
observer = pop_observer(ctx)
if observer is None:
return
try:
await observer.ingest_session_report(ctx)
finally:
await observer.aclose()
@server.rtc_session(agent_name="support-voice", on_session_end=on_session_end)
async def entrypoint(ctx: JobContext):
db = ZizkaDB(host=os.getenv("ZIZKADB_HOST", "http://localhost:8000"))
observer = ZizkaDBLiveKitObserver(
db,
agent=os.getenv("ZIZKADB_AGENT", "support-voice"),
session_id=ctx.room.name,
)
register_observer(ctx, observer)
session = AgentSession(...) # your STT / LLM / TTS
# Attach before session.start() so no turn is missed.
observer.attach(session, job_ctx=ctx)
observer.queue_session_started(room=ctx.room.name, job_id=ctx.job.id)
await session.start(agent=Agent(instructions="..."), room=ctx.room)
await ctx.connect()
Open http://localhost:3001 → Activity → your agent → Sessions.
Verbosity
Voice pipelines emit many more events than text agents, so events are tiered. Each level logs its own tier and everything quieter; errors and session boundaries are always logged.
| Level | Adds |
|---|---|
transcript |
Turns, tool calls/results, handoffs, errors, session boundaries |
standard (default) |
State changes, interruptions, timeouts, token usage |
verbose |
Partial transcripts, turn-detector predictions, bounded raw payloads |
observer = ZizkaDBLiveKitObserver(db, agent="...", session_id="...", level="verbose")
or set ZIZKADB_EVENT_LEVEL globally.
Event types
| Event | Source |
|---|---|
session_started / session_ended |
Call boundaries |
user_message / assistant_response |
LiveKit chat history |
user_transcript |
Final STT result |
tool_call / tool_result |
Tool items + function_tools_executed |
agent_handoff |
Multi-agent workflow handoff |
user_state_changed / agent_state_changed |
Pipeline state |
usage_updated |
Token usage |
error |
Failures |
Manual helpers: log_tool_call, log_tool_result, log_error.
Lifecycle
attach(session, job_ctx=ctx)— subscribe to the live event stream, beforesession.start(). Never raises.queue_session_started(...)— non-blocking; useawait log_session_started(...)if you need the event id.ingest_session_report(ctx)— back-fill the full transcript at call end.flush(timeout=None)— wait for queued writes (defaultflush_timeout, 10s).aclose()— flush, stop the writer, release the pooled connection. Idempotent; also usable asasync with.
Environment
export ZIZKADB_HOST=http://localhost:8000 # self-host
export ZIZKADB_AGENT=support-voice
export ZIZKADB_EVENT_LEVEL=standard # transcript | standard | verbose
# Cloud: export ZIZKADB_API_KEY=zizkadb_live_...
See examples/livekit-agent for a full sample.
Metadata
Release files for zizkadb-livekit 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zizkadb_livekit-0.2.3.tar.gz | 19.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zizkadb_livekit-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.8 kB
Release files / zizkadb_livekit-0.2.3.tar.gz
| Download URL | zizkadb_livekit-0.2.3.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b2ed1d67ded0e6dd4eb8d99d9b07ceecc12e9ac3a9f52af98bc792d54147cd3
|
|
BLAKE2b-256 checksum How to use checksums |
c769f092d2a968977bd9d8eb3cd7139f137223edf1e201445089c1b0e039e084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / zizkadb_livekit-0.2.3-py3-none-any.whl
| Download URL | zizkadb_livekit-0.2.3-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c621304daf23fba9140cda3efd42da2b8afb2c36471f398b1c209d5c9e4df911
|
|
BLAKE2b-256 checksum How to use checksums |
10b53c409617c88d48dffa61bb8a2ea5eeb1e99a0800cbf89e5f7a7a8b9eb9db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for zizkadb-livekit 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.