{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "zizka-ai-sl-zizkadb--replay-agent-session-to-debug",
 "repo": "ZIZKA-AI-SL/ZizkaDB",
 "repo_url": "https://github.com/ZIZKA-AI-SL/ZizkaDB",
 "repo_slug": "zizka-ai-sl-zizkadb",
 "title": "Trace why your agent made a bad tool call",
 "page_title": "How to trace why your agent made a bad tool call with ZizkaDB",
 "summary": "Use ZizkaDB's causal chain, session replay and time travel to walk back from a wrong tool call to the message or context that caused it.",
 "who": "An engineer debugging an agent that did something odd in production, such as calling the wrong tool or using stale information.",
 "problem": "Flat traces show what happened but not why, and you cannot see what the agent knew at the moment it decided.",
 "outcome": "The causal chain behind any event, a step by step replay of the session, and a rebuild of the agent's knowledge at any past timestamp.",
 "steps": [
  "Start ZizkaDB with the quickstart or the docker run command and log your agent through the SDK",
  "Find the suspicious event in the dashboard and open the Why? (causal) tab",
  "From the terminal, run zizkadb why with that event's id",
  "In code, call db.why(event_id) to print the chain back to the user message",
  "Call db.at(agent, timestamp) to see exactly what the agent knew at that moment",
  "Replay the whole session event by event to find where it went wrong"
 ],
 "agent_prompt": "Using ZizkaDB, explain why <agent> called <tool> in session <id>: print the db.why chain for that event, rebuild what the agent knew with db.at at that time, and point to the step where the context was wrong.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Replay and causal chains cover only what your integration logged.",
 "category": "Security and science",
 "tags": [
  "Security and science"
 ],
 "lang": "python",
 "requirements": [
  "Docker",
  "Python or TypeScript SDK for integration"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/zizka-ai-sl-zizkadb/replay-agent-session-to-debug/",
 "md": "https://dedupedai.com/use-cases/zizka-ai-sl-zizkadb/replay-agent-session-to-debug/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/zizka-ai-sl-zizkadb--replay-agent-session-to-debug.json",
 "api_version": "v1"
}
