<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mir Arshad Ali on Medium]]></title>
        <description><![CDATA[Stories by Mir Arshad Ali on Medium]]></description>
        <link>https://medium.com/@MirArshadTalpur?source=rss-c496a816d0c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vjBiESAV6rDgTZVk5vmcMQ.jpeg</url>
            <title>Stories by Mir Arshad Ali on Medium</title>
            <link>https://medium.com/@MirArshadTalpur?source=rss-c496a816d0c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 12:45:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@MirArshadTalpur/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Bank’s AI Agent Rejected a Loan and the Customer Is Going to Court. Who Can Prove Why?]]></title>
            <link>https://medium.com/@MirArshadTalpur/the-banks-ai-agent-rejected-a-loan-and-the-customer-is-going-to-court-who-can-prove-why-728607ae72f1?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/728607ae72f1</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[zizkadb]]></category>
            <category><![CDATA[agent-banking]]></category>
            <category><![CDATA[ai-in-banking]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 10:36:47 GMT</pubDate>
            <atom:updated>2026-11-23T10:36:47.416Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytzFSRwANitrLn1lyXucog.jpeg" /><figcaption>Banking agent and zizkadb</figcaption></figure><p>A customer applies for a loan. A lending agent, built by a vertical AI company and deployed by the bank, rejects the application in seconds. The customer asks why, gets a generic reply, and files a complaint. A few months later the complaint is a court claim and a regulator has written to the bank asking for the file.</p><p>Now two organisations have the same problem from opposite sides. The bank is the lender and answers to the customer, the court and the supervisor. The vendor built the agent and answers to the bank, under a contract, and possibly to a regulator of its own. Each holds part of the evidence. Neither can prove the whole story. And each has a reason to suspect the other of telling it differently.</p><p>This article defines that problem from both angles, then shows how a cryptographic hash chain, implemented with ZizkaDB, lets both sides produce one shared record that neither can quietly change.</p><p>A note on scope. This is general information, not legal advice. Which rules apply depends on jurisdiction, product, customer type and how much a human is involved. Take advice from counsel and your compliance team. The scenario is a composite, not a real case. Parameter names in code are illustrative. ZizkaDB records events and shows whether the record has been altered. It does not decide whether a rejection was lawful, judge the model, or deliver compliance.</p><h3>The scenario</h3><p>Call the bank Meridian Bank and the vendor Lumen AI, both invented. Lumen supplies a credit assessment agent that reads an application, pulls bureau data and bank statements through tools, applies policy documents and returns a recommendation. Meridian’s process lets the agent decline small personal loans without a human, and routes borderline cases to an underwriter.</p><p>A customer, Ms Alvarez, is declined. The notice says her application did not meet credit criteria. She believes the decision relied on a wrong bureau entry and on her postcode. She requests the logic behind the decision, escalates to the regulator and finally sues.</p><p>Four things now happen at once.</p><ol><li>The court asks Meridian to explain and defend the decision.</li><li>The regulator asks how the system works, what logs exist and whether the human oversight was real.</li><li>Meridian asks Lumen for evidence, as the contract allows.</li><li>Lumen, with other bank customers on the same platform, asks its own counsel how much to disclose.</li></ol><h3>What the rules ask for</h3><p>The details vary by country, but a pattern is clear from the sources. It is worth stating plainly, because the technical problem follows from it.</p><p><strong>Explanation of automated decisions.</strong> Under the GDPR, a person subject to a decision based solely on automated processing with significant effects has protections under Article 22, and a right under Article 15(1)(h) to meaningful information about the logic involved. In February 2025 the Court of Justice of the EU, in the Dun &amp; Bradstreet Austria case on automated credit assessment, said the data subject is entitled to an explanation of how the decision was taken, and that it must enable the person to understand and challenge it. The Court did not require disclosure of the algorithm, and it recognised a way to handle trade secrets through review by a court or authority.</p><p><strong>Consumer credit rules.</strong> The EU’s revised Consumer Credit Directive applies from 20 November 2026. Commentary on it says that where the creditworthiness assessment involves automated processing of personal data, the consumer has the right to human intervention, and may request an explanation of the assessment and a review of the decision. Member states transpose it, so national rules matter.</p><p><strong>The AI Act.</strong> Evaluating the creditworthiness of natural persons or establishing their credit score is listed as high-risk in Annex III, point 5(b). Deployers of high-risk systems must keep the logs the system generates, where under their control, for at least six months, and financial institutions have specific governance arrangements. The application date for these Annex III obligations was moved by the Digital Omnibus to 2 December 2027, so check the final text and your own timeline.</p><p><strong>United States.</strong> The Equal Credit Opportunity Act and Regulation B require a statement of specific reasons for adverse action. The CFPB’s Circulars 2022–03 and 2023–03 said that creditors cannot use complex algorithms when that means they cannot provide specific and accurate reasons, and that sample checklist reasons are acceptable only when they reflect the real principal reasons. Regulatory guidance has been shifting, so check what currently stands. Fair lending law adds exposure if the decision shows a discriminatory effect.</p><p><strong>Operational resilience and outsourcing.</strong> In the EU, banks that use an ICT or AI vendor are also subject to third-party risk rules, and supervisors expect the bank to keep control of outsourced functions. The legal responsibility for the decision stays with the bank.</p><p>The common thread: the bank must be able to say what the agent used, what rules applied, why the outcome followed, and whether a human could and did intervene. In a dispute, it must be able to show that its account is the real record and not a story written afterwards.</p><h3>The problem from the bank’s side</h3><p>Meridian’s difficulties are less about the model than about evidence.</p><p><strong>1. The decision is not in the bank’s systems.</strong> The agent ran in Lumen’s cloud. Meridian holds the application, the outcome and a notice. The retrieval steps, the tool results, the prompt and the policy version sit in the vendor’s logs.</p><p><strong>2. Responsibility does not move with the data.</strong> The bank is the lender. It cannot answer a court by saying the vendor knows. Regulators have been consistent that outsourcing a function does not outsource accountability.</p><p><strong>3. The questions are specific.</strong> A judge or supervisor will ask:</p><ul><li>What data about the customer did the agent use, and as of when?</li><li>Was the bureau entry she disputes part of the input?</li><li>Did the postcode or any proxy for a protected characteristic feed the decision?</li><li>Which policy version and model version were live that day?</li><li>Was the rejection reviewed by a human, and what did the reviewer see?</li><li>Did the stated reason in the notice match what drove the outcome?</li><li>Is the record you are showing us the one made at the time?</li></ul><p><strong>4. The reason in the notice may not match the cause.</strong> If the agent generated a plausible rationale after reaching its output, the notice may state a principal reason that the record cannot support. In the US that is directly relevant to the requirement for specific and accurate reasons.</p><p><strong>5. Human oversight is hard to prove.</strong> If an underwriter was supposed to review, the bank needs evidence that they saw the case, what they saw and what they decided, and that it was not a rubber stamp.</p><p><strong>6. Pattern risk.</strong> One customer sues. The regulator asks how many others were treated the same way. Without linked records, finding every decision that used the same faulty bureau entry or the same policy version is weeks of work.</p><p><strong>7. Authenticity.</strong> Even good logs can be challenged. If the other side suggests that records were edited after the complaint, the bank has to show that they were not.</p><h3>The problem from the vendor’s side</h3><p>It is tempting to see the vendor as the villain. Lumen’s position is also difficult.</p><p><strong>1. It carries contractual exposure.</strong> The contract probably has warranties, audit rights, indemnities and service levels. If the bank is held liable, it will look to the vendor. Lumen needs evidence that the agent worked as specified and that the bank’s instructions, data or overrides shaped the outcome.</p><p><strong>2. It cannot disclose everything.</strong> Prompts, model configuration and policy logic are commercial assets, and logs from a multi-tenant platform may include other customers’ data. Handing a court or regulator an unfiltered dump is risky. Refusing to share invites suspicion and may breach the contract.</p><p><strong>3. It must prove what it did not do.</strong> If the bank changed a policy file, altered a threshold or overrode a recommendation, Lumen wants that on record. If Lumen shipped a model update that shifted behaviour, the bank will want that on record. Each side has an incentive to keep the other’s changes visible and its own mistakes quiet.</p><p><strong>4. Its own regulatory position is moving.</strong> Under the AI Act, providers of high-risk systems have their own obligations, including technical documentation and automatic recording of events. In some markets, vendors of critical ICT services to banks are under direct oversight.</p><p><strong>5. Its reputation travels.</strong> A single high-profile dispute can chill sales to every other bank.</p><p><strong>6. It needs a clean exit.</strong> If the evidence shows the agent behaved as designed and the bank’s process was the issue, Lumen needs to show that convincingly. If the evidence shows a defect, Lumen needs to find it, fix it and scope the impact before the regulator does.</p><h3>Where the interests collide</h3><p>QuestionBank wantsVendor wantsWho holds the record?Control, access on demandProtection of IP and other customers’ dataWho proves what was changed?A view of every vendor-side changeA view of every bank-side overrideWhat gets disclosed to a court?Enough to defend the decisionOnly what is necessaryWho can edit logs?No one, after the factNo one, after the factWho is believed?The bank’s accountThe vendor’s account</p><p>Notice the last row. In a dispute, each side’s record will be suspected by the other. A log kept by one party and held under its own admin access proves less than it appears to. The strongest evidence is a record that neither party could have changed without being caught.</p><h3>Why ordinary logs fail here</h3><ul><li><strong>They are mutable.</strong> Someone with access can edit or delete a line, and nothing shows it happened.</li><li><strong>They are fragmented.</strong> Application logs, model provider logs, tool logs and case management records sit in different systems with different clocks.</li><li><strong>They show sequence, not cause.</strong> They say what happened next, not what influenced it.</li><li><strong>They lack versions.</strong> Which prompt, policy and model were live is often recoverable only from deployment history.</li><li><strong>They have short retention.</strong> Thirty days of logs do not cover a claim filed eight months later.</li><li><strong>They record the story, not the inputs.</strong> The agent’s stated reason is easy to keep. The data it actually used is easier to lose.</li></ul><p>Imagine the timeline. Month one: the decision. Month three: the complaint. Month six: the regulator’s request. Month nine: the claim. By then the bureau data has changed, the prompt has had two releases, the engineer who built the integration has left and the logs have rolled over. Both sides assemble what they can, and the case turns on whose reconstruction a court finds credible.</p><h3>How the dispute unfolds when each side acts alone</h3><p>It helps to follow the same dispute step by step, with no shared record.</p><p><strong>Month 3, the complaint.</strong> Meridian’s complaints team pulls the case. It has the application, the outcome and the notice. It asks Lumen for the decision details. Lumen’s support team replies that the agent applied the retail policy and returned a decline, and attaches a summary generated from its logs. The summary is readable and short. Nobody at the bank can tell whether it is a faithful extract or a tidy narrative.</p><p><strong>Month 5, the regulator.</strong> The supervisor asks Meridian for the full decision file, the version of the model and policy in force, evidence of human oversight and the number of similar decisions. Meridian forwards the questions to Lumen. Lumen’s counsel advises caution, because the platform serves other banks and the prompt is a trade secret. Weeks pass in negotiation over what can be shared and in what form. The regulator reads the delay as a sign that the bank does not control its own process.</p><p><strong>Month 7, the discovery of a change.</strong> While assembling the file, Lumen’s engineers find that a policy threshold was adjusted two weeks before Ms Alvarez applied, at the bank’s request. The bank’s records of that request are in an email thread nobody can find quickly. Lumen says the change was authorised. The bank says it asked for a trial, not a production change. Each side now doubts the other’s account, and the contract dispute begins alongside the customer claim.</p><p><strong>Month 9, the claim.</strong> Meridian’s counsel needs a witness who can explain the decision. The engineer who built the bureau integration has left Lumen. The logs from month one have been rotated under the retention policy. What exists is a mix of exports, summaries and recollections. The other side argues that the bank cannot show what the agent actually used, that the postcode may have mattered, and that the human review was a formality. Meridian cannot rebut any of it with evidence anyone will accept as original.</p><p><strong>The outcome.</strong> Even if the decline was perfectly reasonable, the bank is in a weak position, because reasonableness has to be shown and not asserted. It settles, pays more than the loan was worth, and spends months of management time. The regulator opens a wider review of the portfolio. Lumen loses the renewal and spends the next year answering questions from its other customers.</p><p>None of this requires bad faith. It requires only that the evidence was scattered, mutable and held by parties with opposed interests. That is the normal state of affairs in most deployments today.</p><h3>The obvious fixes, and why they fall short</h3><p>Most teams reach for one of four remedies. Each helps a little and each leaves the core problem in place.</p><p><strong>Keep more logs.</strong> Longer retention helps with timing. It does nothing about mutability, fragmentation or the missing link between cause and effect. A larger pile of editable records is still editable.</p><p><strong>Ask the vendor for a signed statement.</strong> An attestation from Lumen that the agent behaved as designed is useful context. It is an assertion by an interested party, not evidence the bank can check, and the other side will treat it as such.</p><p><strong>Rely on contractual audit rights.</strong> The contract may let the bank inspect Lumen’s systems. Inspection after a dispute begins means looking at records the vendor controlled throughout. It also takes weeks, and it does not tell the bank whether the records were changed.</p><p><strong>Add a human to every decision.</strong> More review can reduce risk, and in some jurisdictions the right to human intervention is built in. A reviewer who sees a thin summary and clicks approve adds little. Unless the review itself is recorded with what the person saw, the bank cannot show that oversight was real.</p><p>What these have in common is that they add effort without adding verifiability. The missing ingredient is a record that both parties can check independently and that neither can alter unnoticed.</p><h3>What both sides need</h3><p>Strip the problem down and it asks for five properties.</p><ol><li><strong>A causal record per decision</strong>, from the application to the outcome, including the data used, the rules applied, the versions in force and any human review.</li><li><strong>Written at the time</strong>, not rebuilt later.</li><li><strong>Tamper-evident</strong>, so that any later edit, deletion or reordering is detectable by either party.</li><li><strong>Shared in a way that respects confidentiality</strong>, so each side can verify the record without seeing what it should not.</li><li><strong>Exportable and verifiable by a third party</strong>, such as counsel, an expert, a court or a regulator.</li></ol><p>A hash chain provides the third property, and a causal event model provides the first. The rest is design.</p><h3>How a hash chain solves the trust problem</h3><p>A hash chain works like this. Each recorded event includes a cryptographic fingerprint, a SHA-256 hash, of its own content together with the hash of the event before it. Change one event, and its fingerprint changes. That breaks the link to the next event, and the next, all the way to the end. Delete an event, and the chain no longer joins up. Reorder events, and the same thing happens.</p><p>So anyone who holds the latest hash, the chain head, can later check whether the full history still produces it. If it does, the history is unchanged since that head was recorded. If it does not, something was altered.</p><p>What makes this useful between two distrustful parties is where the head is kept. If the bank and the vendor each hold a copy of the head, or both anchor it with a third party, neither can rewrite history without the other noticing.</p><p>ZizkaDB implements this per agent, with SHA-256 checksums, a chain verification route and export. It is open source and runs self hosted in one Docker container, with a managed Cloud edition at db.zizka.ai.</p><h3>The design for Meridian and Lumen</h3><p><strong>Where it runs.</strong> Meridian runs the ZizkaDB instance, inside its own environment, so the record is in the bank’s custody and the bank can answer a regulator without asking permission. Lumen’s agent writes to it using a write-scoped key. The bank issues the key and can revoke it. Lumen cannot read other records or alter earlier ones.</p><p><strong>What is recorded.</strong> One chain of linked events per application:</p><ul><li>application received, with a reference to the application, not a copy of the whole file</li><li>data retrieved: bureau entry reference, statement digest and the date of each source</li><li>policy and model versions: prompt, policy file and model identifiers</li><li>features and rules applied, in terms the bank defines</li><li>recommendation and the stated factors</li><li>human review where it occurs: reviewer, what was shown, action and time</li><li>notice sent: the reason code and text given to the customer</li></ul><p>python</p><pre>app = await db.log(agent=&quot;lumen-credit&quot;, event=&quot;application_received&quot;,<br>    data={&quot;app&quot;: &quot;LN-20931&quot;, &quot;product&quot;: &quot;personal_loan&quot;, &quot;channel&quot;: &quot;web&quot;})</pre><pre>src = await db.log(agent=&quot;lumen-credit&quot;, event=&quot;data_retrieved&quot;,<br>    data={&quot;bureau_ref&quot;: &quot;B-7712&quot;, &quot;bureau_digest&quot;: &quot;&lt;sha256&gt;&quot;, &quot;as_of&quot;: &quot;2026-03-02&quot;,<br>          &quot;statements_digest&quot;: &quot;&lt;sha256&gt;&quot;},<br>    parent_id=app.id)</pre><pre>cfg = await db.log(agent=&quot;lumen-credit&quot;, event=&quot;versions_in_force&quot;,<br>    data={&quot;prompt&quot;: &quot;v31&quot;, &quot;policy&quot;: &quot;retail-2026-02&quot;, &quot;model&quot;: &quot;provider-model-2026-01&quot;},<br>    parent_id=src.id)</pre><pre>rec = await db.log(agent=&quot;lumen-credit&quot;, event=&quot;recommendation&quot;,<br>    data={&quot;outcome&quot;: &quot;decline&quot;, &quot;factors&quot;: [&quot;bureau delinquency flag&quot;, &quot;debt to income above policy limit&quot;]},<br>    parent_id=cfg.id)</pre><pre>rev = await db.log(agent=&quot;meridian-underwriting&quot;, event=&quot;human_review&quot;,<br>    data={&quot;reviewer&quot;: &quot;u-118&quot;, &quot;shown&quot;: [&quot;factors&quot;, &quot;bureau_summary&quot;], &quot;action&quot;: &quot;upheld&quot;},<br>    parent_id=rec.id)</pre><p><strong>Protecting what must be protected.</strong> Store digests and references for sensitive documents, apply redaction before storage, and keep proprietary prompts as version identifiers and hashes. Lumen can show that a given prompt version was live, and prove later that the prompt it discloses matches the one used, without placing the prompt in the bank’s database. The bank gets a verifiable link, and Lumen keeps its IP.</p><p><strong>Who anchors the head.</strong> On a schedule, record the chain head with both parties. A simple version: the bank emails and stores a signed head in its records system each day, and Lumen stores its own copy. A stronger version adds a neutral third party, such as an escrow or a notary service, that holds the heads. Take advice on which is appropriate.</p><p>python</p><pre>head = await db.verify_chain(agent=&quot;lumen-credit&quot;)<br># store head.hash in two separate systems, one controlled by each party</pre><h3>What happens when the claim arrives</h3><p>Back to Ms Alvarez. Nine months later the bank’s counsel asks for the file.</p><ol><li><strong>Run the lineage.</strong> One why() query from the notice back through the review, the recommendation, the versions and the data sources.</li><li><strong>Check the specific allegations.</strong> The bureau reference shows which entry was used and as of what date. The recorded features show whether postcode was among them. If it was, the bank needs to know now and not at trial.</li><li><strong>Check the human review.</strong> The event shows what the underwriter saw and what they did, and how long they spent.</li><li><strong>Compare the notice to the cause.</strong> Do the factors recorded at decision time match the reason in the notice?</li><li><strong>Verify the chain.</strong> Run chain verification and compare the head with the copies each party stored. A match supports the claim that the record is the one written at the time.</li><li><strong>Scope the pattern.</strong> The impact route lists every decision that used the same bureau entry or policy version, which answers the regulator’s second question.</li><li><strong>Export for counsel and experts.</strong> A defined slice, with the verification result.</li></ol><p>python</p><pre>chain = await db.why(notice.id)<br>affected = await db.impact(src.id)<br>export = await db.export_events(agent=&quot;lumen-credit&quot;, since=&quot;2026-03-01&quot;, until=&quot;2026-03-31&quot;)</pre><p>For the vendor, the same record answers the contract dispute. It shows which version ran, which bank overrides were applied and whether a change on either side preceded the outcome. If a defect is found, the impact route scopes it. If the bank altered a threshold, that too is in the chain, and neither party can later claim otherwise without the chain breaking.</p><h3>What this does and does not prove</h3><p>Be precise, because opposing counsel will be.</p><ul><li><strong>It proves the record has not been altered</strong> since the head was stored. That addresses the authenticity attack.</li><li><strong>It does not prove the record was complete.</strong> If an event was never logged, the chain has no gap to show. Instrumentation has to be designed and tested, and ideally reviewed by someone independent.</li><li><strong>It does not prove the decision was right or lawful.</strong> It supports the explanation. Counsel and the regulator judge sufficiency.</li><li><strong>It does not show why a model produced an output.</strong> Stated factors are the agent’s account. Rely on the recorded inputs and rules, and consider designs where the decisive step is an explicit rule or a human check.</li><li><strong>It does not establish time on its own.</strong> A hash chain shows order. External anchoring of the head, such as the stored copies, supports when the record existed.</li><li><strong>Admissibility is a legal question.</strong> Ask counsel how a record of this kind is treated in your court and by your regulator.</li><li><strong>The open source edition records one agent per install.</strong> Multi-agent or multi-tenant setups, including a vendor serving several banks, use the Cloud edition or separate instances.</li></ul><h3>A four week plan</h3><p>Week 1: agree the event list, what is stored as a digest, retention and who holds which key. Week 2: instrument the vendor and bank events. Week 3: anchor the head in two systems and test an export. Week 4: rehearse with five past declines and someone outside both teams playing the regulator.</p><p>ZizkaDB is an open source causal audit database for AI agents. It records decisions with parent links, answers why(), scopes impact, supports replay, drift baselines and export, and shows whether the stored history has been altered through a SHA-256 hash chain. It runs self hosted in a single Docker container, so a bank can keep the record in its own environment.</p><p>If you are a bank or a vertical AI company selling to banks, pick one lending flow, record it end to end for a month, and run the rehearsal. The first time a regulator asks what really happened, the answer will be one you can verify.</p><p>Corrections: if you represent a party mentioned here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: Court of Justice of the EU, judgment in Case C-203/22 Dun &amp; Bradstreet Austria and press release 22/25; Directive (EU) 2023/2225 and commentary from KPMG, Skadden and Loyens &amp; Loeff; EU AI Act Annex III and Article 26 (AI Act Service Desk, artificialintelligenceact.eu); EBA letter on the AI Act mapping exercise; CFPB Circulars 2022–03 and 2023–03; American Bar Association Business Law Today on adverse action notices and AI; ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=728607ae72f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your OpenClaw Agent Cannot See Its Own Mistakes. Here Is How to Fix That with ZizkaDB]]></title>
            <link>https://medium.com/@MirArshadTalpur/your-openclaw-agent-cannot-see-its-own-mistakes-here-is-how-to-fix-that-with-zizkadb-50115a8812ff?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/50115a8812ff</guid>
            <category><![CDATA[openclaw]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[zizkadb]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Sat, 21 Nov 2026 16:40:47 GMT</pubDate>
            <atom:updated>2026-11-21T16:40:47.181Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ve_chrCULoQlG7Ze7DIgoA.jpeg" /><figcaption>Openclaw agent with zizkadb</figcaption></figure><p>Most OpenClaw setups are built to act. Few are built to learn from what they did. The agent answers messages, calls tools, runs on a schedule, and when something goes wrong a person opens a log file and starts guessing.</p><p>This guide is about the step after installation. If you have not installed the ZizkaDB plugin yet, start with our companion how-to, How to Add ZizkaDB to OpenClaw, which covers installation and configuration. Here we assume the plugin is running and ask a different question: how do you use the record it creates to make the agent, and the people responsible for it, noticeably better?</p><p>We cover seven ways: self-inspection inside a conversation, operator debugging, cost control, drift detection, safe upgrades, guardrails that use the record, and evidence for customers and auditors. Each has a small snippet and a business reason.</p><p>A note on scope. ZizkaDB is an independent project and is not affiliated with or endorsed by OpenClaw. Plugin details come from the ClawHub listing for the ZizkaDB plugin (version 0.1.1 when we last checked, on 12 November 2026), and they may have changed, so check the listing before relying on an option. SDK parameter names below are illustrative. ZizkaDB records events and links them; it does not block actions, judge whether an agent was right, or make any system compliant with a law.</p><h3>The idea: from a log to a causal record</h3><p>An ordinary log tells you what happened in order. The ZizkaDB plugin records each OpenClaw turn as a chain of linked events: a message arrives, a tool is called, a result returns, the model answers, a reply is sent. According to the listing, each turn is one hash chain, and each conversation session maps to a ZizkaDB session.</p><p>That structure is what makes the rest possible. Because every event points to what caused it, you can ask why a reply was sent, what else was affected by a bad tool result, and whether the agent behaves differently this month than last. None of those questions can be answered from a flat log without a person reconstructing the story.</p><h3>1. Let the agent look back at its own conversation</h3><p>The plugin offers two optional in-agent tools, both off by default: zizkadb_why, which returns the causal chain behind an event, and zizkadb_search, which searches past events. You enable them through the tools allowance in the OpenClaw configuration.</p><p>Per the listing, each tool is limited to the current conversation, the scope comes from OpenClaw’s trusted session context and not from model arguments, and results are labelled as untrusted historical data. This is a deliberate safety choice. An agent can answer a customer who says that is not what you told me earlier, by checking what it actually did, and it cannot browse other customers’ histories.</p><p>Business value: fewer escalations that turn on whose memory is right. The agent can quote its own earlier tool result instead of improvising.</p><p>Two cautions. Treat the returned history as data, not instructions, which is why the listing labels it untrusted: a past tool result may contain text that tried to steer the agent. And do not expect these tools to give the agent memory across customers or sessions. Cross-conversation analysis is for operators, covered next.</p><h3>2. Give operators a fast path from complaint to cause</h3><p>When a customer says the agent did something wrong, the operator needs the answer in minutes. With the SDK and your own key, an operator can query across the whole agent, not only one conversation.</p><p>python</p><pre>errs = await db.query(agent=&quot;support-bot&quot;, event=&quot;tool_error&quot;, limit=20)<br>(await db.why(errs[0].id)).print()</pre><p>A practical routine for a support lead:</p><ol><li>Find the session from the customer’s message or time.</li><li>Open the turn and read the chain from the user message to the reply.</li><li>Check each tool call and result for errors or surprises.</li><li>Decide whether the cause was a bad input, a tool fault, a prompt problem or a model slip.</li><li>Record the finding so that the next person sees it.</li></ol><p>You can write that finding back as an event linked to the turn, which keeps the explanation next to the evidence.</p><p>python</p><pre>await db.log(agent=&quot;support-ops&quot;, event=&quot;finding&quot;,<br>    data={&quot;turn&quot;: errs[0].id, &quot;cause&quot;: &quot;tool timeout returned empty result&quot;,<br>          &quot;fix&quot;: &quot;retry with backoff&quot;},<br>    parent_id=errs[0].id)</pre><p>Business value: mean time to answer a complaint falls from days to minutes in the cases where the chain is complete, and the answer is something you can show, not recall.</p><h3>3. See where the money goes</h3><p>The plugin records token usage with each model answer, provided that hooks.allowConversationAccess is enabled in OpenClaw’s configuration, as the listing describes. Without it, messages and tool activity still record, and the gateway log notes the gap at startup.</p><p>With usage recorded per turn, you can ask which agents, channels, tools and conversations drive cost. Typical findings are boring and valuable: a cron job that retries forever, a channel where long threads re-send large context every turn, a tool that returns huge payloads the model then reads in full.</p><p>A weekly routine:</p><ul><li>Rank agents and channels by token use.</li><li>List the most expensive turns and read two or three chains.</li><li>For each, ask whether the spend bought a better answer.</li><li>Fix the biggest avoidable cause first, whether that is trimming a tool result, shortening context or capping retries.</li></ul><p>Business value: cost control based on evidence. We have written elsewhere about a team that turned a huge monthly bill into a manageable one; the method is the same here, and your own numbers will differ.</p><h3>4. Detect drift before customers do</h3><p>Agents change when prompts change, models update, tools evolve or inputs shift. The result is rarely a crash. It is a slow change in behaviour: more tool errors, longer answers, different tool choices.</p><p>ZizkaDB offers baseline comparison of recent behaviour against a reference period. Pick a few signals that fit an OpenClaw agent:</p><p>SignalWhy it mattersTool error rate per toolA rising rate points to a broken integration or a prompt that misuses a toolTools called per turnA jump suggests loops or over-eager behaviourTokens per turnA jump suggests bloated context or a model changeReply lengthA shift may signal a prompt or model changeShare of turns ending in agent_errorA direct reliability measure</p><p>python</p><pre>drift = await db.baseline(agent=&quot;support-bot&quot;, window=&quot;7d&quot;, reference=&quot;30d&quot;)</pre><p>Review a drift report weekly. When something moves, open the turns behind it and look for the change, such as a prompt edit on a particular date. Drift is a prompt to investigate, not proof that something is wrong.</p><p>Business value: you find regressions in days, from your own data, instead of from a customer complaint.</p><h3>5. Upgrade models and prompts without guessing</h3><p>Changing the model or the prompt behind a live agent is the riskiest routine change you make. A safer method uses your own history.</p><ol><li>Pick a sample of past turns that represent your real traffic, including difficult ones and ones where the agent erred.</li><li>Replay the inputs through the new version in a test setup, recorded as a separate agent name such as support-bot-shadow, so it never mixes with production.</li><li>Compare the outputs: tool choices, errors, length and, for important cases, a human read of the answers.</li><li>Review the disagreements by following their chains.</li><li>Roll out to a small share of traffic first and watch the same signals.</li></ol><p>Keep the production and shadow agents distinct, since ZizkaDB keeps a hash chain per agent. If you replay sensitive conversations, apply the same redaction and retention rules as in production.</p><p>Business value: you learn what an upgrade changes before it reaches customers, and you have a record of what you checked.</p><h3>6. Build guardrails from the record</h3><p>The plugin is observe-only. It does not block or alter messages or tool calls, and a failed write does not affect the agent. That is a feature: adding an audit layer cannot break your agent. It also means the plugin does not protect you from a bad action. Protection comes from OpenClaw’s permissions, sandboxing and least privilege, which the record then helps you tune.</p><p>Here is how to use the record to improve those controls.</p><ul><li><strong>Find over-broad permissions.</strong> List which tools the agent actually calls over a month. Tools never used are candidates for removal.</li><li><strong>Find risky patterns.</strong> Query for turns where a tool with side effects, such as sending a message or changing data, followed content from an outside source. Review whether a human should approve those.</li><li><strong>Tag untrusted inputs.</strong> If your agent reads web pages, documents or messages from other agents, make sure those inputs are identifiable in the record, so you can later find every action that depended on them.</li><li><strong>Check approvals.</strong> Where a person approves a risky action, record what they saw and did, so the approval means something.</li></ul><p>python</p><pre>risky = await db.query(agent=&quot;support-bot&quot;, event=&quot;tool_call&quot;,<br>                       where={&quot;tool&quot;: &quot;send_email&quot;}, limit=100)</pre><p>Be clear about the limits. ZizkaDB does not detect prompt injection, and it cannot tell whether content an agent read was malicious. It lets you trace what an agent read before it acted, which is what you need to investigate after the fact and to design stronger controls.</p><h3>7. Produce evidence for customers, auditors and your own board</h3><p>A record that can be queried is also a record that can be shared.</p><p><strong>For customers:</strong> a clear account of what the agent did in a disputed case, drawn from the chain.</p><p><strong>For auditors and security reviewers:</strong> an export of a defined period, plus the result of a chain verification, with the chain head stored outside the database so that the history cannot be quietly rewritten.</p><p>python</p><pre>check = await db.verify_chain(agent=&quot;support-bot&quot;)<br>export = await db.export_events(agent=&quot;support-bot&quot;, since=&quot;2026-11-01&quot;, until=&quot;2026-11-20&quot;)</pre><p><strong>For regulators and counsel:</strong> if your agents fall under rules that require automatic event recording, such as EU AI Act Article 12 for high-risk systems, a linked, tamper-evident record is the kind of evidence those rules point toward. Whether any given system is high-risk depends on what it does, and the application dates have been moving, so take legal advice. ZizkaDB supports record keeping and does not by itself make a system compliant.</p><p>Use read-only, expiring keys when you give outsiders access, and decide what content you store. When config.captureContent is false, the plugin does not store prompts, replies, tool arguments or tool results, but still records tool names, models, token usage and errors. For agents handling personal or regulated data, start with capture off and turn it on only where you have a reason and a lawful basis.</p><h3>A worked example, as a composite</h3><p>This is illustrative and not a real customer. A small online store runs an OpenClaw support agent across chat and email. It answers order questions, looks up shipments with a tool and can issue small refunds under a set limit.</p><p>In week one the team installs the plugin and leaves content capture off. In week two the cost review shows that a handful of long conversations account for much of the token spend, because a shipment tool returns the full order history on every call. They trim the tool result, and spend falls. In week three the drift report shows the share of tool errors on the shipment tool rising. The chains show a courier API returning empty results at certain hours, so the agent tells customers their order cannot be found. The team adds a retry and a clear fallback message. In week four a customer disputes a refund. The operator opens the turn, sees the user message, the order lookup, the refund tool call and the reply, and replies with a precise account within minutes. In week five the team tests a new model by replaying a sample of past turns as a shadow agent, finds that it chooses the refund tool more eagerly, and adjusts the prompt before rollout.</p><p>None of these steps required the agent itself to be smarter. They required the team to see what it was doing.</p><h3>Common mistakes</h3><ul><li><strong>Installing and never looking.</strong> A record nobody reviews is an expense. Schedule a weekly review.</li><li><strong>Using one agent name for everything.</strong> Distinct names keep chains, baselines and permissions clean.</li><li><strong>Storing content by default.</strong> Capture content deliberately, not out of habit.</li><li><strong>Trusting past tool results as instructions.</strong> History is data. Treat it as untrusted.</li><li><strong>Skipping the chain head.</strong> Store it outside the database, or verification proves less.</li><li><strong>Confusing observation with protection.</strong> The plugin watches. Controls come from permissions and sandboxing.</li><li><strong>Forgetting one-shot runs.</strong> Per the listing, local one-shot runs are not recorded, because recording happens in the running gateway.</li></ul><h3>A two week plan</h3><p><strong>Days 1 to 2:</strong> confirm the plugin is recording, give each agent its own name and decide on content capture with your data protection lead.<br> <strong>Days 3 to 4:</strong> enable the in-agent tools on one agent and test the why and search behaviour in a conversation.<br> <strong>Days 5 to 6:</strong> run the first cost review and fix the biggest avoidable cause.<br> <strong>Days 7 to 8:</strong> pick drift signals, take the first baseline and schedule the weekly review.<br> <strong>Days 9 to 10:</strong> review tool permissions against actual use and tighten them.<br> <strong>Days 11 to 12:</strong> run a replay test of one prompt or model change as a shadow agent.<br> <strong>Days 13 to 14:</strong> verify the chain, store the head elsewhere, export a sample period and hand it to someone who did not build the system.</p><h3>Where ZizkaDB fits, and where it stops</h3><p>ZizkaDB is an open source causal audit database for AI agents, with a self hosted edition that runs in a single Docker container and a managed Cloud edition at db.zizka.ai. It records events with parent links, answers why() for any decision, supports session replay, time travel, drift baselines and export, and shows whether stored history has been altered through a hash chain.</p><p>It does not prevent bad actions, detect manipulation, judge correctness or deliver compliance. The open source edition records one agent per install, so fleets and agent to agent tracing use the Cloud edition. The record is only as complete as what the plugin and your own instrumentation capture, and long values are truncated at 8,000 characters according to the listing.</p><h3>Get started</h3><p>Pick one agent. Turn on the in-agent tools, run a cost review and set a weekly drift check. After a month you will know things about your agent that today you can only guess. That is what it means to empower an agent: not to make the model smarter, but to make the system around it able to see, explain and improve what it does.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: ClawHub listing for the ZizkaDB OpenClaw plugin (clawhub.ai/zizka-ai/plugins/zizkadb); OpenClaw documentation, Plugins and Manage plugins (docs.openclaw.ai); ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50115a8812ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Case Study: Agentic Commerce Can Prove the Payment. It Cannot Explain the Purchase]]></title>
            <link>https://medium.com/@MirArshadTalpur/case-study-agentic-commerce-can-prove-the-payment-it-cannot-explain-the-purchase-01e6a8eec23e?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/01e6a8eec23e</guid>
            <category><![CDATA[zizkadb]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[payment-protocol]]></category>
            <category><![CDATA[agentic-commerce]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 11:37:08 GMT</pubDate>
            <atom:updated>2026-11-20T11:45:41.284Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T6DejDhl7GAtQ0kfnhvp7g.jpeg" /><figcaption>agentic commerce with zizkadb</figcaption></figure><h3>The company</h3><p>Call it Harbor, a composite online home goods retailer with a shopping assistant that buys on behalf of customers. A customer types a request, the agent searches several sellers, builds a cart, and for orders under a set amount completes payment using the payment protocol artifacts the industry now offers: a signed intent, a signed cart and a payment authorisation.</p><p>Harbor did the sensible thing. It adopted the protocol, kept the signed artifacts, and passed its security review. Leadership believed the question of proof was handled.</p><h3>The dispute that exposed the gap</h3><p>A customer asked the assistant to reorder a set of two shower curtains for a guest bathroom. A few days later, twelve curtains arrived. The customer disputed the charge.</p><p>Harbor pulled the evidence. The signed intent showed a spend cap the customer had accepted. The signed cart showed twelve units at the listed price, within the cap. The payment authorisation was valid. Everything the protocol promised was in order.</p><p>And none of it answered the three questions the customer, the card issuer and Harbor’s own leadership asked next.</p><ol><li>What did the customer actually ask for, in their words?</li><li>Why did the agent decide on twelve?</li><li>Has this happened to anyone else?</li></ol><p>The protocol artifacts proved what was signed. They did not show how the agent got from a request for two to a cart of twelve. As the research summarised in our how-to on this topic points out, mandates are strong evidence for the facts they sign, and they do not show that the signed cart matched the request.</p><p>Harbor refunded the order. The cost was small. The discomfort was not: nobody could say whether this was a one-off or a pattern, and the team spent most of two weeks reading raw logs to find out.</p><h3>Why the logs did not help</h3><p>Harbor had logs. They were application logs: model calls, tool calls, latency, errors. They were spread across three services, retained for thirty days, and organised by request id, not by purchase.</p><p>To explain the twelve curtains, an engineer had to find the conversation, find the product search, find the listing, find the prompt version in use that day, and join them by timestamp. It took days, and nobody could prove the result had not been tidied up along the way.</p><p>The deeper problem was structure. Logs say what happened in order. They do not say what caused what, so every answer was a reconstruction, not a lookup.</p><h3>What Harbor changed</h3><p>The team decided to treat the purchase as a chain of linked events, with the protocol artifacts attached by reference. They used ZizkaDB as the audit layer, self hosted in a single Docker container at first.</p><p>They kept the change small and shipped it in a week.</p><p><strong>Request.</strong> Record the customer’s words and the structured constraints the agent extracted, so that interpretation errors are visible.</p><p>python</p><pre>req = await db.log(agent=&quot;shopper-agent&quot;, event=&quot;purchase_request&quot;,<br>    data={&quot;text&quot;: &quot;Reorder the two shower curtains for the guest bath&quot;,<br>          &quot;parsed&quot;: {&quot;item&quot;: &quot;shower curtain&quot;, &quot;qty&quot;: 2},<br>          &quot;spend_cap&quot;: 120})</pre><p><strong>Protocol artifacts by reference.</strong> Store the mandate and cart references and their hashes, linked to the request. Never store card numbers or sensitive authentication data.</p><p>python</p><pre>m = await db.log(agent=&quot;shopper-agent&quot;, event=&quot;mandate_issued&quot;,<br>    data={&quot;type&quot;: &quot;intent&quot;, &quot;ref&quot;: &quot;mandate-ref&quot;, &quot;sha256&quot;: &quot;&lt;hash&gt;&quot;},<br>    parent_id=req.id)</pre><p><strong>Options observed, with trust tags.</strong> Every listing the agent read was logged with its source and a digest of the content, and anything from a seller was tagged untrusted.</p><p><strong>Selection with alternatives.</strong> The agent logged what it chose, what it rejected and the reason it reported, along with the model and prompt versions.</p><p><strong>Human approval where it matters.</strong> For first-time sellers and unusual quantities, a person approved, and the event recorded what the approval screen showed.</p><p><strong>Payment and outcome.</strong> Payment references, delivery and any dispute were linked back to the chain.</p><h3>What the next dispute looked like</h3><p>Three weeks later a similar complaint arrived. This time the lead investigator ran one lineage query from the dispute back to the request.</p><p>The story came out in minutes. The customer had said two. The parsed request said two. The listing the agent selected sold curtains in a multipack, and its title said a set of 2 in the headline and twelve per carton in the structured data. The selection event showed the agent had read the structured field. No manipulation, no attack: an ambiguous listing and an agent that trusted one field over another.</p><p>That was the diagnosis. The record also showed something the team had not known to look for.</p><h3>Using the record to find the pattern</h3><p>With events linked, the team could ask questions that had been impractical before.</p><ul><li><strong>How many purchases had a quantity different from the parsed request?</strong> A simple query across the record answered it.</li><li><strong>Which listings were behind them?</strong> The lineage pointed to a small set of multipack listings from two sellers.</li><li><strong>Who was affected?</strong> The impact route listed every selection and payment that descended from those listings, which gave customer support a list to contact.</li></ul><p>In this illustrative scenario, the review found a few dozen orders with a quantity mismatch over a quarter, nearly all from the same two sellers. Before the change the team would not have known there was a pattern at all.</p><h3>The fixes</h3><p>Each fix followed from what the record showed, and none needed a new model.</p><ol><li><strong>Pre-purchase check.</strong> Before payment, compare the cart quantity with the parsed request, and stop if they differ.</li><li><strong>Clarifying question.</strong> When a listing is ambiguous about pack size, ask the customer before buying.</li><li><strong>Corroboration rule.</strong> For first-time sellers, require a second source or a human approval.</li><li><strong>Baseline watch.</strong> Use baseline() to compare weekly basket size and quantity mismatches against a reference period, so a drift shows up in days.</li><li><strong>Replay test.</strong> Before changing the prompt or model, replay a set of past purchases through the new version and compare the selections.</li></ol><h3>Modeled results</h3><p>These figures are illustrative, chosen to show what to measure, not what to expect.</p><p>MeasureBeforeAfter (modeled)Time to explain a disputed purchaseDays of log readingMinutes by lineage queryDisputes with an answer on first reviewFewMostQuantity mismatches reaching paymentUnknownCaught by the pre-purchase checkTime to scope who else was affectedWeeksHours</p><p>The point is not the exact numbers. It is that questions which took days became questions that take minutes, and that questions nobody could answer became answerable.</p><h3>What did not go perfectly</h3><p>A case study without friction would not be believable. Here is what a team in Harbor’s position should expect.</p><ul><li><strong>Instrumentation gaps.</strong> The first version missed the human approval screen contents. Disputes about what the customer saw could not be answered until they were added.</li><li><strong>Stated reasons are not proof.</strong> The agent’s reason for choosing twelve read plausibly, but it was the agent’s own account. The team learned to rely on the linked inputs, the listing and the parsed request, and to treat the reason as supporting colour.</li><li><strong>Privacy work took longer than the code.</strong> Deciding what to redact, how long to retain evidence and how to handle erasure requests involved legal and data protection, and that took more time than the instrumentation.</li><li><strong>The record did not decide liability.</strong> It strengthened Harbor’s position and shortened disputes, but who bears a loss still depends on contracts, network rules and law.</li><li><strong>The open source edition records one agent per install.</strong> When Harbor added a second agent for returns, it moved to the Cloud edition.</li></ul><h3>Lessons you can reuse</h3><ol><li><strong>Protocols prove the signature, a causal trail proves the story.</strong> You need both.</li><li><strong>Record the request in the customer’s words.</strong> Interpretation errors are among the most common disputes.</li><li><strong>Tag what you did not write.</strong> Listings, reviews and seller text are untrusted until proven otherwise.</li><li><strong>Link, do not just log.</strong> Lineage turns reconstruction into lookup.</li><li><strong>Use the record before the dispute.</strong> Pre-purchase checks and baselines prevent the dispute that a trail can only explain.</li><li><strong>Store references, never credentials.</strong> Keep payment data out of your audit layer.</li><li><strong>Hold the chain head elsewhere.</strong> A record that the same team can edit proves less.</li></ol><h3>Replicate it in a week</h3><p><strong>Day 1:</strong> define the purchase events and agree with legal and payments what must never be stored.<br> <strong>Day 2:</strong> record requests, protocol artifact references and observed options with trust tags.<br> <strong>Day 3:</strong> record selections with alternatives, and approvals with what was shown.<br> <strong>Day 4:</strong> record payments and outcomes, and link disputes to payments.<br> <strong>Day 5:</strong> add the pre-purchase quantity and cap check and a first baseline.<br> <strong>Day 6:</strong> build the dispute pack and verify the chain, storing the head outside the database.<br> <strong>Day 7:</strong> replay a past dispute with someone who did not build the system, and time it.</p><h3>Where ZizkaDB fits, and where it stops</h3><p>ZizkaDB is an open source causal audit database for AI agents. It records events with parent links, answers why() for any decision, lists downstream effects through the impact route, supports session replay and drift baselines, and shows whether the recorded history has been altered through a hash chain whose head you store outside the database. It runs self hosted in one Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.</p><p>It does not replace the payment protocol, does not create network-recognised signatures, cannot tell you whether an agent was manipulated, and does not decide liability. It gives you the part the protocols leave open: an account of how the agent got from the request to the cart, that you can check.</p><p>If you run purchasing agents, start with one workflow and one mock dispute. If you can reconstruct the story in ten minutes, you are ahead of most. If you cannot, you have found the gap before a customer did.</p><p>Corrections: if you represent a party mentioned here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: the companion how-to, Payment Protocols Prove What Your AI Agent Signed, Not Why It Bought, and the sources listed there (Chargeflow, Worldpay, Swell, PYMNTS Intelligence via Yahoo Finance, arXiv 2610.17378, IETF draft-milan-agent-decision-commitment-00); ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01e6a8eec23e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Run an AI Agent Incident Response with ZizkaDB: A Runbook for the First 72 Hours]]></title>
            <link>https://medium.com/@MirArshadTalpur/how-to-run-an-ai-agent-incident-response-with-zizkadb-a-runbook-for-the-first-72-hours-d58ed5fd693f?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d58ed5fd693f</guid>
            <category><![CDATA[ai-agents-review]]></category>
            <category><![CDATA[zizkadb]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 11:34:19 GMT</pubDate>
            <atom:updated>2026-11-19T11:34:19.275Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6bt4pRKljlm39Qd5_GBcEw.jpeg" /><figcaption>test zizkadb in 72 hours</figcaption></figure><p>An AI agent sends the wrong message to a customer. Or it calls a tool it should not have. Or a component it depends on turns out to be compromised. Someone notices, a channel fills with messages, and a clock you cannot see starts to run.</p><p>For many teams, the first hours of an agent incident are improvised. People ask the same questions in different threads: what did the agent read, what did it do, who else is affected, what do we tell the customer, do we have to tell a regulator. Without a record that can answer those questions, the answers come slowly and with doubt.</p><p>This guide is a runbook for the first 72 hours of an AI agent incident, built around a record that lets you answer fast. It covers what to prepare before an incident, then what to do in hours 0 to 1, 1 to 8, 8 to 24 and 24 to 72, then the longer tail. The audit layer in the examples is ZizkaDB, an open source causal audit database for AI agents, but the runbook works with any tool that gives you causally linked, tamper-evident records.</p><p>A note on scope. This is operational guidance, not legal advice. Whether any reporting duty applies to you, and how deadlines are counted, depends on your product, your role and your jurisdiction, so involve counsel early. ZizkaDB supports record keeping and investigation and does not by itself make any system compliant with any law. Code parameter names are illustrative and should be checked against the SDK reference.</p><h3>Why the clocks matter</h3><p>Several regimes now put time limits on incident reporting. You may be subject to none, one or several, so the point here is awareness, not a legal checklist.</p><p><strong>EU Cyber Resilience Act.</strong> Reporting obligations under Article 14 began to apply on 11 September 2026 to manufacturers of in-scope products with digital elements. According to the European Commission and ENISA, an early warning is due within 24 hours of becoming aware of an actively exploited vulnerability or a severe incident, a fuller notification within 72 hours, and a final report no later than 14 days after a corrective measure is available for an exploited vulnerability, or within one month for a severe incident. Law firm commentary stresses that the clock runs from awareness, not from the moment the issue is fully analysed. Whether your agent product is in scope is a question for counsel.</p><p><strong>EU AI Act, Article 73.</strong> For providers of high-risk AI systems, serious incidents must be reported to market surveillance authorities immediately after a causal link, or the reasonable likelihood of one, is established, and in any event not later than 15 days after awareness. Summaries commonly state a 10 day limit where a death is involved and 2 days for widespread infringements or critical infrastructure disruption. The Digital Omnibus on AI moved the application date for stand-alone high-risk obligations to 2 December 2027, and summaries note the Commission’s serious incident guidance was still a draft when they were written. Commentators warn that 15 days is a short runway if the first conversation about whether this is our incident does not happen until a week in, and that the way days are counted is a point on which summaries differ.</p><p><strong>GDPR.</strong> Where an incident involves a personal data breach, the notification window to the supervisory authority is generally 72 hours from awareness, subject to the conditions in the regulation.</p><p>The practical lesson is the same across all three. The speed of your response depends on how quickly you can establish what happened, who is affected and how bad it is. That is a question about your record.</p><h3>Phase 0: prepare before anything goes wrong</h3><p>A runbook is only as good as the record behind it. Before an incident, make sure of the following.</p><p><strong>1. The record has what you will need.</strong> For each agent action, the record should contain the input received, the context retrieved, the model and prompt versions, the tool called with its version, the decision made, the human review if any, the customer or tenant, and the output delivered. Each event links to the event that caused it.</p><p><strong>2. External inputs are tagged.</strong> Anything from a source you do not control, such as a web page, a partner feed, another agent or a user upload, carries a trust tag. It makes later questions easy: which decisions depended on untrusted input.</p><p><strong>3. Tools and components are versioned in the record.</strong> If an MCP server, plugin or package is later found to be compromised, you need to know which agent actions called which version.</p><p><strong>4. The chain head is stored outside the database.</strong> ZizkaDB computes a SHA-256 checksum for each event and chains events per agent, so edits to history are detectable. Store the chain head in a system administrators cannot edit, and verify on a schedule. Without that, an investigator, a customer or a regulator has less reason to trust the record.</p><p><strong>5. Read-only evidence access is ready.</strong> Have a process to grant an auditor or customer a read-only, expiring key.</p><p><strong>6. Roles and a severity scale exist.</strong> Name an incident commander, a scribe, a communications lead and a legal contact. Agree what counts as low, medium and high severity, and who can declare an incident.</p><p><strong>7. You have timed a drill.</strong> Pick a past case and measure how long it takes someone who did not work on it to answer four questions from the record alone: what did the agent read, what did it decide, who reviewed it, and which other cases are affected.</p><h3>Phase 1: hour 0 to 1, declare, contain and freeze evidence</h3><p>The first hour has three jobs. Do them in this order.</p><h3>Declare the incident and start the log</h3><p>Create an incident event and keep a running timeline as events linked to it. A recorded timeline matters later, because the time you became aware may be a regulatory question.</p><p>python</p><pre>inc = await db.log(agent=&quot;incident-response&quot;, event=&quot;incident_declared&quot;,<br>    data={&quot;id&quot;: &quot;INC-2026-114&quot;, &quot;reported_by&quot;: &quot;support-lead&quot;,<br>          &quot;first_signal&quot;: &quot;customer complaint about refund email&quot;,<br>          &quot;aware_at&quot;: &quot;2026-11-19T09:42:00Z&quot;, &quot;severity&quot;: &quot;high&quot;})</pre><p>Record who noticed what and when. The moment of awareness may be disputed, so write down how you determined it.</p><h3>Contain</h3><p>Stop the damage first. Typical containment actions are pausing the agent, disabling a tool, revoking a credential, switching to a safe fallback or moving the workflow to human handling. Log each action as an event linked to the incident, with who did it and why.</p><p>python</p><pre>await db.log(agent=&quot;incident-response&quot;, event=&quot;containment_action&quot;,<br>    data={&quot;action&quot;: &quot;disable_tool&quot;, &quot;tool&quot;: &quot;issue_refund&quot;, &quot;by&quot;: &quot;ops-lead&quot;},<br>    parent_id=inc.id)</pre><p>Containment decisions made under pressure are the ones people later question. The log lets you show the reasoning.</p><h3>Freeze the evidence</h3><p>Before anyone investigates, preserve the record as it stands. Export the relevant events, verify the chain, and note the chain head.</p><p>python</p><pre>check = await db.verify_chain(agent=&quot;support-agent&quot;)<br>export = await db.export_events(agent=&quot;support-agent&quot;,<br>    since=&quot;2026-11-12&quot;, until=&quot;2026-11-19&quot;)</pre><pre>await db.log(agent=&quot;incident-response&quot;, event=&quot;evidence_frozen&quot;,<br>    data={&quot;chain_ok&quot;: check.ok, &quot;chain_head&quot;: check.head,<br>          &quot;events_exported&quot;: len(export), &quot;by&quot;: &quot;scribe&quot;},<br>    parent_id=inc.id)</pre><p>Store the export and the chain head somewhere separate. Do not alter, delete or rewrite anything in the affected period. Avoiding changes to evidence is part of any later investigation, and it protects you from the suspicion that you edited history.</p><h3>Phase 2: hours 1 to 8, reconstruct what happened</h3><p>This is where causal lineage pays for itself. You are answering four questions, in order.</p><h3>Question 1: what did the agent do, and why?</h3><p>Start from the bad outcome and walk backwards. If the problem is a wrong email, find the event for the email and run lineage on it.</p><p>python</p><pre>(await db.why(bad_email.id)).print()</pre><p>Read the chain from the output back through the decision, the retrieved context and the original request. Note the model and prompt versions on the decision, and any human review in between. Often this alone reveals the cause: an outdated document retrieved, a misread input, a tool that returned something unexpected.</p><h3>Question 2: where did the bad input come from?</h3><p>If the chain leads to an external input, look at its trust tag, source and author. If it leads to a tool, look at the tool and version. If it leads to a memory write, find the event that wrote it and the input behind that. Keep going until you reach the first event that does not depend on another.</p><h3>Question 3: who else is affected?</h3><p>This is the question that decides your severity, your customer communications and your reporting duties. Use the impact route from the root cause event to list every downstream event that depended on it.</p><p>python</p><pre>affected = await db.impact(root_cause.id)<br>by_customer = group_by(affected, key=&quot;customer&quot;)</pre><p>The route is also available over HTTP at GET /v1/events/{event_id}/impact. Turn the result into a table: affected cases, customers or tenants, what each received, whether a human reviewed it, and whether personal data was involved. This list is the most valuable artifact of the first eight hours.</p><h3>Question 4: is it still happening?</h3><p>Check recent events for the same pattern. If a poisoned document is still in retrieval, or a compromised tool version is still deployed, containment is incomplete. If it is a memory problem, write a corrected memory that supersedes the bad one, so the agent stops retrieving it while the history stays intact for the investigation.</p><h3>Replay the session when the chain is not enough</h3><p>For complicated cases, replay the full session in order: every read, decision and tool call with timestamps. Look for things the lineage alone does not show, such as a retry loop, an unusual sequence or a long gap.</p><p>Throughout this phase, the scribe records findings as events linked to the incident. Include dead ends, because they matter when someone later asks why you ruled something out.</p><h3>Phase 3: hours 8 to 24, assess, classify and decide on reporting</h3><p>By now you should know what happened and roughly how many were affected. The next job is to decide what it means.</p><p><strong>Establish the causal link.</strong> Several regimes turn on whether the incident was caused by, or reasonably likely to be caused by, the system. The lineage is your evidence. Write down the causal chain in plain language.</p><p><strong>Assess severity and impact.</strong> Use the affected-cases table. Consider harm to people, data involved, financial impact, effect on critical services, and whether the problem is ongoing.</p><p><strong>Check data protection.</strong> If personal data was exposed, altered or lost, bring in your data protection lead. The affected-cases table shows which individuals and what data.</p><p><strong>Classify and decide with counsel.</strong> Whether a reporting duty applies, to whom, and by when, is a legal judgment. Give counsel the incident timeline, the causal chain and the impact list. Record the classification decision and its rationale as an event, including any dissenting views, so that the reasoning is documented.</p><p>python</p><pre>await db.log(agent=&quot;incident-response&quot;, event=&quot;classification&quot;,<br>    data={&quot;severity&quot;: &quot;high&quot;, &quot;causal_link&quot;: &quot;established&quot;,<br>          &quot;personal_data&quot;: True, &quot;reportable&quot;: &quot;under review with counsel&quot;,<br>          &quot;affected_cases&quot;: 37, &quot;decided_by&quot;: &quot;incident-commander&quot;},<br>    parent_id=inc.id)</pre><p><strong>Prepare an early notification if one is needed.</strong> A first report can be short. It generally says what you know, what you do not yet know, and what you have done. Do not wait for a complete analysis if a deadline requires an early warning, and say clearly what remains under investigation. Initial incomplete reports followed by fuller ones are a feature of several regimes, so check what applies to you.</p><h3>Phase 4: hours 24 to 72, notify, communicate and remediate</h3><h3>Notify</h3><p>If counsel confirms that a report is due, build it from the record. The record can supply the product and version details, the timeline, the causal chain, the affected population, the containment actions and the data involved. Review it for accuracy before sending, because a report built from a verified record is easier to defend than one built from memory.</p><h3>Tell customers precisely</h3><p>Customers want to know whether they are affected, what happened to them and what you are doing. The affected-cases table lets you tell each customer exactly what applies to them, instead of a vague notice to everyone. Precision builds trust. For customers who want to verify, offer a read-only, expiring evidence key scoped to their own record.</p><h3>Fix and verify the fix</h3><p>Remediate the cause: correct the retrieval rule, replace the compromised tool version, update the prompt, supersede the bad memory, or add a guard. Then test the fix before you restore full service. Replay the affected cases and a sample of normal ones against the fixed configuration in shadow mode, and compare. That is the same method used for safe model and prompt upgrades. Log the fix and the verification as events linked to the incident.</p><h3>Restore carefully</h3><p>Return service in stages, starting with a small share of traffic and watching the signals that mattered in the incident. Set rollback criteria in advance.</p><h3>Phase 5: day 3 and beyond, final report and learning</h3><p><strong>Final report.</strong> Where a final report is required, the deadlines vary by regime and by the type of event, so confirm with counsel. The record helps again: root cause, timeline, impact, corrective measures and what you are changing to prevent recurrence.</p><p><strong>Post-incident review.</strong> Hold a blameless review within a week or two. Use the recorded timeline to see where time was lost. Ask what the record could not answer that it should have, and fix the instrumentation. Add the missing fields, the missing trust tags or the missing versions.</p><p><strong>Update your controls.</strong> Adjust baselines so that drift checks cover the signal that would have caught this earlier. Update the runbook, the severity scale and the drill.</p><p><strong>Keep the evidence.</strong> Retain the incident record, the export and the chain verification results according to your retention policy and legal advice, with the chain head stored independently.</p><h3>Two illustrative scenarios</h3><p>These scenarios are composites, not real customers.</p><h3>Scenario 1: a stale document drives wrong refunds</h3><p>A retail support agent starts approving refunds that policy does not allow. A customer complains, and the support lead declares an incident. Containment is quick: the refund tool is disabled. Lineage on one of the wrong approvals shows that the agent retrieved an outdated policy document, because a newer version had not been indexed. The impact route lists 37 refunds that descended from that retrieval. Only some were reviewed by a human, and the review events show reviewers spent seconds on them. The team contacts each affected customer with specifics, corrects the index, supersedes the stale memory, replays the 37 cases against the corrected setup and restores the tool in stages. The review also leads to a change in how reviewers are shown the policy version. Because the record could answer the four questions within hours, the team had a clear picture before any reporting deadline became a concern.</p><h3>Scenario 2: a compromised tool version</h3><p>An operations agent calls an external tool through an MCP server. A public advisory reports that one version of that server was compromised. The security lead declares an incident. Because the record logs the tool and version on every call, a query lists every action that used the affected version, the targets, the time window and the decisions behind them. The team revokes credentials the tool could access, rolls back to a safe version and reviews each affected action. Without version logging, they would have had to assume every call was affected. With it, they can say precisely which were, which is the difference between a broad panic and a bounded incident.</p><h3>Common mistakes</h3><ul><li><strong>Investigating before freezing evidence.</strong> Preserve the record first and note the chain head.</li><li><strong>No record of awareness.</strong> The time you became aware may be a legal question. Write it down and how you determined it.</li><li><strong>Skipping containment because the cause is unclear.</strong> Contain first, understand second.</li><li><strong>Vague customer messages.</strong> Use the affected-cases table to be specific.</li><li><strong>Letting the record be edited.</strong> If the chain head is stored in the same place as the chain, the integrity claim is weak.</li><li><strong>Treating the legal question as an afterthought.</strong> Involve counsel in the first hours, not the last.</li><li><strong>Not logging versions.</strong> Without model, prompt and tool versions you cannot scope the problem.</li><li><strong>Overclaiming in the report.</strong> Say what you know, what you do not know and what you are doing.</li></ul><h3>A drill you can run this week</h3><ol><li>Pick a past case and a colleague who did not work on it.</li><li>Give them only access to the record and start a clock.</li><li>Ask them to declare a mock incident, freeze evidence, run the lineage, list the affected cases and draft a one page summary.</li><li>Note how long each step took and where the record failed to answer.</li><li>Fix the gaps, such as missing trust tags or versions, and repeat in a month.</li></ol><p>A team that can complete this drill in an afternoon is far better placed than one meeting the problem for the first time during a real incident.</p><h3>Limits to remember</h3><p>ZizkaDB records, links, measures and shows that the record is unchanged. It does not detect incidents, contain them, decide whether you must report, or write your regulatory filings. The record can be incomplete if instrumentation had gaps, and lineage shows what the agent saw and did, not necessarily why a model reasoned as it did. The open source edition records one agent per install, so multi-agent and multi-tenant investigations use the Cloud edition for fleets and agent to agent recording. Confirm the specific features you rely on, such as verify_chain, export, the impact route and read-only keys, against the current documentation, and take legal advice on your reporting duties.</p><h3>Get started</h3><p>Pick one agent. Make sure the record includes inputs, versions, trust tags and human reviews, store the chain head outside the database, and run the drill above. You will find the gaps in an afternoon, which is far better than finding them at 3 a.m. with a clock running.</p><p>ZizkaDB runs self hosted in a single Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: European Commission, Cyber Resilience Act reporting obligations; ENISA CRA Single Reporting Platform factsheet (July 2026); Cloud Security Alliance research note on CRA Article 14 (October 2026); law firm commentary from CMS, Pennington and Addleshaw Goddard on CRA reporting; European Commission AI Act Service Desk, Article 73; practitioner summaries of Article 73 timelines, including CIO.com and a developer playbook; legal summaries of the Digital Omnibus on AI; ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d58ed5fd693f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Open Source Still Wins Trust in the AI Era, Even as Attacks Go Automated]]></title>
            <link>https://medium.com/@MirArshadTalpur/why-open-source-still-wins-trust-in-the-ai-era-even-as-attacks-go-automated-e4fc4d9d4263?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4fc4d9d4263</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[zizkadb]]></category>
            <category><![CDATA[ai-security]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 13:32:08 GMT</pubDate>
            <atom:updated>2026-11-18T13:32:08.785Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h1zy_Z2_5kpzrAfJHF0Fig.jpeg" /><figcaption>opensource trust with zizkadb</figcaption></figure><p>There is a tempting argument going around. Attackers now use AI to find and exploit weaknesses at machine speed, public code is easy to study, so the safe move is to close the code and hide behind the door.</p><p>We think that argument is wrong, and this article explains why. Our view is simple: in the AI era, the vendors who keep their code open and back it with verifiable evidence will win more trust than the vendors who ask buyers to take their word. Automated attacks are real, and the recent evidence is sobering. But the evidence points at weak pipelines, overloaded maintainers and unverified dependencies, not at openness itself. The answer to those problems is more verification, not less visibility.</p><p>This is an advocacy piece, and we say so. We build ZizkaDB, an open source causal audit database for AI agents, and we chose open source deliberately. We will make the case for it with recent facts, give the strongest counterpoint fairly, and finish with what it means for ZizkaDB.</p><p>A note on sources. The facts below come from public reports, security research notes, legal commentary and surveys published in 2026. Some are from vendors or blogs with commercial interests, and we flag that where it matters. Figures differ between sources, so we attribute them or give approximate values. Nothing here is legal advice.</p><h3>The threat is real, and we should look at it squarely</h3><p><strong>Supply chain attacks now propagate by themselves.</strong> A Cloud Security Alliance research note describes a self-propagating npm worm, dubbed Mini Shai-Hulud, attributed to a group called TeamPCP. According to the note, a wave on 11 May 2026 published hundreds of malicious package versions across well over a hundred npm packages, plus two on PyPI, in under six hours, and reached AI developer ecosystems including TanStack, Mistral AI, UiPath, OpenSearch and Guardrails AI. Two versions of the note give slightly different counts, such as 404 malicious versions across 172 npm packages in one and 373 versions across 169 packages in another, so treat the exact numbers as approximate.</p><p>The note reports that the worm produced packages carrying valid SLSA Build Level 3 provenance attestations, by hijacking the legitimate release pipeline instead of stealing credentials and publishing from outside. A control many teams rely on said the package was fine. A separate vendor analysis reports that the worm’s source was published on 12 May and that derivative campaigns followed within weeks.</p><p><strong>Discovery is being industrialised, and maintainers feel it first.</strong> Help Net Security reported in May 2026 that AI-powered industrialisation of vulnerability discovery is a much bigger problem for open source projects than for big organisations, because open source relies on volunteer maintainers with limited time. Secondary accounts report that curl ended its paid bug bounty on 31 January 2026, that its confirmed-vulnerability rate fell from roughly 15 percent to under 5 percent as low-quality AI-generated reports flooded in, and that it paused vulnerability reports from 1 July to 3 August. Other reports say the Internet Bug Bounty paused new submissions in March, and that Linus Torvalds said in May that the kernel’s security list had become almost entirely unmanageable because of duplicate AI-generated reports. Several of these come from blogs summarising primary statements, so check the projects’ own announcements before quoting them.</p><p>These are not small problems. They are the honest cost side of open source in 2026, and the rest of this article does not wave them away.</p><h3>Why the threat does not undercut the case for open source</h3><p><strong>First, closing the code does not remove the exposure.</strong> Black Duck’s 2026 Open Source Security and Risk Analysis, covering 947 audited codebases, found that 97 percent of commercial codebases contain open source components, according to a commentary on the report, and that open source vulnerabilities per codebase doubled to 581. A closed product built on open components inherits every one of those risks. The worm above hit packages that closed and open products alike depend on. Keeping your own code private does not protect you from a poisoned dependency. It only prevents your customers from seeing what you depend on.</p><p><strong>Second, the attacks target pipelines and people, not openness.</strong> The worm’s novelty was hijacking a legitimate release pipeline. The curl story is about maintainer time. Neither is a flaw that disappears when the repository is made private. A closed vendor with a weak build pipeline and a small security team has the same problem, plus no outside reviewers to notice. The principle that security should not rest on secrecy is old and widely held. We offer it as an argument, not as data, but the recent evidence is consistent with it.</p><p><strong>Third, open code lets buyers verify things that closed vendors can only assert.</strong> With open source, a buyer can read the code, build it, check what is running against what was published, self host it, and keep the data inside their own environment. When an attack like the worm hits, an open project can be inspected, its dependencies listed and its fix reviewed in public. With a closed product, the buyer waits for a statement.</p><p><strong>Fourth, buyers are already telling us what they value.</strong> A Linux Foundation survey of 316 AI professionals found that 94 percent of organisations use generative AI, that about 41 percent of their AI code infrastructure is open source on average, and that 52 percent prioritise transparency and source code access when choosing AI solutions. A Red Hat survey of UK organisations on AI sovereignty found that four in five said open source offers greater control over how AI is built and where it runs, and 87 percent named transparency and easier auditability as the most valuable benefit for building trust in AI. These are survey results with their own sponsors and sample limits, but they point the same way.</p><p><strong>Fifth, trust is the commercial advantage.</strong> The Linux Foundation’s State of Commercial Open Source 2026 report, based on a survey of 225 founders and enterprise leaders, identifies community trust as the top competitive advantage for commercial open source companies, and enterprise sales capability as the main scaling bottleneck. The model works: win trust in the open, then serve enterprises that need it.</p><p><strong>Sixth, regulation rewards traceable components.</strong> The EU Cyber Resilience Act’s reporting obligations for manufacturers have applied since 11 September 2026, covering actively exploited vulnerabilities and severe incidents, including for products already on the market. Non-commercial open source is outside the Act, but commercial use of open source is not, so vendors must know what is inside their products. Open source stewards, who systematically support open source intended for commercial use, have lighter obligations from 11 December 2027. Buyers will ask vendors how components are tracked, and open projects with public dependency lists are better placed to answer.</p><h3>The fair counterpoint</h3><p>A fair reading also has to include the arguments on the other side. Critics say that open code is only as safe as the attention it gets, and in 2026 that attention is scarce. Most projects have very few maintainers, and the curl and kernel stories show them under strain. Visibility is not verification: anyone can read the code, but few buyers do, and the worm showed that even strong provenance controls can be subverted. Some security teams will also argue that for the highest assurance needs, a closed system under a vendor’s contractual liability is simpler to govern.</p><p>These points deserve a serious response, and ours is this. If visibility alone is not enough, the answer is to add verification and to fund the work, not to close the door. Which leads to what open source vendors owe their buyers.</p><h3>What open source vendors must do to earn the trust</h3><p>Being open is the start, not the finish. Five commitments turn openness into trust.</p><ol><li><strong>Maintain a visible security process.</strong> A published policy, a way to report vulnerabilities, and a record of how fast fixes ship.</li><li><strong>Harden the release pipeline.</strong> Treat the pipeline as part of the attack surface, since provenance alone can be subverted.</li><li><strong>Track dependencies and publish what is inside.</strong> Keep an inventory, update promptly and be ready to say which versions are affected when a component is compromised.</li><li><strong>Support self hosting and verification.</strong> Let customers build and check what runs against what was published, and keep their data in their own environment.</li><li><strong>Give customers evidence they control.</strong> When something goes wrong, they should be able to reconstruct what happened from records they own, without waiting for the vendor.</li></ol><p>Commercial open source companies also have a duty that individual hobby projects cannot meet: fund the maintenance. If a company profits from open code, it should pay for the security work that sustains it.</p><h3>Where ZizkaDB fits</h3><p>We chose open source for ZizkaDB for the reasons above, and we think a database whose job is to provide audit evidence should itself be open to audit.</p><p><strong>Open code, inspectable by buyers.</strong> The ZizkaDB core is licensed AGPL-3.0 and the MCP server is MIT licensed. Teams can read the code, self host it in a single Docker container, and keep the audit record inside their own environment, which matters for sovereignty and data residency.</p><p><strong>Verification, not just visibility.</strong> ZizkaDB records each agent step as an event, links it to the event that caused it, and protects the record with SHA-256 checksums and a per-agent hash chain, so edits to history are detectable. If you store the chain head outside the database, you can check on your own schedule that nobody rewrote the record. That is the fifth commitment above: evidence you control.</p><p><strong>Evidence for when prevention fails.</strong> The threat evidence says compromises will happen. When one does, the useful questions are what ran, what it read and what it affected. If you log the tools, packages and MCP servers your agents call, with versions, and link decisions to the inputs behind them, the lineage and the impact route help scope which agent actions depended on a component later found to be bad. An illustrative record, with parameter names to be checked against the SDK reference:</p><p>python</p><pre>call = await db.log(agent=&quot;ops-agent&quot;, event=&quot;tool_call&quot;,<br>    data={&quot;tool&quot;: &quot;mcp-server-x&quot;, &quot;version&quot;: &quot;1.4.2&quot;, &quot;target&quot;: &quot;ticket-881&quot;},<br>    parent_id=decision.id)</pre><p><strong>A model that funds the work.</strong> Open source projects need sustainable funding. ZizkaDB offers a managed Cloud edition at db.zizka.ai for teams that want fleets, multi-agent and agent to agent recording, and that is how we aim to keep the open core maintained.</p><p><strong>Our own posture, stated carefully.</strong> The ZizkaDB MCP server is listed on AddonAudit, which reports passing automated checks and a metadata score of 100 for public metadata. That page describes itself as an automated smoke test and not a security guarantee, and we say the same. We encourage buyers to run their own review of the code. That is the point of keeping it open.</p><p><strong>Limits.</strong> ZizkaDB records, links and shows that the record is unchanged. It does not prevent supply chain attacks, detect malicious packages, or judge whether an output is correct, and it does not replace dependency scanning, signing, sandboxing or least privilege. The open source edition records one agent per install, and fleets and agent to agent recording use the Cloud edition. ZizkaDB supports record keeping and investigation and does not by itself make any system compliant with the EU AI Act, the Cyber Resilience Act or any other law. Confirm the specific features you rely on against the current documentation.</p><h3>The takeaway</h3><p>Automation has made attacks on shared code cheaper, and it has made buyers more demanding about what they run. Closing the code answers the first by weakening the second. We think the better answer is to keep the code open, harden the process, fund the maintainers and give buyers evidence they can check for themselves. Openness earns the first meeting. Verifiable evidence closes the deal.</p><p>If you run AI agents, start small. Pick one agent, log its tool calls with versions and the events that caused them, and verify the chain on a schedule. ZizkaDB runs self hosted in a single Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: Cloud Security Alliance research notes on Mini Shai-Hulud (May 2026); TuxCare analysis of 2026 supply chain attacks; Help Net Security, AI is drowning software maintainers in junk security reports (May 2026); Pinggy, curl’s Summer of Bliss (July 2026); Falcao, AI bug reports and open source (May 2026); Resilient Cyber, Vulnpocalypse (2026 Black Duck OSSRA commentary); Linux Foundation survey of AI professionals, via CO/AI; Linux Foundation and Serena, The State of Commercial Open Source 2026; Red Hat UK AI sovereignty survey, via IT Brief UK; legal commentary on the EU Cyber Resilience Act reporting obligations from Goodwin, Travers Smith, Matheson and HLC (September 2026); ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4fc4d9d4263" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Upgrade Your LLM Without Breaking Production: A Replay Testing Guide with ZizkaDB]]></title>
            <link>https://medium.com/@MirArshadTalpur/how-to-upgrade-your-llm-without-breaking-production-a-replay-testing-guide-with-zizkadb-79a0093b6e33?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/79a0093b6e33</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[zizkadb]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 09:00:06 GMT</pubDate>
            <atom:updated>2026-11-17T09:00:06.634Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jnULjmj_tAPFubG4tLwCjA.jpeg" /><figcaption>LLM Upgrade with Zizkadb</figcaption></figure><p>Sooner or later every team running AI agents in production faces the same decision. The model provider is retiring the version you use. A cheaper model has appeared that might do the job. Latency is too high, or a customer wants their data processed in a different region. Someone edits the prompt to fix one complaint. In each case the question is identical: will the agent still behave the way our customers rely on?</p><p>Most teams answer it with a handful of manual tests and a hopeful release. Then, a week later, approval rates shift, reviewers start correcting a new kind of mistake, and nobody can say whether the change came from the upgrade or from something else.</p><p>This guide shows a better way, using something you already have if you record your agents properly: a history of real cases. You will turn recorded production history into a replay test, run a candidate model or prompt in shadow mode against it, compare the results with evidence, release in stages, and keep a sign-off record that you can show a customer or auditor. The audit layer in the examples is ZizkaDB, an open source causal audit database for AI agents, but the method applies wherever you have causally linked history.</p><p>A note on scope. ZizkaDB is not an evaluation framework and does not judge whether an answer is good. It records and links what happened, so you can build a trustworthy test set and compare runs. Code parameter names are illustrative and should be checked against the SDK reference. Nothing here is legal advice, and ZizkaDB does not by itself make any system compliant with the EU AI Act or any other law.</p><h3>Why upgrades are riskier than they look</h3><p>Agents built on language models are probabilistic. Two versions of a model can both be good and still behave differently on the cases your customers care about. A new version may be more verbose, more cautious, quicker to call a tool, or slightly different in how it follows your formatting rules. None of this throws an error. It shows up as agent drift: a slow shift in outcomes that no alert catches.</p><p>Three business realities make this a real problem for vertical AI companies and any enterprise running agents.</p><p><strong>Forced upgrades are routine.</strong> Model versions are retired on the provider’s schedule, not yours. If your only test is a few examples someone remembers, you are gambling on a deadline.</p><p><strong>Cost pressure invites change.</strong> A cheaper or faster model can cut your bill sharply, and the temptation to switch is strong. Without a way to show that quality held, you cannot make the switch with confidence, and you cannot justify it to a customer who asks.</p><p><strong>Customers care about change.</strong> Enterprise buyers ask how you manage changes to the AI in your product, and they notice when behaviour changes without notice. A documented, evidence-based change process is part of what they buy.</p><p>The common failure is not a dramatic outage. It is a quiet degradation on a slice of cases, found by a customer instead of by you.</p><h3>The idea: replay real cases against the candidate</h3><p>The core idea is simple. If you have recorded real cases, with their inputs, retrieved context and outcomes, you can run the same inputs through a candidate configuration and compare. You are not guessing what customers send, because you have what they sent.</p><p>For this to work, your record needs a few things:</p><ul><li><strong>The inputs</strong> the agent received, with sensitive values redacted where appropriate.</li><li><strong>The context</strong> it retrieved, so the candidate can be given the same material.</li><li><strong>The output and decision</strong> of the production version.</li><li><strong>The versions</strong>: model, prompt and tool configuration on each call.</li><li><strong>The human outcome</strong>: whether a reviewer accepted, edited or rejected the result, and what they changed.</li><li><strong>The customer and task type</strong>, so you can sample fairly.</li></ul><p>If you log events with causal links, as described in our other guides, you already have this. If not, start there: add model and prompt versions and human review events to your instrumentation first, because replay is only as good as the record.</p><h3>Step 1: build a test set from production history</h3><p>Do not replay everything. Build a deliberate sample that reflects the risks.</p><p><strong>Stratify.</strong> Take cases across customers, task types and time periods, so that one busy customer does not dominate. Include recent cases, since they reflect current behaviour.</p><p><strong>Include the hard ones.</strong> Add cases where a human reviewer corrected or rejected the agent. These are your most valuable tests, because they show where the production version already struggles, and a candidate that fixes them is a real improvement. Add cases that triggered errors, long inputs and unusual formats.</p><p><strong>Include the boring ones.</strong> The bulk of the set should be ordinary cases the agent handles well. A candidate that fails on these is not ready.</p><p><strong>Keep it sensitive-data safe.</strong> Redact before storage and before replay. Before you send customer data to any new model provider, check your contracts and data processing terms, because a different provider may be a new subprocessor that customers must be told about. This is easy to forget and expensive to get wrong.</p><p>You can pull the set with ZizkaDB’s export and iteration functions. An illustrative sketch:</p><p>python</p><pre>cases = []<br>async for ev in db.iter_events(agent=&quot;claims-agent&quot;, event=&quot;decision&quot;,<br>                               since=&quot;2026-09-01&quot;):<br>    cases.append(ev)</pre><pre># pair each decision with its human review and the retrieved context<br>test_set = build_test_set(cases, include_corrected=True, per_customer_cap=50)</pre><p>Freeze the test set once built. A moving test set makes comparisons meaningless.</p><h3>Step 2: run the candidate in shadow mode</h3><p>Shadow mode means the candidate processes the same inputs, but its output never reaches a customer. You record what it would have done and compare.</p><p>Log the shadow run under a separate agent name, and link each shadow decision back to the production decision it mirrors. That link is the key to everything that follows. Illustrative code:</p><p>python</p><pre>for case in test_set:<br>    out = await run_candidate(case.input, case.context,<br>                              model=&quot;candidate-model&quot;, prompt_v=&quot;v15&quot;)</pre><pre>    await db.log(agent=&quot;claims-agent-shadow&quot;, event=&quot;decision&quot;,<br>        data={&quot;outcome&quot;: out.outcome, &quot;reason&quot;: out.reason,<br>              &quot;model&quot;: &quot;candidate-model&quot;, &quot;prompt_v&quot;: &quot;v15&quot;,<br>              &quot;tokens&quot;: out.tokens, &quot;latency_ms&quot;: out.latency_ms},<br>        parent_id=case.production_decision_id)</pre><p>Because the shadow decision points to the production one, you can walk from either side to the other. You can also use batching and idempotency keys when logging many shadow results, so that a retry does not duplicate events.</p><p>Two practical points. First, run the candidate more than once on a sample if outputs vary, because a single run of a probabilistic model can mislead. Second, keep the shadow agent’s record separate from production metrics, so shadow runs do not pollute your drift baselines for the live agent.</p><h3>Step 3: compare with evidence, not impressions</h3><p>Now you have paired results. Compare them on what matters to your business, and write down the criteria before you look at the numbers, so you do not shape them to fit the result.</p><p><strong>Agreement.</strong> How often does the candidate reach the same outcome as production? High agreement is reassuring, but the disagreements are where the information is.</p><p><strong>Performance on the corrected cases.</strong> Among cases where a human reviewer overrode production, how often does the candidate land on the human’s answer? This is the closest thing to ground truth in your data, and it tells you whether the candidate is better, equal or worse where it counts.</p><p><strong>Regressions.</strong> Among cases production got right and the human accepted, how often does the candidate differ? Each is a potential regression to review.</p><p><strong>Cost.</strong> Tokens and spend per case, from the recorded usage. This is where a cheaper model earns its keep, but only if quality holds.</p><p><strong>Speed.</strong> Latency per case.</p><p><strong>Behaviour mix.</strong> Tool calls per case, refusal rate, output length, and the share of cases where the candidate cites its sources. A model that suddenly calls twice as many tools may be fine, or may be wasting money or taking risks.</p><p><strong>By segment.</strong> Break results down by customer, task type and language. An average can hide a slice where the candidate fails badly.</p><p>ZizkaDB’s baseline() can help here by comparing the shadow agent’s behaviour against the production agent’s reference period on the metrics you choose. It does not decide whether a difference is good. You do.</p><h3>Step 4: review disagreements with lineage</h3><p>Averages tell you how much differs. Lineage tells you why. For each meaningful disagreement, open both sides and read the chains.</p><p>python</p><pre>(await db.why(shadow_decision.id)).print()<br>(await db.why(production_decision.id)).print()</pre><p>Look for patterns. Did the candidate ignore a retrieved rule? Did it weigh a document differently? Did it fail on a particular input format? Group disagreements into categories and count them. Often the result is not accept or reject but fix the prompt for this category, then rerun. Because the shadow run is recorded with its prompt version, you can compare version 15 against version 16 the same way, and the history of your experiments becomes part of your record.</p><p>A human review of a sample of disagreements is worthwhile. Have a domain expert, not only an engineer, look at them. Record their verdicts as events linked to the cases, so that your conclusions rest on documented judgments.</p><h3>Step 5: release in stages and watch for drift</h3><p>Passing the replay test does not guarantee success in production, so release gradually.</p><p><strong>Canary.</strong> Route a small share of live traffic, by customer or by case, to the candidate. Record the model and prompt version on every call, so that you can separate canary and baseline in your measurements.</p><p><strong>Watch the signals.</strong> Compare approval rates, human edit rates, review time, error rates, cost and latency between canary and control. Watch the share of reviewer edits in particular, because a rise means humans are fixing more mistakes.</p><p><strong>Set rollback criteria in advance.</strong> Decide before the canary what result triggers rollback, for example a rise in reviewer overrides beyond a threshold, or any case in a critical category going wrong. Having the rule written down removes the temptation to rationalise.</p><p><strong>Expand.</strong> If the canary holds, widen it in steps, and keep measuring. When the change is complete, set a new baseline period for the new version so that future drift checks compare against it.</p><p>If something does go wrong, ZizkaDB’s time travel features can help you see the agent’s state as of a given moment from logged state events, and the impact route can list the cases that descended from a particular input, which helps you scope who was affected and tell them precisely.</p><h3>Step 6: keep a sign-off record</h3><p>The last step is the one that turns an engineering exercise into evidence. Record the decision to change as an event.</p><p>python</p><pre>await db.log(agent=&quot;change-control&quot;, event=&quot;model_change_approved&quot;,<br>    data={&quot;from&quot;: {&quot;model&quot;: &quot;model-a&quot;, &quot;prompt_v&quot;: &quot;v14&quot;},<br>          &quot;to&quot;: {&quot;model&quot;: &quot;candidate-model&quot;, &quot;prompt_v&quot;: &quot;v15&quot;},<br>          &quot;test_set_size&quot;: 400, &quot;agreement&quot;: &quot;recorded in report&quot;,<br>          &quot;approver&quot;: &quot;head-of-ml&quot;, &quot;date&quot;: &quot;2026-11-17&quot;},<br>    parent_id=None)</pre><p>Link it to the summary of test results. Keep the report with the record. Store your chain head outside the database so that the history cannot be quietly rewritten.</p><p>This does three useful things. It answers customers who ask how you manage changes to the AI in your product. It gives your own team a record of why a change was made. And it supports the kind of record keeping that rules such as the EU AI Act point toward, for systems that fall under them. Article 12 of the Act concerns automatic recording of events over the lifetime of high risk systems. Whether a substantial change to your system triggers further obligations depends on your system and your role, so take legal advice on that.</p><h3>Three scenarios</h3><p>The following scenarios are illustrative composites, not real customers.</p><h3>Scenario 1: a forced upgrade with a deadline</h3><p>A provider announces that a model version will be retired in ninety days. A claims automation company has recorded eight months of cases. It builds a test set of 400 cases across five customers, including 60 where reviewers overrode the agent. The candidate replacement agrees with production on most cases, but on the overridden cases it matches the reviewer less often than the current model, in one customer’s category only. Lineage shows the new model ignores a formatting rule in that customer’s retrieved policy. A prompt adjustment fixes it, the replay is rerun and the canary proceeds. The deadline is met, and the team can show the customer how the change was tested.</p><h3>Scenario 2: switching to a cheaper model</h3><p>A legal tech company wants to cut costs. The replay shows the candidate costs far less per case and agrees with production on most cases, but the regression review finds that it misses a certain type of indemnity clause more often. The team decides to use the cheaper model for low-risk document types and keep the current one for the rest. The decision, the evidence and the routing rule are all recorded. The company saves money without taking a risk it cannot explain.</p><h3>Scenario 3: a prompt change to fix one complaint</h3><p>A bank’s credit pre-assessment vendor edits a prompt to fix a customer complaint. The replay shows the edit fixes the complaint but raises the decline rate for a different segment. Without replay, this would have appeared weeks later as a drift signal and an angry client. With it, the vendor catches the side effect in an afternoon and revises the edit.</p><h3>Common pitfalls</h3><ul><li><strong>No versions recorded.</strong> If you did not log model and prompt versions, you cannot attribute a change to anything.</li><li><strong>A test set full of easy cases.</strong> Include the corrected and failed cases, or the test proves nothing.</li><li><strong>Judging after seeing the numbers.</strong> Write criteria first.</li><li><strong>One run of a probabilistic model.</strong> Repeat on samples where variance matters.</li><li><strong>Sending customer data to a new provider without checking contracts.</strong> A new provider may be a new subprocessor.</li><li><strong>Mixing shadow and production records.</strong> Keep separate agent names so baselines stay clean.</li><li><strong>Skipping the canary.</strong> Replay reduces risk. It does not remove it.</li><li><strong>No sign-off record.</strong> If the decision is not recorded, the next question from a customer or auditor is hard to answer.</li></ul><h3>A one week plan</h3><p><strong>Day 1:</strong> check that the record includes inputs, context, outputs, versions and human outcomes. Fix gaps. <strong>Day 2:</strong> build and freeze the test set, including corrected cases, with redaction applied. <strong>Day 3:</strong> run the candidate in shadow mode and log results with links to production decisions. <strong>Day 4:</strong> compare agreement, corrected case performance, regressions, cost and latency, by segment. <strong>Day 5:</strong> review disagreements with lineage, group them and adjust the prompt if needed, then rerun. <strong>Day 6:</strong> plan the canary, set rollback criteria and check contracts for any new subprocessor. <strong>Day 7:</strong> record the sign-off and begin the canary.</p><h3>Limits to remember</h3><p>ZizkaDB records, links and measures. It does not run your model, judge answers, or guarantee that a candidate will behave in production as it did in replay. Replay shows how the candidate handles past cases, and the future may differ. Outputs vary between runs. The corrected cases in your history reflect your reviewers’ judgment, which may itself contain mistakes. The open source edition records one agent per install, so multi-customer and multi-agent setups use the Cloud edition. Confirm the specific features you rely on, such as iteration, export, baseline() and time travel, against the current documentation before you build on them.</p><h3>Get started</h3><p>Pick one agent and one upcoming change, whether a model upgrade, a cost saving or a prompt edit. Make sure versions and human outcomes are recorded, build a small test set that includes corrected cases, and run your first shadow replay. You will learn more from one afternoon of comparison than from a month of hoping.</p><p>ZizkaDB runs self hosted in a single Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: ZizkaDB documentation; Regulation (EU) 2024/1689, the EU AI Act, Article 12.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79a0093b6e33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Pass an Enterprise AI Security Review: Build an Evidence Pack That Closes Deals]]></title>
            <link>https://medium.com/@MirArshadTalpur/how-to-pass-an-enterprise-ai-security-review-build-an-evidence-pack-that-closes-deals-30acd2c1fb1e?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/30acd2c1fb1e</guid>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[enterprise-software]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 10:10:04 GMT</pubDate>
            <atom:updated>2026-11-16T10:10:04.126Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ws1L6FpA4jgb85bZZw8zvA.jpeg" /><figcaption>Zizkadb — enterprise readiness</figcaption></figure><p>Your demo went well. The buyer’s team is excited. Then the deal moves to security review, a questionnaire arrives with dozens of AI-specific questions, and the momentum stops. Weeks pass. Someone asks whether your agent logs are tamper-proof. Someone else asks how you would reconstruct a wrong decision for a regulator. Your best answer is a paragraph of reassurance.</p><p>This is where many vertical AI deals are won or lost, and it is a problem you can prepare for. This guide shows how to build an evidence pack: a small, standing set of artifacts that answers the AI-specific questions with records instead of promises. It covers what reviews now ask, the five questions that decide most of them, the pack itself, how to run a live replay in the buyer meeting, and a two week plan to get it done.</p><p>The audit layer we use in the examples is ZizkaDB, an open source causal audit database for AI agents. The method applies to any tool that gives you a causally linked, tamper-evident record. What matters is that you can show the buyer what your agent did, not just tell them.</p><p>A note on scope. This is general guidance, not legal advice, and ZizkaDB does not by itself make any system compliant with the EU AI Act, SOC 2, ISO 42001 or any other framework. ZizkaDB does not hold those certifications and nothing here suggests it does. Code parameter names are illustrative and should be checked against the SDK reference. Where we describe what buyers ask, we draw on public practitioner guides, listed at the end, which vary in quality and are not official standards.</p><h3>What changed in enterprise security reviews</h3><p>A few years ago, a security review of a software vendor looked at encryption, access control, uptime and the vendor’s own certifications. Those questions still matter. For AI products, practitioner guides report that they are no longer enough.</p><p>Several recent guides make the same points. A SOC 2 report remains the front gate at most enterprise buyers, but it was not designed to evaluate AI-specific risk, so it is no longer the finish line. ISO/IEC 42001, the first certifiable AI management system standard, is increasingly listed as preferred or required in procurement templates, according to practitioner commentary. And AI questionnaires now ask things standard ones never did: whether prompts become training data, who the model subprocessors are, how the vendor handles prompt injection, and what is logged and for how long.</p><p>One security guide for SaaS vendors puts the shift in a sentence worth remembering: when a buyer’s questionnaire asks you to prove what your AI did, you attach records rather than assurances. That is the idea behind the evidence pack.</p><p>The reason buyers ask is simple. Enterprise buyers cannot push these questions up the supply chain to the model provider, so they push them down to you. If your product makes or shapes decisions, their auditors, regulators and boards will ask them what happened when it goes wrong. They need you to help them answer.</p><h3>The five questions that decide most reviews</h3><p>Reviews vary, but five questions come up in nearly every serious one. For each, here is the answer that stalls a deal and the answer that moves it.</p><p>The questionThe answer that stallsThe answer with evidenceWhat did your AI do on our data, and can you prove it?We log everything and our team can look into itHere is a sample trace of a real case, from input to output, with the chain verifiedHow do you detect when its behaviour changes?We test before each releaseHere is a drift report per customer, with model and prompt versions recordedHow do you handle prompt injection and untrusted input?We use filters and guardrailsHere is how external content is tagged, and here is a trace showing what depended on itWhat do you log, where does it live, and for how long?Logs are encrypted and retained as neededHere is the data map: what is stored, what is redacted, retention, residency and erasureHow do you show human oversight, and how fast can you respond to an incident?Our reviewers check outputsHere is the review record, and here is the timed exercise of reconstructing a past incident</p><p>The pattern is the same each time. The stalling answer describes intent. The strong answer shows an artifact. A security reviewer who can open an artifact spends less time worrying and more time ticking boxes.</p><h3>The evidence pack, component by component</h3><p>The pack is eight small artifacts. You build them once, keep them current, and attach the relevant ones to each review. None needs to be long.</p><p><strong>1. A one page architecture and data flow.</strong> A single diagram showing where customer data enters, which models and subprocessors touch it, where it is stored and where the audit record lives. Reviewers read this first. Keep it accurate, because a mismatch between the diagram and your answers costs trust.</p><p><strong>2. The event model.</strong> A short table of what your agents record: task received, context retrieved, model call, decision, tool call, human review, output delivered. For each, say what fields are captured, including model and prompt versions and the customer identifier. This shows the record is designed, not accidental.</p><p><strong>3. A sample trace.</strong> One real case, redacted, exported as a causal chain from the incoming request to the final output, with the human review included. This is the most persuasive artifact in the pack, because it shows lineage on something real.</p><p><strong>4. A drift report.</strong> A per customer view comparing recent behaviour against a baseline period: approval rates, time per task, tool mix, review edit rate. It shows that you measure change instead of assuming stability.</p><p><strong>5. An integrity proof.</strong> The result of running chain verification on the record, plus a description of where the chain head is stored outside the database. It shows that an administrator cannot quietly rewrite history. Be precise about what this proves: that the record is unchanged, not that the agent was right.</p><p><strong>6. A data handling statement.</strong> What is stored and what is redacted before storage, retention periods, deployment options for data residency, and how erasure requests are handled. This answers the concern raised in some guides that logging can create a second sensitive dataset, so say plainly how you prevent that.</p><p><strong>7. An incident playbook with a timing test.</strong> A one page procedure for reconstructing an event, plus the result of a timed exercise: pick a past case, start a clock, and record how long it took to answer what the agent read, what it decided, who reviewed it and which other cases were affected.</p><p><strong>8. An evidence window.</strong> A description of how a customer or auditor gets read-only, time limited access to inspect their own record. This is your strongest signal of confidence.</p><h3>Building the pack in practice</h3><h3>Make sure the record exists first</h3><p>Everything above depends on instrumentation. Before you build the pack, check that your agents record causal links and versions. An illustrative pattern, with parameter names to be checked against the SDK reference:</p><p>python</p><pre>task = await db.log(agent=&quot;review-agent&quot;, event=&quot;task_received&quot;,<br>    data={&quot;customer&quot;: &quot;acme&quot;, &quot;type&quot;: &quot;contract_review&quot;, &quot;case&quot;: &quot;K-2041&quot;})</pre><pre>ctx = await db.log(agent=&quot;review-agent&quot;, event=&quot;context_retrieved&quot;,<br>    data={&quot;source&quot;: &quot;playbook&quot;, &quot;rule&quot;: &quot;liability-cap&quot;, &quot;rule_v&quot;: &quot;v7&quot;,<br>          &quot;trust&quot;: &quot;trusted&quot;},<br>    parent_id=task.id)</pre><pre>dec = await db.log(agent=&quot;review-agent&quot;, event=&quot;decision&quot;,<br>    data={&quot;outcome&quot;: &quot;flag&quot;, &quot;clause&quot;: &quot;12.3&quot;, &quot;prompt_v&quot;: &quot;v14&quot;,<br>          &quot;model&quot;: &quot;provider-model-2026-09&quot;},<br>    parent_id=ctx.id)</pre><pre>review = await db.log(agent=&quot;review-agent&quot;, event=&quot;human_review&quot;,<br>    data={&quot;reviewer&quot;: &quot;r-204&quot;, &quot;action&quot;: &quot;accepted&quot;, &quot;seconds_spent&quot;: 41},<br>    parent_id=dec.id)</pre><p>Then run the lineage on the decision and keep the output:</p><p>python</p><pre>(await db.why(dec.id)).print()</pre><p>That output, redacted and formatted, becomes your sample trace.</p><h3>Export the sample trace</h3><p>Choose a case that is representative but unremarkable. Redact personal and confidential values before sharing, and confirm with your legal team that the case can be used. The point is to show structure, so the content can be synthetic if you prefer. Annotate the trace with plain language: this is the input, this is what was retrieved, this is the decision, this is the person who approved it.</p><h3>Produce the drift report</h3><p>Choose a stable period as the baseline and compare the latest week against it, per customer. ZizkaDB’s baseline() supports this kind of comparison. Record model and prompt versions on every model call so that any shift can be matched to a change. A drift report that shows stability is useful. A report that shows a shift you caught and explained is better, because it proves the process works.</p><h3>Verify the chain and store the head elsewhere</h3><p>Each event carries a SHA-256 checksum and is chained to the previous event for that agent, so editing an old event breaks the chain. Run chain verification on a schedule. Store the chain head in a system that database administrators cannot edit, so that nobody can rewrite both the history and its head. Keep a dated record of each successful verification for the pack.</p><h3>Document data handling honestly</h3><p>Describe what you actually do. If redaction happens before storage, say which patterns are covered. If full content is stored for some workflows and only metadata for others, say which. Include retention periods and how erasure requests flow through to the record. If you offer a self hosted deployment inside the customer’s own environment for data residency, say so. Whether you may store particular data, and for how long, depends on your contracts and on data protection law, so involve whoever owns that question.</p><h3>Time the incident exercise</h3><p>Pick a past case and a colleague who did not work on it. Start a clock. Ask the colleague to answer four questions from the record alone: what did the agent read, what did it decide because of that, who reviewed it and what did they see, and which other cases used the same inputs. Write down the time and the gaps. Fix the gaps and repeat. A documented exercise carries far more weight than a statement that you can respond quickly.</p><h3>Set up the evidence window</h3><p>Create a read-only, expiring key scoped to a single customer’s record. Test it as the customer would: can they see what they should, and nothing else? Describe the process in a short document so that you can offer it during a pilot.</p><h3>Running a live replay in the buyer meeting</h3><p>The most effective moment in a security review is a live replay. It takes ten minutes and it changes the tone of the conversation. A simple script:</p><ol><li><strong>Set the scene.</strong> Pick a case the buyer’s team chooses or approves, ideally from a pilot or a representative sample.</li><li><strong>Start from the output.</strong> Show the final result and ask the room what question they would ask if this were wrong.</li><li><strong>Walk backwards.</strong> Run the lineage from the output through the human review, the decision, the retrieved context, to the original request. Narrate each link.</li><li><strong>Show the versions.</strong> Point out the model and prompt versions on the decision.</li><li><strong>Show the human.</strong> Show what the reviewer saw and how long they spent.</li><li><strong>Show the proof.</strong> Run chain verification and explain what it does and does not prove.</li><li><strong>Answer the scope question.</strong> Show how you would list every other case that used the same input.</li></ol><p>A sceptical CISO who watches a decision traced back to its inputs in seconds understands your answer to the logging question better than any document could convey. Practise the replay beforehand on a case you have not seen, so that any surprises happen in rehearsal.</p><h3>Handling the hard objections</h3><p><strong>We do not want another copy of our sensitive data.</strong> This is a fair concern. Offer metadata-only recording for sensitive workflows, redaction before storage, self hosting in their environment, short retention and erasure on request. Show the data handling statement.</p><p><strong>Logs are not evidence.</strong> Agree, and explain the difference. A mutable log table proves little. A record with checksums and a hash chain, with the head stored elsewhere, makes edits detectable. Be clear about the limit: it shows the record is unchanged, not that the content was correct.</p><p><strong>Our auditors want a certification.</strong> Be honest about where you are. An audit layer gives AI-specific evidence that SOC 2 and ISO 42001 do not directly provide, but it does not replace them. If you are working toward certifications, say so and share the plan. If you hold them, share the reports and be precise about scope, since some certifications exclude AI processing.</p><p><strong>How do we know the AI is not being manipulated?</strong> Be candid. An audit layer records what the agent read and did and lets you trace what depended on any input. It does not detect manipulation or judge truth. Describe your prevention layers separately, such as input handling, least privilege and sandboxing, and show how the record supports investigation if prevention fails.</p><p><strong>What about the EU AI Act?</strong> Explain what you know and avoid overclaiming, as covered next.</p><h3>The regulatory context, briefly</h3><p>Buyers in regulated sectors increasingly ask how your product fits the EU AI Act. Three provisions are most relevant to record keeping and oversight. Article 12 requires high risk AI systems to support automatic recording of events over their lifetime. Article 14 covers human oversight, and recognises the risk of automation bias. Article 73 sets serious incident reporting timelines, which differ by the kind of incident.</p><p>On timing, the Digital Omnibus on AI, Regulation (EU) 2026/1744, moved the application date for stand-alone high risk systems under Annex III to 2 December 2027, and for high risk systems embedded in regulated products under Annex I to 2 August 2028, according to published legal summaries. Commentators stress that the work does not go away, and buyers are asking now, since their own procurement and risk teams are preparing.</p><p>Whether your product is high risk depends on its intended purpose, and your obligations depend on your role. Take legal advice on both. What the evidence pack gives you is a set of artifacts that support the conversation: a record of events, evidence of oversight and a tested ability to reconstruct an incident. ZizkaDB supports record keeping and investigation. It does not by itself deliver compliance.</p><h3>A two week plan</h3><p>You can build a working pack in two weeks, starting from one agent and one customer.</p><p><strong>Week 1: record and measure.</strong></p><ul><li>Day 1 to 2: check that causal links, model and prompt versions, customer identifiers and human review events are recorded. Fix gaps.</li><li>Day 3: configure redaction and retention, and write the data handling statement.</li><li>Day 4: export and annotate a sample trace.</li><li>Day 5: choose a baseline period and produce a first drift report.</li></ul><p><strong>Week 2: prove and present.</strong></p><ul><li>Day 6: run chain verification, set up the schedule and store the chain head outside the database.</li><li>Day 7 to 8: run and time the incident exercise, and fix the gaps.</li><li>Day 9: set up and test the read-only evidence window.</li><li>Day 10: write the one page architecture and the event model table.</li><li>Day 11 to 12: assemble the pack and update your standard questionnaire answers.</li><li>Day 13 to 14: rehearse the live replay with sales and engineering, and have counsel review the claims.</li></ul><h3>Common mistakes</h3><ul><li><strong>Describing instead of showing.</strong> Every claim in the pack should point to an artifact.</li><li><strong>Overclaiming.</strong> Say that the system records, traces, measures and proves the record. Do not say it guarantees correctness or compliance.</li><li><strong>A stale pack.</strong> An out of date diagram or an expired verification record is worse than none. Assign an owner and a review date.</li><li><strong>Storing too much.</strong> An audit record full of raw sensitive content can become the thing the buyer worries about. Decide what to keep.</li><li><strong>Ignoring versions.</strong> Without model and prompt versions, you cannot explain a change in behaviour.</li><li><strong>Letting the head live in the same place as the chain.</strong> If the same administrator can edit both, the integrity claim is weak.</li><li><strong>Leaving sales out.</strong> If the sales team cannot run the replay, the pack stays in engineering and the deal still stalls.</li></ul><h3>Limits to remember</h3><p>ZizkaDB records, links, measures and proves that the record is unchanged. It does not make an agent correct, block harmful actions, detect manipulation or judge whether an output is true. The open source edition records one agent per install, so multi-customer and multi-agent setups use the Cloud edition. Confirm the specific features you rely on, such as baseline(), the impact route and read-only keys, against the current documentation before you describe them to a buyer. And have counsel check how regulation and your contracts apply to your product.</p><h3>Get started</h3><p>Pick one agent and one customer. Make sure the causal links and versions are recorded, export a sample trace, and time an incident exercise. You will learn more in one afternoon than in a month of drafting questionnaire answers, and you will have something real to show the next time a buyer asks what your AI did.</p><p>ZizkaDB runs self hosted in a single Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: practitioner guides on enterprise AI security questionnaires, including Tian Pan (80 question wall, April 2026), DeepInspect (SaaS guide to AI security questionnaires) and Wavect (EU AI vendor security questionnaire); legal summaries of the Digital Omnibus on AI from DLA Piper, Orrick and VDA; Regulation (EU) 2024/1689, Articles 12, 14 and 73; ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30acd2c1fb1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ZizkaDB × Redu Cloud: Bringing Operational Intelligence and Agent-Native Infrastructure Together]]></title>
            <link>https://medium.com/@MirArshadTalpur/zizkadb-redu-cloud-bringing-operational-intelligence-and-agent-native-infrastructure-together-69490d8f1e26?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/69490d8f1e26</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cloudinfra]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[zizkadb]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 12:22:21 GMT</pubDate>
            <atom:updated>2026-11-14T12:22:21.323Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCRW_KLBznvQRtMXtzGJQA.png" /><figcaption>ZizkaD — Redu cloud</figcaption></figure><p><strong>Two European technology companies join forces to make AI agents more reliable, auditable, and production-ready.</strong></p><p>We are excited to announce our design partnership with <a href="https://redu.cloud/">redu.cloud</a>, an agent-native cloud platform built to help AI agents deploy, operate, and manage real infrastructure.</p><p>At ZizkaDB, we believe the next generation of software infrastructure will be built around AI agents. But making agents work in production requires more than powerful models. It requires reliable infrastructure, operational visibility, auditability, and control over data.</p><p>That’s exactly where ZizkaDB and Redu Cloud come together.</p><p>Both companies are already serving customers across their respective cloud and enterprise markets. This partnership brings our capabilities closer together, creating a more complete infrastructure foundation for companies building and deploying AI agents at scale.</p><h3>Two complementary pieces of the AI infrastructure stack</h3><p>AI agents are moving beyond experimentation. Companies are increasingly deploying autonomous systems that interact with customers, execute workflows, access business data, and make decisions.</p><p>As adoption grows, two fundamental questions emerge:</p><ul><li>Where do AI agents run, and how can their infrastructure be managed efficiently?</li><li>How do companies understand, audit, and improve what their agents actually do?</li></ul><p>ZizkaDB and Redu Cloud address these complementary challenges.</p><h3>ZizkaDB: Operational intelligence for AI agents</h3><p>ZizkaDB is a database built specifically for AI agents in production.</p><p>Traditional observability tools provide logs, traces, and metrics. But when an AI agent makes an unexpected decision, teams need more than a collection of events. They need to understand the complete context behind its behavior.</p><p>ZizkaDB provides:</p><ul><li><strong>Session replay:</strong> Reconstruct agent sessions and understand what happened from beginning to end.</li><li><strong>Causal lineage:</strong> Trace the decision chain behind an agent’s actions and understand why it made a particular choice.</li><li><strong>Drift detection:</strong> Identify behavioral changes following model, prompt, or configuration updates.</li><li><strong>Operational visibility:</strong> Give engineering and operations teams a structured view of agent activity across production environments.</li></ul><p>Available as open-source software and managed cloud, ZizkaDB gives teams the flexibility to deploy according to their infrastructure and operational requirements.</p><h3>Redu Cloud: Infrastructure built for AI agents</h3><p>Redu Cloud approaches the infrastructure side of the equation.</p><p>Traditional cloud platforms were designed primarily around human-operated infrastructure workflows. Redu Cloud is built around a different idea: AI agents should be able to provision, deploy, operate, and maintain the infrastructure they need.</p><p>Through its agent-native approach and Model Context Protocol (MCP) integration, Redu Cloud enables AI agents to work directly with real cloud infrastructure.</p><p>Its capabilities include:</p><ul><li>Compute instances and virtual machines.</li><li>Managed databases and persistent storage.</li><li>Private networks and load balancing.</li><li>Autoscaling infrastructure.</li><li>Agent-driven deployment and infrastructure operations.</li></ul><p>With EU-based infrastructure and data residency in Germany, Redu Cloud also provides an important foundation for companies building AI products with European data requirements.</p><h3>What the partnership brings to customers</h3><p>The combination of ZizkaDB and Redu Cloud connects two important layers of production AI infrastructure.</p><p>Redu Cloud provides the environment where AI applications and agents run. ZizkaDB provides the operational intelligence needed to understand, audit, and improve their behavior.</p><p>Together, we aim to bring four important benefits to AI-native companies:</p><p><strong>1. Agent auditability</strong></p><p>As agents become responsible for increasingly important workflows, understanding their decisions becomes essential. ZizkaDB gives teams the ability to replay sessions, trace decisions, and investigate unexpected behavior.</p><p><strong>2. Infrastructure speed</strong></p><p>Redu Cloud allows agents to interact directly with infrastructure, reducing the friction between development, deployment, and operations.</p><p><strong>3. Cost optimization</strong></p><p>Companies can combine agent-driven infrastructure management with flexible ZizkaDB deployment options, helping them build a more cost-conscious production stack.</p><p><strong>4. European data residency</strong></p><p>For companies operating in regulated or data-sensitive markets, having infrastructure and operational data options aligned with European requirements is increasingly important.</p><p>Our shared objective is to make these capabilities accessible without forcing companies to assemble and maintain multiple disconnected systems.</p><h3>Getting started with ZizkaDB on Redu Cloud</h3><p>Starting today, ZizkaDB can be used natively with Redu Cloud in three ways.</p><h3>1. Open-source deployment</h3><p>ZizkaDB Open Source is already available on Redu Cloud.</p><p>Developers can deploy ZizkaDB directly on Redu Cloud infrastructure and connect it to their AI agents.</p><p>This provides a straightforward way to get started with agent observability and operational intelligence while retaining control over the deployment environment.</p><h3>2. ZizkaDB managed cloud plans</h3><p>We are also preparing two new ZizkaDB managed cloud plans in collaboration with Redu Cloud.</p><p>These plans are designed with vertical AI companies and growing agent-native businesses in mind.</p><ul><li><strong>Plan 1:</strong> Up to 2.5 million events, with cost-effective pricing.</li><li><strong>Plan 2:</strong> Up to 7.5 million events, with cost-effective pricing.</li></ul><p>Both plans will be available soon.</p><p>The goal is to give teams a straightforward path to managed agent data infrastructure without having to operate everything themselves.</p><h3>3. Enterprise deployments with VPC</h3><p>For larger organizations with specific security, networking, and infrastructure requirements, ZizkaDB and Redu Cloud will support enterprise deployments with Virtual Private Cloud (VPC) options.</p><p>Companies interested in this setup can contact either team directly to discuss their requirements.</p><h3>Building the infrastructure layer for the agent economy</h3><p>We believe the AI infrastructure market is entering a new phase.</p><p>The first generation of AI products focused on model access, prompting, and application development. The next generation will require durable infrastructure capable of supporting autonomous systems in real production environments.</p><p>That means infrastructure must evolve.</p><p>AI agents need environments where they can operate. Businesses need visibility into what those agents do. Engineering teams need the ability to investigate failures, understand decisions, optimize costs, and maintain control over their systems.</p><p>No single product needs to solve every part of this challenge.</p><p>The opportunity lies in bringing specialized, complementary technologies together.</p><p>ZizkaDB and Redu Cloud are already building and serving customers in their respective domains. This partnership is a natural next step: combining operational intelligence with agent-native cloud infrastructure to serve a broader market.</p><p>We are excited about what we can build together and look forward to making production AI infrastructure more accessible to companies in Europe and beyond.</p><p><strong>Build with ZizkaDB. Deploy with Redu Cloud. Make your AI agents production-ready.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69490d8f1e26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build Reliable Agentic AI Systems for Vertical AI Companies]]></title>
            <link>https://medium.com/@MirArshadTalpur/how-to-build-reliable-agentic-ai-systems-for-vertical-ai-companies-290564214ff5?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/290564214ff5</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[zizkadb]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-systems-design]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 11:23:56 GMT</pubDate>
            <atom:updated>2026-11-13T11:23:56.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MU1I_NhoEHTUwOUliQIX_Q.jpeg" /><figcaption>Building reliable agentic systems with zizkadb</figcaption></figure><p>Vertical AI companies sell something harder than software. They sell outcomes: a claim processed correctly, a contract reviewed on time, a patient note drafted without errors. Their customers are enterprises in regulated sectors, and those customers do not buy a demo. They buy a result they can defend to their own auditors, boards and regulators.</p><p>That is a high bar for a technology that is probabilistic by nature. An agent built on a language model will not behave identically every day. It will read slightly different inputs, retrieve different memories, and sometimes reason its way to a wrong answer. The question for a vertical AI founder is not how to make an agent deterministic, because you cannot. The question is how to make an agent reliable: predictable enough to trust, observable enough to correct, and accountable enough to sell.</p><p>This guide is a practical, step by step answer. It covers what reliable means in a vertical AI business, a reference architecture, eight build steps with small code snippets, and three worked use cases in healthcare, banking and legal tech. It then covers how to turn reliability into a sales asset, and how to roll it out in thirty days.</p><p>The tool we use for the audit layer is ZizkaDB, an open source causal audit database for AI agents. The method works with other tools too. What matters is the discipline: record what the agent read, what it decided and who approved it, and be able to prove the record is intact.</p><p>A note on scope. The use cases below are illustrative composites, not real customers. Code parameter names are illustrative and should be checked against the SDK reference. Nothing here is legal advice, and ZizkaDB supports record keeping and investigation but does not by itself make any system compliant with the EU AI Act or any other law.</p><h3>Part 1: what reliable means for a vertical AI company</h3><p>Start by dropping a word. Many vertical AI pitches promise deterministic outcomes. Buyers who know AI do not believe it, and investors who know AI discount it. A better promise is bounded, explainable and auditable behaviour. Reliable means five things you can demonstrate, not just claim.</p><p><strong>1. Observable.</strong> You can see what each agent did, in order, for each customer. Not just the final output, but the inputs, the retrieved context, the tool calls and the decisions in between.</p><p><strong>2. Traceable.</strong> For any output, you can walk backwards to the inputs that shaped it. This is causal lineage: each event points to the event that caused it. When a customer asks why the agent said that, you answer with a chain, not a guess.</p><p><strong>3. Bounded.</strong> The agent works inside limits you set: which tools it may call, which data it may touch, which actions need a human. Reliability comes partly from what the agent is not allowed to do.</p><p><strong>4. Measurable.</strong> You can tell when behaviour changes. Models get updated, prompts get edited, data shifts. Agent drift is the slow change in behaviour that never triggers an error. If you cannot measure it, you find out from a customer.</p><p><strong>5. Provable.</strong> You can show that the record of what happened has not been edited since. This is the difference between we have logs and we have evidence. A tamper-evident record, protected by checksums and a hash chain, is evidence in a way that a mutable log table is not.</p><p>Notice that none of the five depends on the model being perfect. They depend on the system around the model. That is good news for vertical AI companies, because the system around the model is where you can differentiate.</p><h3>Part 2: why vertical AI companies face a different problem</h3><p>A horizontal tool can tolerate a certain amount of error, since the user checks the answer. A vertical AI company usually cannot, for four reasons.</p><p><strong>One failure, many customers.</strong> Vertical AI companies run the same system for many customers. A bad prompt change, a degraded model version or a poisoned data source can affect every tenant at once. The blast radius of one mistake is wide, and a few lost accounts early in a company’s life can change its trajectory.</p><p><strong>Buyers are sceptical by default.</strong> An enterprise buyer in healthcare, banking, defence or legal evaluates a vendor’s AI with a checklist: where does our data go, who can see it, how do we know what the system did, how do we audit it. Security questionnaires and procurement reviews ask for evidence, and a vendor without it stalls in the sales cycle.</p><p><strong>Regulated sectors bring regulated questions.</strong> Many vertical AI products touch high risk areas. The EU AI Act includes record keeping requirements for high risk systems (Article 12), human oversight requirements (Article 14) and serious incident reporting (Article 73). Whether a specific product is covered depends on its intended purpose and the rules in force, and you should take legal advice on that. The commercial point stands regardless: buyers ask these questions now.</p><p><strong>You are the vendor in someone else’s risk register.</strong> When your customer deploys your agent, they inherit its failures. Their legal, risk and security teams want to know that, if something goes wrong, they can reconstruct it. If you cannot help them do that, they will price the risk into the deal or choose a competitor who can.</p><p>The consequence is that reliability is not an engineering nicety for a vertical AI company. It is part of the product and part of the sales motion.</p><h3>Part 3: a reference architecture</h3><p>Reliable agentic systems share a layered shape. You can build each layer with different tools, but you need all of them.</p><p>LayerPurposeExamples of what it doesInput layerControl what the agent readsTag sources as trusted or untrusted, strip hidden content, limit external readsAgent layerDo the work within limitsLeast privilege tools, scoped data access, clear instructions, approval gatesOversight layerKeep humans meaningfully in the loopReview queues, thresholds for escalation, recorded human decisionsAudit layerRecord and prove what happenedEvent log with causal links, session replay, drift measurement, tamper-evident chainMonitoring layerSpot problems earlyBaselines per tenant, alerts on drift, error rates, cost per taskEvidence layerTurn the record into trustRead-only customer access, exports for auditors, incident reports</p><p>Most teams build the first two layers and a thin version of monitoring. The oversight, audit and evidence layers are where reliability, and the sales story, are won or lost.</p><p>The audit layer is the foundation for the others. Oversight needs the audit layer to record who approved what. Monitoring needs it for baselines. Evidence is a view on top of it. That is why we start there in the steps that follow.</p><p>A few design principles keep the architecture honest.</p><ul><li><strong>Observe first, block second.</strong> An audit layer that records without interfering is easy to adopt. Prevention comes from the input and agent layers.</li><li><strong>Separate recording from deciding.</strong> The agent should not be able to rewrite its own history. Keep the record outside the agent’s control.</li><li><strong>Treat outside content as untrusted.</strong> Anything the agent reads from a source you do not control can carry instructions or false claims. Tag it, and trace what depends on it.</li><li><strong>Design for the incident you have not had yet.</strong> The test of the system is whether you can reconstruct an event you did not anticipate.</li></ul><h3>Part 4: eight steps to build it</h3><h3>Step 1: define your event model before you write agent code</h3><p>The most valuable hour in the project is the one spent deciding what counts as an event. Each event is a thing that happened, with enough data to understand it and a link to the event that caused it.</p><p>For most vertical AI agents, a small vocabulary covers the ground:</p><p>EventWhen to log itKey fieldstask_receivedA customer request or document arrivestenant, task type, sourcecontext_retrievedThe agent pulls data, documents or memorywhat was retrieved, from where, trust tagmodel_callThe agent calls a modelmodel and version, prompt version, token usagedecisionThe agent chooses an outcomethe outcome, the stated reason, a confidence value if you have onetool_callThe agent acts outside itselftool, target, arguments, resulthuman_reviewA person approves, edits or rejectsreviewer, what they saw, what they did, time spentoutput_deliveredThe result goes to the customercontent or reference, destination</p><p>Two fields deserve special attention. Record the model version and prompt version on every model call, because most unexplained behaviour changes trace to one of the two. And record the tenant on every event, because per customer visibility is what you will sell later.</p><h3>Step 2: stand up the audit layer</h3><p>ZizkaDB runs self hosted in a single Docker container on Postgres, using the quickstart in its documentation, which suits companies that must keep data inside their own environment or inside a customer’s VPC. There is also a managed Cloud edition at db.zizka.ai. The open source edition records one agent per install, so a vertical AI company that runs many agents or many tenants will usually need the Cloud edition for fleet and multi-agent recording. Decide early which fits your data residency commitments.</p><p>Connect through the Python or TypeScript SDK, or a framework integration if you use one. For LangGraph and CrewAI there are published packages, and for agents that use MCP there is the ZizkaDB MCP server. Check the documentation for the current state of each.</p><h3>Step 3: log with causal links</h3><p>Causal lineage is what separates an audit trail from a log file. Each event carries a parent id pointing to the event that caused it. Illustrative code, to be checked against the SDK reference:</p><p>python</p><pre>task = await db.log(agent=&quot;claims-agent&quot;, event=&quot;task_received&quot;,<br>    data={&quot;tenant&quot;: &quot;acme-health&quot;, &quot;type&quot;: &quot;prior_auth&quot;, &quot;case&quot;: &quot;C-7731&quot;})</pre><pre>ctx = await db.log(agent=&quot;claims-agent&quot;, event=&quot;context_retrieved&quot;,<br>    data={&quot;source&quot;: &quot;policy-kb&quot;, &quot;doc&quot;: &quot;policy-2026-04&quot;, &quot;trust&quot;: &quot;trusted&quot;},<br>    parent_id=task.id)</pre><pre>dec = await db.log(agent=&quot;claims-agent&quot;, event=&quot;decision&quot;,<br>    data={&quot;outcome&quot;: &quot;approve&quot;, &quot;reason&quot;: &quot;criteria 1-4 met&quot;, &quot;prompt_v&quot;: &quot;v14&quot;,<br>          &quot;model&quot;: &quot;provider-model-2026-09&quot;},<br>    parent_id=ctx.id)</pre><pre>(await db.why(dec.id)).print()</pre><p>Now why() returns the chain from the decision back through the context to the task. When a customer asks why a case was decided that way, you run one command and read the answer.</p><h3>Step 4: record the human, not only the machine</h3><p>Human oversight is only worth something if you can show it happened and that it was real. Log the review as an event linked to what the reviewer was shown:</p><p>python</p><pre>review = await db.log(agent=&quot;claims-agent&quot;, event=&quot;human_review&quot;,<br>    data={&quot;reviewer&quot;: &quot;r-204&quot;, &quot;action&quot;: &quot;approved&quot;, &quot;seconds_spent&quot;: 14,<br>          &quot;fields_viewed&quot;: [&quot;summary&quot;, &quot;criteria&quot;]},<br>    parent_id=dec.id)</pre><p>This does two things. It gives you evidence of oversight for the customer and the auditor. And it gives you an early warning against rubber stamping: if reviewers approve everything in a few seconds, the data shows it. Human oversight that exists only on paper is a liability. Human oversight you can measure is an asset.</p><h3>Step 5: protect tenants and data</h3><p>Vertical AI means other people’s sensitive data. Three habits matter.</p><ul><li><strong>Separate tenants in the record.</strong> Use distinct agent names or tags per tenant so one customer’s trail never mixes with another’s, and so you can give one customer access to only their own history.</li><li><strong>Redact before storage.</strong> ZizkaDB redacts before storage, so identifiers and secrets that appear in an agent’s context do not become a second copy of sensitive data inside the audit log. Configure it for the patterns that matter in your sector.</li><li><strong>Decide what to store.</strong> For some use cases the audit log should hold references and metadata, not full content. Keep the shape of what happened without keeping the words, and set retention to match your obligations.</li></ul><p>Whether you may keep a given piece of data, and for how long, depends on your contracts and on data protection law. Involve whoever owns that question before you decide.</p><h3>Step 6: make logging reliable under load</h3><p>Audit layers fail quietly when they are an afterthought. Use batch logging for high volume steps so that you are not making a network call per token, and use idempotency keys so that a retry after a timeout does not create duplicate events. Make the writes observe-only: a failed audit write must not break the customer’s task, though you should alert on it, because a gap in the record is itself something to explain later.</p><h3>Step 7: measure agent drift per tenant</h3><p>Agents change slowly. A model provider updates a version, someone edits a prompt, a customer’s documents shift. None of this throws an error, and all of it can change outcomes. Agent drift measurement means comparing recent behaviour against a reference period.</p><p>In ZizkaDB, baseline() compares a recent window with a baseline you choose. Good signals for a vertical AI agent:</p><ul><li>The approval or rejection rate by tenant and task type.</li><li>Average time and tokens per task.</li><li>The mix of tools called.</li><li>The share of decisions whose lineage includes an untrusted source.</li><li>The share of human reviews that edit the agent’s output.</li><li>The time reviewers spend per case.</li></ul><p>Choose a stable period as the baseline, compare weekly, and always record model and prompt versions so a shift can be matched to a change. Drift tells you where to look. The lineage tells you why.</p><h3>Step 8: prove the record and share it</h3><p>Two final habits turn the record into evidence.</p><p>First, make it tamper-evident. ZizkaDB computes a SHA-256 checksum for each event and chains events per agent, so changing an old event breaks the chain. Run verify_chain on a schedule, and store the chain head outside the database so that nobody with database access can rewrite both the history and its head. The chain shows that the record is unchanged. It does not show that the agent was right.</p><p>Second, give customers and auditors a safe window. Read-only and expiring keys let a reviewer inspect the record for a limited time without being able to change it. For a vertical AI company, this is a selling point: we can show you what our agent did on your data, and you can check it yourself.</p><h3>Part 5: three use cases</h3><p>The following scenarios are illustrative composites, written to show how the steps fit together. They are not real customers and the figures are not data. Whether a given product falls under specific regulation depends on its intended purpose, so treat the regulatory notes as prompts for legal advice.</p><h3>Use case 1: healthcare, a clinical documentation assistant</h3><p><strong>The product.</strong> A vertical AI company sells an agent that listens to a consultation, drafts the visit note and suggests billing codes. A clinician reviews and signs the note. The buyer is a hospital group, and the people who can say yes include the CIO, the CISO and the chief medical information officer.</p><p><strong>The risk.</strong> The agent can omit a symptom, add something that was never said, or suggest a code the visit does not support. The consequences are clinical, financial and legal. The hospital also worries about where patient data goes. Depending on the intended purpose, the product may fall under medical device rules and the AI Act, which is a question for the company’s regulatory advisers.</p><p><strong>What reliable looks like here.</strong></p><ul><li><strong>Events.</strong> The visit becomes a task. Each transcript segment, retrieved guideline and model call is an event. The draft note is a decision event. The clinician’s review is a human_review event linked to the draft.</li><li><strong>Causal lineage.</strong> Each statement in the draft links back to the transcript segment that produced it. When a clinician says this symptom was never mentioned, the chain shows whether the model invented it or misheard the audio.</li><li><strong>Human oversight you can measure.</strong> The review event records what the clinician saw and changed. If the edit rate per note falls to near zero while the review time drops to seconds, that is a signal to investigate, not a success metric.</li><li><strong>Data protection.</strong> Redaction before storage keeps identifiers out of the audit log. The company offers a self hosted option so the audit trail stays inside the hospital’s own environment, which is how data residency is addressed.</li><li><strong>Drift.</strong> When the model provider ships a new version, baseline() compares note length, correction rate and code suggestion mix against the previous period, per hospital and per specialty.</li></ul><p><strong>The incident replay.</strong> A hospital reports that a discharge note included a medication the patient was not taking. The company opens the visit, runs why() on the note, and finds the medication in a retrieved prior record that belonged to a different patient with a similar name. The lineage shows the retrieval step, the matching rule and the clinician’s review. The fix is to the retrieval logic, the impact route lists every other note that used that rule, and the company contacts the affected hospitals with a precise list rather than a vague warning. That conversation is very different from we are investigating.</p><p><strong>The sales value.</strong> The CISO’s questionnaire asks how the company would reconstruct an error and show that records are unaltered. The answer is a demonstration, not a document.</p><h3>Use case 2: banking, a credit pre-assessment agent</h3><p><strong>The product.</strong> A vertical AI company sells an agent that gathers applicant data, checks documents, and recommends whether a small business loan application should proceed, with a human credit officer making the final call. The buyer is a regional bank with a strong audit culture.</p><p><strong>The risk.</strong> Credit decisions are scrutinised for fairness, consistency and explainability. A regulator, an internal audit team or an applicant can ask why a decision was made. Drift matters: a prompt or model change can quietly alter approval patterns across thousands of applications. Another risk is automation bias, where officers accept the recommendation without real review.</p><p><strong>What reliable looks like here.</strong></p><ul><li><strong>Events.</strong> Application received, documents retrieved, checks run, recommendation produced, officer decision recorded, outcome delivered.</li><li><strong>Explainability by lineage.</strong> The recommendation links to the documents and checks it relied on. When an applicant disputes a decision, the bank can produce the chain of inputs and the human decision, instead of reconstructing it from several systems.</li><li><strong>Oversight evidence.</strong> The officer’s decision event records what was shown and the time spent. If one officer approves a high volume of recommendations in seconds, the data surfaces it for a manager.</li><li><strong>Drift measurement.</strong> After a model update, baseline() compares recommend and decline rates, average processing time and the share of cases the officer overrides, by segment. A sudden change prompts review before it becomes a pattern a regulator finds first.</li><li><strong>Tamper-evident record.</strong> The hash chain and externally stored chain head mean the bank’s auditors can verify that decision histories were not edited after the fact.</li><li><strong>Memory hygiene.</strong> If the agent keeps notes about a repeat client and one is corrected, superseding the old note keeps the bad fact out of future retrieval while keeping the history visible.</li></ul><p><strong>The incident replay.</strong> An internal audit samples forty cases and asks why three declines differ from similar approvals. The vendor shows, for each case, the retrieved documents, the rule path and the officer decision. In one case, an outdated policy document was retrieved because a newer version had not been indexed. The lineage points at the retrieval step, and the impact route lists every case that used the outdated document. The bank reviews those cases. The vendor has turned a potential trust crisis into a documented, bounded correction.</p><p><strong>The sales value.</strong> Banks already run on audit trails. A vendor that arrives with one is speaking their language, and the conversation moves from whether to trust the AI to how to integrate the evidence into existing controls.</p><h3>Use case 3: legal tech, a contract review agent</h3><p><strong>The product.</strong> A vertical AI company sells an agent that reviews supplier contracts against a client’s playbook, flags risky clauses and proposes redlines. Lawyers review the flags before anything goes back to the counterparty. The buyer is a law firm or a corporate legal department.</p><p><strong>The risk.</strong> Confidentiality is paramount, and so is accuracy. A missed indemnity clause or a hallucinated citation can be costly and professionally embarrassing. Tenant separation matters because one client’s documents must never inform another client’s results. Lawyers also care about being able to show their work.</p><p><strong>What reliable looks like here.</strong></p><ul><li><strong>Events.</strong> Contract received, clauses extracted, playbook rules retrieved, risk flags generated, lawyer review recorded, redline delivered.</li><li><strong>Lineage for every flag.</strong> Each flag links to the clause text and the playbook rule that triggered it. A lawyer can see why a clause was flagged and can also see why one was not, which matters when something is missed.</li><li><strong>Tenant isolation.</strong> Per client agent naming and per client read-only keys mean a client can inspect only their own review history, and nothing in one client’s trail leaks into another’s.</li><li><strong>Memory with supersedes.</strong> The playbook changes. When a rule is updated, superseding the old one means the agent stops applying the outdated rule, while the history of what was applied when remains for audit.</li><li><strong>External content as untrusted.</strong> If the agent reads clauses from a counterparty’s document, that text can contain instructions. Tagging it as untrusted and tracing what depends on it allows the vendor to answer whether a manipulated clause changed any flags.</li><li><strong>Retention and erasure.</strong> Legal clients often have strict retention rules. Configurable retention and erasure with tombstones help match the record to the client’s policy.</li></ul><p><strong>The incident replay.</strong> A client discovers that a limitation of liability clause was not flagged in a signed contract. The vendor opens the review, and the chain shows the clause was extracted but the playbook rule was not retrieved, because the rule had been superseded by a version with a narrower trigger. The lineage names the exact rule version and the date it changed. The vendor can then list every other contract reviewed under that version and offer a targeted re-review. The firm sees a vendor that finds its own mistakes and fixes them in a controlled way.</p><p><strong>The sales value.</strong> Law firms sell trust. A vendor that can demonstrate how its agent reached each flag, and prove the record is unaltered, fits that culture.</p><h3>What the three cases have in common</h3><p>In each scenario, the failure was not exotic. It was a retrieval mismatch, an outdated document, a superseded rule. These are ordinary system faults. What turned them from crises into manageable incidents was the ability to answer four questions quickly: what did the agent read, what did it decide because of that, who reviewed it, and which other cases are affected. A vertical AI company that can answer those four questions is a safer vendor than one that cannot, however good its model.</p><h3>Part 6: turning reliability into a sales asset</h3><p>Reliability work often stays inside engineering. For a vertical AI company, it should reach the sales team, because enterprise deals are often decided on trust.</p><p><strong>Answer security questionnaires with evidence.</strong> Questionnaires ask how you log, how you trace, how you detect change, how you prove integrity. With the audit layer in place, each answer points to a capability you can demonstrate.</p><p><strong>Run a live replay in the buyer meeting.</strong> Take a sample case, run why() and show the chain. A sceptical CISO who sees a decision traced back to its inputs in seconds understands the value faster than any slide can explain it.</p><p><strong>Offer the customer an evidence window.</strong> Read-only and expiring keys let the buyer’s risk team inspect the trail for a pilot. You are inviting scrutiny, which is a strong signal of confidence.</p><p><strong>Prepare an incident response pack.</strong> Have a standard way to export the record for a case, with checksums, so that when a customer needs to investigate or report an incident, you can respond in hours, not weeks. Under the EU AI Act, serious incident reporting for high risk systems has short timelines in Article 73, and summaries differ on exactly how days are counted, so take legal advice on your obligations. Whatever they turn out to be, being able to reconstruct an event quickly is an advantage.</p><p><strong>Price reliability as part of the product.</strong> Enterprises pay for peace of mind. If your offering includes auditability, say so in your packaging and contracts, and consider whether tenant level audit access is a feature of a higher tier.</p><p><strong>Keep the claims honest.</strong> Say that your system records, traces and measures. Do not say it guarantees correctness or compliance. Enterprise buyers and their lawyers notice overclaiming, and it damages trust more than it helps.</p><h3>Part 7: the regulatory backdrop in plain terms</h3><p>Vertical AI companies selling into the EU, or to customers who do, should understand the direction of travel.</p><ul><li><strong>Article 12</strong> of the EU AI Act requires high risk AI systems to support automatic recording of events over their lifetime. A causally linked, tamper-evident record is the kind of evidence that supports this.</li><li><strong>Article 14</strong> covers human oversight, and its text recognises the risk of automation bias. Recording what reviewers saw and did helps you show oversight was real.</li><li><strong>Article 73</strong> sets out serious incident reporting, with timelines that vary by the kind of incident.</li><li><strong>Timing.</strong> Under the Digital Omnibus, Regulation 2026/1744, in force since 27 July 2026, the main high risk obligations for Annex III systems were deferred to 2 December 2027 and for Annex I systems to 2 August 2028. That gives time, but enterprise buyers are asking now, and building the record takes time.</li><li><strong>Data protection.</strong> GDPR applies to personal data in your audit trail. Erasure rights, retention and breach notification windows all interact with how you design logging.</li></ul><p>None of this is legal advice. Whether and how these provisions apply depends on your product’s intended purpose and your role, so involve counsel early. What an audit layer gives you is the raw material: a record you can use to demonstrate oversight, reconstruct events and respond to questions.</p><h3>Part 8: a thirty day rollout plan</h3><p>You do not need to do everything at once, and you do not need a big programme. Start with one agent, one tenant and one workflow, and move in four weekly steps.</p><p><strong>Week 1: foundation.</strong></p><ul><li>Agree the event model and the tenant model.</li><li>Stand up ZizkaDB, self hosted or Cloud, and decide where the data lives.</li><li>Instrument one agent end to end, with causal links, model and prompt versions, and human review events.</li><li>Configure redaction and retention.</li></ul><p><strong>Week 2: replay and fix.</strong></p><ul><li>Run your first replay on a real case with why().</li><li>Fix the gaps it exposes, such as missing links, missing versions or fields you wish you had recorded.</li><li>Turn on batching and idempotency keys for high volume steps.</li></ul><p><strong>Week 3: measurement and integrity.</strong></p><ul><li>Choose a baseline period and set up a first drift check per tenant.</li><li>Add review time and edit rate to your oversight metrics.</li><li>Schedule chain verification and store the chain head outside the database.</li><li>Test the incident process: pick a past case and time how long it takes to reconstruct.</li></ul><p><strong>Week 4: evidence and sales.</strong></p><ul><li>Set up read-only access for a pilot customer.</li><li>Build a standard evidence export.</li><li>Update security questionnaire answers and sales materials.</li><li>Train the sales team to run a live replay.</li><li>Review the regulatory picture with counsel.</li></ul><p>By the end of the month you will not have everything. You will have one agent that is observable, traceable and provable, a drift signal, and a live demonstration you can show a buyer. Expand to more agents and tenants from there.</p><h3>Part 9: common pitfalls</h3><ul><li><strong>Logging only outputs.</strong> Outputs tell you what happened. Lineage tells you why. Without causal links you have a log, not an audit trail.</li><li><strong>Ignoring versions.</strong> If you do not record model and prompt versions, drift is unexplainable.</li><li><strong>Treating oversight as a checkbox.</strong> Recording that a human clicked approve is not evidence of oversight. Record what they saw, what they changed and how long they spent.</li><li><strong>Storing too much.</strong> Putting full sensitive content into the audit log can create a new risk. Decide what to keep, redact, and set retention.</li><li><strong>Letting the record live where it can be edited.</strong> If administrators can rewrite history, the record does not prove much. Store the chain head elsewhere.</li><li><strong>Building it all at the end.</strong> Retrofitting lineage is painful. Add it while the agent is being built.</li><li><strong>Overclaiming.</strong> Promise traceability and evidence, not perfection.</li></ul><h3>Limits to remember</h3><p>ZizkaDB records, links, measures and proves the record. It does not make an agent correct, block harmful actions, detect manipulation, or judge whether an output is true. Prevention, such as least privilege, sandboxing, input filtering and evaluation, remains your job and sits in other layers. The open source edition records one agent per install, so multi-tenant and multi-agent setups use the Cloud edition. Confirm the specific features you rely on, such as the impact route, baseline() and agent to agent recording, against the current documentation before you build on them. And please take legal advice on how regulation applies to your product.</p><h3>Get started</h3><p>Pick one agent, one tenant and one workflow. Define the events, log them with causal links, record the human review, and run your first replay on a real case. Then ask the question your customers will ask: why did the agent do that?</p><p>ZizkaDB runs self hosted in a single Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: Regulation (EU) 2024/1689, the EU AI Act, Articles 12, 14 and 73; Regulation (EU) 2026/1744, the Digital Omnibus on AI; ZizkaDB documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=290564214ff5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Add ZizkaDB to OpenClaw: A Tamper-Evident Audit Trail for Every Agent Turn]]></title>
            <link>https://medium.com/@MirArshadTalpur/how-to-add-zizkadb-to-openclaw-a-tamper-evident-audit-trail-for-every-agent-turn-2b9ac711dbd0?source=rss-c496a816d0c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b9ac711dbd0</guid>
            <category><![CDATA[openclaw-tutorial]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[zizkadb]]></category>
            <category><![CDATA[openclaw]]></category>
            <dc:creator><![CDATA[Mir Arshad Ali]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 11:15:51 GMT</pubDate>
            <atom:updated>2026-11-12T11:15:51.515Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gOVuoCa1ZJuKm3C-tGwX0g.jpeg" /><figcaption>zizkadb with openclaw</figcaption></figure><p>If you run agents on OpenClaw, you already have logs. What you probably do not have is a record that answers three questions after something goes wrong: what did the agent receive, which tool call followed because of it, and can anyone show the record was not edited afterwards? This guide shows how to add ZizkaDB to OpenClaw with the ZizkaDB plugin, so each turn is recorded as a causally linked, tamper-evident audit trail.</p><p>The setup takes a few minutes. The business value is that the next time an agent sends the wrong message or calls the wrong tool, you replay the turn instead of guessing.</p><p>A note on scope. ZizkaDB is an independent project and is not affiliated with or endorsed by OpenClaw. The plugin details below come from the plugin’s ClawHub listing (version 0.1.1 when we checked on 12 November 2026) and OpenClaw’s plugin documentation. Plugin versions change, so check the listing before you rely on a specific option.</p><h3>What you get</h3><p>The ZizkaDB plugin records each OpenClaw agent turn in ZizkaDB. According to its listing, recorded items include messages, tool calls, model outputs, token usage and replies. Each OpenClaw turn becomes one hash chain, and each conversation session maps to a ZizkaDB session. Tamper evidence comes from per agent hash chaining, which you can verify through the ZizkaDB API.</p><p>Two design choices make it safe to try. The plugin is observe-only: it does not block, alter or delay messages or tool calls, and a failed write does not affect the agent. And the optional in-agent tools are off by default.</p><h3>Before you start</h3><p>You need three things:</p><ol><li>A running OpenClaw gateway. The plugin records inside the running gateway, so it covers chat channels, cron jobs and openclaw agent turns.</li><li>A ZizkaDB server. Use ZizkaDB Cloud at db.zizka.ai with an API key, or self host the open source server, which runs from a single docker command.</li><li>A supported Node.js version. The listing names Node.js 24.16 or later, which it describes as OpenClaw’s own requirement.</li></ol><h3>Step 1: install the plugin</h3><p>From ClawHub, run:</p><p>bash</p><pre>openclaw plugins install clawhub:@zizka-ai/zizkadb</pre><p>You can also install it from npm. Installs from outside ClawHub need the force flag:</p><p>bash</p><pre>openclaw plugins install npm:zizkadb-openclaw --force</pre><p>OpenClaw asks you to approve the plugin’s permissions during install. In scripts, you can pass the accept capabilities flag instead of answering the prompt. Read the permission list before approving, as you would for any plugin that touches conversation data.</p><p>OpenClaw documents the clawhub and npm source prefixes so you can pick the source explicitly. Without a prefix, bare package names may resolve differently depending on your OpenClaw version.</p><h3>Step 2: configure openclaw.json</h3><p>Edit the OpenClaw config file, usually at ~/.openclaw/openclaw.json, and restart the gateway afterwards. The listing names these settings:</p><ul><li>plugins.allow should include zizkadb.</li><li>plugins.entries.zizkadb.enabled should be true.</li><li>hooks.allowConversationAccess should be true if you want model outputs and token usage recorded. Without it, messages and tool activity are still recorded, and the gateway log notes the gap at startup.</li><li>config.apiKey holds your ZizkaDB key, from Cloud settings or your own server.</li><li>config.host is the server URL for self hosted use, for example <a href="http://localhost:8000/">http://localhost:8000</a>.</li><li>config.agent is the agent name inside ZizkaDB. The default is openclaw.</li><li>config.captureContent controls whether content is stored (see Step 5).</li></ul><p>You can use the environment variables ZIZKADB_API_KEY and ZIZKADB_HOST instead of putting the key and host in the file. That keeps secrets out of a config you might commit or share. An illustrative layout, to be checked against the listing:</p><p>json</p><pre>{<br>  &quot;plugins&quot;: {<br>    &quot;allow&quot;: [&quot;zizkadb&quot;],<br>    &quot;entries&quot;: {<br>      &quot;zizkadb&quot;: {<br>        &quot;enabled&quot;: true,<br>        &quot;config&quot;: { &quot;host&quot;: &quot;http://localhost:8000&quot;, &quot;agent&quot;: &quot;support-bot&quot; }<br>      }<br>    }<br>  },<br>  &quot;hooks&quot;: { &quot;allowConversationAccess&quot;: true }<br>}</pre><p>Give each agent its own name through config.agent. ZizkaDB keeps a hash chain per agent, so distinct names keep your audit trails separate.</p><h3>Step 3: verify it loaded</h3><p>OpenClaw’s plugin documentation describes an inspect command with a runtime flag for proving that a plugin registered its hooks and tools:</p><p>bash</p><pre>openclaw plugins inspect zizkadb --runtime --json</pre><p>Then send your agent a message through a normal channel and open the ZizkaDB dashboard. You should see a session with the turn in it. If nothing appears, check that the gateway was restarted after the config change, and remember that one-shot openclaw agent — local runs are not recorded, because recording happens in the running gateway.</p><h3>Step 4: see what gets recorded</h3><p>The listing maps OpenClaw hooks to ZizkaDB events:</p><p>What happens in OpenClawZizkaDB eventWhat is capturedA message arrivesuser_messageText, sender, media countA tool is calledtool_call, then tool_result or tool_errorTool name, arguments, result or error, durationThe model answersllm_endProvider, model, answer, token usageA reply is sentassistant_responseSent text, delivery successA run failsagent_errorError, duration</p><p>Events carry metadata including the source, the agent ID and the channel. Values longer than 8,000 characters are truncated, so very long tool results are stored in shortened form.</p><p>For a business reader, the useful part is the chain. A user message leads to a tool call, which leads to a result, which leads to a reply. When the reply is wrong, you start from it and walk backwards.</p><h3>Step 5: decide what content to store</h3><p>Conversation content can be sensitive. The plugin gives you a switch. When config.captureContent is false, prompts, replies, tool arguments and tool results are not stored. Tool names, models, token usage and errors are still recorded.</p><p>A sensible approach is to start with content capture off for any agent that handles personal or regulated data, and turn it on only where you have a reason and a legal basis for keeping it. You keep the shape of what happened, which tools ran, how often they failed and what they cost, without keeping the words. Whether you may store a given conversation depends on your data protection obligations, so check with whoever owns that for your organisation.</p><h3>Step 6: add the optional in-agent tools</h3><p>Two tools are off by default: zizkadb_why, which returns the causal chain behind an event, and zizkadb_search, which searches past events. Enable them with tools.alsoAllow set to both names.</p><p>Per the listing, each tool is limited to the current conversation, the scope comes from OpenClaw’s trusted session context and not from model arguments, and results are labelled as untrusted historical data. Agent wide audits need the dashboard or the SDK with your own key. That design matters: an agent can look back at its own conversation without being able to read other customers’ histories.</p><h3>Step 7: query the trail</h3><p>For investigation outside the agent, use the zizkadb-sdk package. According to the listing, db.query finds recent events and db.why walks back the causal chain from an event. A minimal sketch, with parameter names to be checked against the SDK reference:</p><p>python</p><pre>recent = await db.query(agent=&quot;support-bot&quot;, event=&quot;tool_error&quot;, limit=20)<br>(await db.why(recent[0].id)).print()</pre><p>The dashboard shows sessions, the causal graph, tool error rates and token costs, which is useful for the people who do not write code: support leads, finance and compliance.</p><h3>Step 8: verify the chain and keep the head somewhere else</h3><p>A per agent hash chain makes later edits to the record detectable. You can check it through the chain endpoint at GET /v1/events/chain. Run the check on a schedule and store the chain head outside the ZizkaDB database, for example in a separate system, so that nobody with database access can rewrite both the history and its head. The chain shows that the record is unchanged. It does not show that the agent was right.</p><h3>Gotchas</h3><ul><li>Restart the gateway after any config change. The plugin runs inside it.</li><li>Without hooks.allowConversationAccess, you lose model outputs and token usage. Messages and tool activity still record.</li><li>One-shot local runs are not recorded.</li><li>Long values are truncated at 8,000 characters.</li><li>Installing from npm outside ClawHub needs the force flag.</li><li>Do not paste API keys into shared config files. Use the environment variables.</li></ul><h3>Why this matters beyond debugging</h3><p>Three business outcomes follow from this setup.</p><p><strong>Faster incident response.</strong> When a customer complains about an agent action, you open the turn, read the chain and answer in minutes.</p><p><strong>Cost visibility.</strong> Token usage is recorded per model call, so you can see which agents and tools drive spend.</p><p><strong>Evidence for oversight and record keeping.</strong> If your agents fall under rules such as EU AI Act Article 12 on automatic event recording for high risk systems, a causally linked, tamper-evident record is the kind of evidence that points toward. Whether a given system is high risk depends on what it does. ZizkaDB supports record keeping and investigation. It is not legal advice and does not by itself make any system compliant with the EU AI Act or any other law.</p><p>If your OpenClaw agents also read content from other agents, for instance on a social network such as Moltbook, which researchers have reported runs mostly on OpenClaw agents, the same trail lets you trace what an agent read before it acted. ZizkaDB records that. It cannot tell whether content was malicious or true, and it does not stop an agent from being persuaded.</p><h3>Limits to remember</h3><p>The plugin records. It does not block or filter anything, so it complements least privilege and sandboxing and does not replace them. The ClawHub listing shows an automated security scan as passing, which is an automated check and not a guarantee, so review the permissions yourself. The open source edition of ZizkaDB records one agent per install, and fleets or agent to agent tracing use the Cloud edition.</p><h3>Get started</h3><p>Install the plugin, give one agent its own name, run it for a day with content capture off, and open the dashboard. Then pick a single tool call and run why() on it. That is the first answer your current logs cannot give.</p><p>Corrections: if you represent a party named here and believe a statement is inaccurate, contact us and we will review it promptly.</p><p>Sources: ClawHub listing for the ZizkaDB OpenClaw plugin (clawhub.ai/zizka-ai/plugins/zizkadb); OpenClaw documentation, Plugins and Manage plugins (docs.openclaw.ai).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b9ac711dbd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>