<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aly</title>
    <description>The latest articles on DEV Community by Aly (@sawftware).</description>
    <link>https://dev.to/sawftware</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3987833%2Feeb02d8d-865d-4a29-a254-2bcd9ff35f77.png</url>
      <title>DEV Community: Aly</title>
      <link>https://dev.to/sawftware</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sawftware"/>
    <language>en</language>
    <item>
      <title>How We Built Tamper-Evident Document Memory for AI Agents</title>
      <dc:creator>Aly</dc:creator>
      <pubDate>Sun, 21 Jun 2026 17:49:10 +0000</pubDate>
      <link>https://dev.to/sawftware/how-we-built-tamper-evident-document-memory-for-ai-agents-1fh8</link>
      <guid>https://dev.to/sawftware/how-we-built-tamper-evident-document-memory-for-ai-agents-1fh8</guid>
      <description>&lt;p&gt;When we started building DocImprint, we kept running into the same problem that nobody was talking about.&lt;/p&gt;

&lt;p&gt;AI agents were getting good at &lt;em&gt;reading&lt;/em&gt; documents — PDFs, web pages, scanned invoices. But there was no way to &lt;em&gt;prove&lt;/em&gt; what they had read. No receipt. No audit trail. Just the agent's word for it.&lt;/p&gt;

&lt;p&gt;In legal, compliance, and financial workflows, that's a dealbreaker.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core problem with RAG today
&lt;/h2&gt;

&lt;p&gt;Most RAG pipelines work like this: chunk a document, embed it, store it, retrieve it at query time. The LLM generates an answer with citations. Looks great in a demo.&lt;/p&gt;

&lt;p&gt;But those citations are soft references. There's nothing stopping the source document from being modified after ingestion. Nothing proving the chunk the agent retrieved matches what was in the original file. And no offline way to verify any of it.&lt;/p&gt;

&lt;p&gt;For developers building internal tools, that's fine. For teams building AI that touches contracts, compliance reports, or regulated data — it isn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;DocImprint is a document extraction API that produces &lt;strong&gt;evidence bundles&lt;/strong&gt; alongside every extraction. Each bundle contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The extracted content (structured JSON or markdown)&lt;/li&gt;
&lt;li&gt;A SHA-256 hash of the source document&lt;/li&gt;
&lt;li&gt;A secp256k1 signature over the extraction + hash&lt;/li&gt;
&lt;li&gt;A Merkle proof tying the content to the source&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The signature is verifiable offline. Anyone with the bundle can independently confirm that the extracted content came from that exact document, unchanged, at the time of extraction.&lt;/p&gt;

&lt;p&gt;A basic API call looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://api.docimprint.com/v1/extract &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "url": "https://example.com/contract.pdf",
    "formats": ["markdown", "evidence"]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response includes both the extraction and the full evidence bundle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"markdown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"# Service Agreement&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;This agreement is entered into..."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"evidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"document_hash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sha256:a3f1c2d..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"signature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0x4a8b2e..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"merkle_root"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0xf9c3a1..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"verified_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-06-21T14:32:00Z"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store the bundle alongside your RAG chunks and you have an auditable chain of custody from source document to LLM context.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP integration
&lt;/h2&gt;

&lt;p&gt;For agent builders using the Model Context Protocol, DocImprint exposes 14 tools at &lt;code&gt;api.docimprint.com/mcp&lt;/code&gt; — including &lt;code&gt;extract_document&lt;/code&gt;, &lt;code&gt;verify_bundle&lt;/code&gt;, and &lt;code&gt;get_evidence&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Your agent can extract a document and verify its own prior extractions in the same session. No extra infrastructure. The MCP server handles auth, extraction, and proof generation in a single tool call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Offline verification
&lt;/h2&gt;

&lt;p&gt;The verification step is intentionally offline.&lt;/p&gt;

&lt;p&gt;You don't need to call our API to prove an extraction is valid — the cryptographic proof is self-contained in the bundle. This matters for compliance scenarios where you can't depend on a third-party service being available during an audit, or where the verifying party has no API access.&lt;/p&gt;

&lt;p&gt;A verifier just needs the bundle and our public key. That's it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits in your stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;What DocImprint adds&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RAG over legal documents&lt;/td&gt;
&lt;td&gt;Prove each chunk came from the original filing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI-generated compliance reports&lt;/td&gt;
&lt;td&gt;Audit trail linking every claim to a source document&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent pipelines reading web content&lt;/td&gt;
&lt;td&gt;Tamper-evident snapshot at time of capture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP-native agents&lt;/td&gt;
&lt;td&gt;Native tool calls for extract + verify in one session&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;We're in early access at &lt;a href="https://docimprint.com/try" rel="noopener noreferrer"&gt;docimprint.com/try&lt;/a&gt;. Free tier covers 100 extractions/month.&lt;/p&gt;

&lt;p&gt;If you're building RAG pipelines that touch regulated content, or agentic workflows where document provenance matters — we'd genuinely love your feedback. Drop a comment or reach out directly.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>agents</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
