How to Audit a Multi-Agent CrewAI Crew: Find the Handoff That Broke the Output
Описание и применение
Руководство описывает, как добавить аудит к CrewAI с помощью ZizkaDB, создавая цепочку событий, позволяющую отследить каждый шаг, хэндшок и память агента.
Задача
Multi‑agent crews can produce wrong outputs because of subtle errors in handoffs that are not captured by standard observability tools.
Результат
The approach yields a tamper‑evident audit trail that links every task, handoff, and memory event, enabling causal debugging, compliance evidence, and time‑travel investigations.
Рабочий процесс
- Start a local ZizkaDB instance via Docker
- Install the ZizkaDB SDK and CrewAI logger
- Wrap the CrewAI kickoff and task loop with logger calls (log_kickoff, log_task, log_output)
- Log additional fields per task (role, sources, confidence, skipped actions)
- Record memory writes and supersedes relationships
- Use the dashboard for session replay and causal lineage queries
- Apply time‑travel debugging with db.at() to reconstruct past crew states
Доказательства
The logger records the crew lifecycle with three methods: log_kickoff for the start of the run, log_task for each task, and log_output for the final result.
The last line is the payoff. It walks back from the final output through every task to the kickoff, so a run becomes a causal tree and not a pile of unrelated lines.
- Дата записи: 2026-11-03T11:13:53.422Z