<?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: SATHWIK ADDENKI</title>
    <description>The latest articles on DEV Community by SATHWIK ADDENKI (@sathwik_addenki_bd407b3d6).</description>
    <link>https://dev.to/sathwik_addenki_bd407b3d6</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%2F4150073%2F65686b1b-a776-4a65-8021-6ee380bb6431.png</url>
      <title>DEV Community: SATHWIK ADDENKI</title>
      <link>https://dev.to/sathwik_addenki_bd407b3d6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sathwik_addenki_bd407b3d6"/>
    <language>en</language>
    <item>
      <title>Designing an AI Memory Interface Users Can Actually Understand</title>
      <dc:creator>SATHWIK ADDENKI</dc:creator>
      <pubDate>Tue, 29 Sep 2026 15:40:33 +0000</pubDate>
      <link>https://dev.to/sathwik_addenki_bd407b3d6/designing-an-ai-memory-interface-users-can-actually-understand-7ja</link>
      <guid>https://dev.to/sathwik_addenki_bd407b3d6/designing-an-ai-memory-interface-users-can-actually-understand-7ja</guid>
      <description>&lt;p&gt;A renewal quote rarely contains the whole story of a vendor relationship.&lt;/p&gt;

&lt;p&gt;It might list a price, a seat count, and a contract period while leaving out a concession negotiated in a meeting months earlier.&lt;/p&gt;

&lt;p&gt;An AI system can summarize that quote perfectly and still miss the important question:&lt;/p&gt;

&lt;p&gt;Does this document respect what the vendor previously promised?&lt;/p&gt;

&lt;p&gt;That question led me to build PactTrace, a vendor intelligence application centered on persistent memory.&lt;/p&gt;

&lt;p&gt;PactTrace connects past vendor commitments with present decisions. Groq extracts and compares information, Hindsight retains and recalls relationship history, and PactTrace validates the resulting evidence before it reaches the user.&lt;/p&gt;

&lt;p&gt;The example in this article uses synthetic vendor data. I am not claiming measured savings or production customer usage.&lt;/p&gt;

&lt;p&gt;The difference a memory makes&lt;/p&gt;

&lt;p&gt;Consider a vendor called CloudNova.&lt;/p&gt;

&lt;p&gt;During an earlier interaction, CloudNova agreed to:&lt;br&gt;
f&lt;/p&gt;

&lt;p&gt;waive the onboarding fee&lt;/p&gt;

&lt;p&gt;provide a 15% renewal discount&lt;/p&gt;

&lt;p&gt;apply that discount if the account exceeds 100 seats&lt;/p&gt;

&lt;p&gt;Months later, a renewal quote arrives for 130 seats.&lt;/p&gt;

&lt;p&gt;The quote says:&lt;/p&gt;

&lt;p&gt;CloudNova renewal quote for 130 seats is ₹460000 annually. The quote does not include any renewal discount.&lt;/p&gt;

&lt;p&gt;If I analyze only this new quote, there is no way for the system to know that CloudNova previously promised a 15% discount.&lt;/p&gt;

&lt;p&gt;The latest quote is simply another document.&lt;/p&gt;

&lt;p&gt;The missing information cannot be recovered by writing a better prompt. The system needs access to the earlier relationship history.&lt;/p&gt;

&lt;p&gt;That is where persistent memory changes the problem.&lt;/p&gt;

&lt;p&gt;With Hindsight, PactTrace can recall the earlier CloudNova commitment when the new quote arrives.&lt;/p&gt;

&lt;p&gt;The comparison now has two independent sources.&lt;/p&gt;

&lt;p&gt;Historical memory:&lt;/p&gt;

&lt;p&gt;CloudNova promised a 15% renewal discount if the account exceeds 100 seats.&lt;/p&gt;

&lt;p&gt;Current evidence:&lt;/p&gt;

&lt;p&gt;The quote does not include any renewal discount.&lt;/p&gt;

&lt;p&gt;The new quote is for 130 seats, so the historical condition is satisfied.&lt;/p&gt;

&lt;p&gt;Now the system has enough evidence to surface a potential conflict.&lt;/p&gt;

&lt;p&gt;The useful improvement is not more fluent language.&lt;/p&gt;

&lt;p&gt;It is access to relevant history.&lt;/p&gt;

&lt;p&gt;For a deeper explanation of why this matters for agents, Vectorize has a useful overview of agent memory.&lt;/p&gt;

&lt;p&gt;![&lt;/p&gt;

&lt;p&gt;From a vendor conversation to persistent memory&lt;/p&gt;

&lt;p&gt;The PactTrace capture flow starts with three pieces of information:&lt;/p&gt;

&lt;p&gt;vendor&lt;/p&gt;

&lt;p&gt;interaction text&lt;/p&gt;

&lt;p&gt;source, such as a meeting&lt;/p&gt;

&lt;p&gt;A Next.js API route validates those fields before sending the interaction to Groq.&lt;/p&gt;

&lt;p&gt;Groq converts the unstructured conversation into structured commitments containing fields such as:&lt;/p&gt;

&lt;p&gt;type&lt;/p&gt;

&lt;p&gt;description&lt;/p&gt;

&lt;p&gt;value&lt;/p&gt;

&lt;p&gt;condition&lt;/p&gt;

&lt;p&gt;deadline&lt;/p&gt;

&lt;p&gt;status&lt;/p&gt;

&lt;p&gt;The extraction is intentionally conservative.&lt;/p&gt;

&lt;p&gt;If a value, deadline, or condition is not present, the application does not ask the model to invent one.&lt;/p&gt;

&lt;p&gt;After extraction, PactTrace creates memories for both the original vendor interaction and the individual commitments.&lt;/p&gt;

&lt;p&gt;Those memories are then stored in Hindsight.&lt;/p&gt;

&lt;p&gt;This is part of the real retention path used by PactTrace:&lt;/p&gt;

&lt;p&gt;const result = await getHindsightClient().retainBatch(&lt;br&gt;
bankId,&lt;br&gt;
items,&lt;br&gt;
{&lt;br&gt;
async: false,&lt;br&gt;
signal: AbortSignal.timeout(60_000),&lt;br&gt;
},&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;if (&lt;br&gt;
!result.success ||&lt;br&gt;
result.async ||&lt;br&gt;
result.items_count !== items.length&lt;br&gt;
) {&lt;br&gt;
throw new Error("Hindsight did not confirm the complete batch");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;I deliberately keep the original interaction in addition to the structured commitments.&lt;/p&gt;

&lt;p&gt;The structured representation makes later comparisons easier, while retaining the source interaction preserves context that might matter for future questions.&lt;/p&gt;

&lt;p&gt;Each retained item also includes metadata such as:&lt;/p&gt;

&lt;p&gt;vendor&lt;/p&gt;

&lt;p&gt;source&lt;/p&gt;

&lt;p&gt;interaction ID&lt;/p&gt;

&lt;p&gt;memory type&lt;/p&gt;

&lt;p&gt;commitment type&lt;/p&gt;

&lt;p&gt;Hindsight therefore acts as the persistent relationship-memory layer rather than browser state or temporary prompt context.&lt;/p&gt;

&lt;p&gt;The Hindsight documentation explains the retain and recall model in more detail.&lt;/p&gt;

&lt;p&gt;Recall happens before analysis&lt;/p&gt;

&lt;p&gt;When a user submits a new quote, PactTrace does not immediately ask the LLM to analyze it.&lt;/p&gt;

&lt;p&gt;The application first asks Hindsight for relevant historical vendor information.&lt;/p&gt;

&lt;p&gt;The recall request looks for things such as:&lt;/p&gt;

&lt;p&gt;previous commitments&lt;/p&gt;

&lt;p&gt;discounts&lt;/p&gt;

&lt;p&gt;pricing promises&lt;/p&gt;

&lt;p&gt;fee waivers&lt;/p&gt;

&lt;p&gt;conditions&lt;/p&gt;

&lt;p&gt;negotiation history&lt;/p&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;p&gt;The model is not being asked:&lt;/p&gt;

&lt;p&gt;“What might this vendor have promised?”&lt;/p&gt;

&lt;p&gt;Historical information must come from stored memory.&lt;/p&gt;

&lt;p&gt;PactTrace then filters the recalled results before they are used.&lt;/p&gt;

&lt;p&gt;A vendor name appearing in a semantic query is not enough to guarantee isolation. The application checks the vendor metadata written during retention.&lt;/p&gt;

&lt;p&gt;The relevant logic is straightforward:&lt;/p&gt;

&lt;p&gt;const owner = memory.metadata?.vendor;&lt;/p&gt;

&lt;p&gt;if (&lt;br&gt;
!owner ||&lt;br&gt;
normalizeVendor(owner) !== normalizedVendor ||&lt;br&gt;
!memory.text.trim()&lt;br&gt;
) {&lt;br&gt;
return [];&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;This prevents an unrelated or unlabelled recalled fact from silently entering another vendor's comparison.&lt;/p&gt;

&lt;p&gt;Repeated memories are also deduplicated conservatively.&lt;/p&gt;

&lt;p&gt;PactTrace keeps Hindsight's relevance order and selects at most five memories for the actual quote comparison.&lt;/p&gt;

&lt;p&gt;That gives the model enough relationship context without blindly sending every retrieved object into the prompt.&lt;/p&gt;

&lt;p&gt;Evidence has to survive validation&lt;/p&gt;

&lt;p&gt;Using memory solves one problem, but it creates another:&lt;/p&gt;

&lt;p&gt;How do I know the model is not inventing the evidence it claims to be using?&lt;/p&gt;

&lt;p&gt;I decided not to trust the comparison result automatically.&lt;/p&gt;

&lt;p&gt;Groq returns a structured response containing information such as:&lt;/p&gt;

&lt;p&gt;historical commitment&lt;/p&gt;

&lt;p&gt;current quote evidence&lt;/p&gt;

&lt;p&gt;memory ID&lt;/p&gt;

&lt;p&gt;condition&lt;/p&gt;

&lt;p&gt;condition status&lt;/p&gt;

&lt;p&gt;result status&lt;/p&gt;

&lt;p&gt;severity&lt;/p&gt;

&lt;p&gt;explanation&lt;/p&gt;

&lt;p&gt;recommendation&lt;/p&gt;

&lt;p&gt;PactTrace validates those fields on the server.&lt;/p&gt;

&lt;p&gt;A historical quotation must actually exist in the recalled memory.&lt;/p&gt;

&lt;p&gt;A current quotation must actually exist in the quote supplied by the user.&lt;/p&gt;

&lt;p&gt;A returned memory ID must refer to a memory that was really included in the analysis.&lt;/p&gt;

&lt;p&gt;If a condition is returned, that condition must also come from the associated historical memory.&lt;/p&gt;

&lt;p&gt;This allows PactTrace to reject invented evidence, unknown references, and paraphrases presented as quotations.&lt;/p&gt;

&lt;p&gt;The system uses three main result states.&lt;/p&gt;

&lt;p&gt;Potential conflict&lt;/p&gt;

&lt;p&gt;Explicit evidence suggests that an applicable historical promise is contradicted by the current quote.&lt;/p&gt;

&lt;p&gt;Honored&lt;/p&gt;

&lt;p&gt;Current evidence explicitly shows that the promise was fulfilled.&lt;/p&gt;

&lt;p&gt;Insufficient evidence&lt;/p&gt;

&lt;p&gt;There is not enough information to support either conclusion.&lt;/p&gt;

&lt;p&gt;That final state turned out to be especially important.&lt;/p&gt;

&lt;p&gt;Silence is not proof&lt;/p&gt;

&lt;p&gt;Suppose CloudNova previously promised to waive the onboarding fee.&lt;/p&gt;

&lt;p&gt;The later renewal quote only discusses annual pricing.&lt;/p&gt;

&lt;p&gt;It does not say:&lt;/p&gt;

&lt;p&gt;The onboarding fee will be charged.&lt;/p&gt;

&lt;p&gt;But it also does not confirm:&lt;/p&gt;

&lt;p&gt;The onboarding fee remains waived.&lt;/p&gt;

&lt;p&gt;It would be tempting for an AI system to classify that promise as violated simply because the quote does not mention the waiver.&lt;/p&gt;

&lt;p&gt;PactTrace does not do that.&lt;/p&gt;

&lt;p&gt;Instead, it returns insufficient evidence.&lt;/p&gt;

&lt;p&gt;The same principle applies to conditions.&lt;/p&gt;

&lt;p&gt;A historical condition can be:&lt;/p&gt;

&lt;p&gt;met&lt;/p&gt;

&lt;p&gt;not_met&lt;/p&gt;

&lt;p&gt;unknown&lt;/p&gt;

&lt;p&gt;not_applicable&lt;/p&gt;

&lt;p&gt;Unknown or unmet conditions cannot support a potential conflict in PactTrace.&lt;/p&gt;

&lt;p&gt;For the CloudNova discount, however, the evidence is stronger.&lt;/p&gt;

&lt;p&gt;The historical commitment says the discount applies when the account exceeds 100 seats.&lt;/p&gt;

&lt;p&gt;The quote explicitly says 130 seats.&lt;/p&gt;

&lt;p&gt;130 is greater than 100.&lt;/p&gt;

&lt;p&gt;The quote also explicitly says that no renewal discount is included.&lt;/p&gt;

&lt;p&gt;That is enough evidence for PactTrace to surface a high-severity potential conflict.&lt;/p&gt;

&lt;p&gt;I intentionally use the term potential conflict rather than violation or legal breach.&lt;/p&gt;

&lt;p&gt;The application is providing negotiation evidence, not making a legal determination.&lt;/p&gt;

&lt;p&gt;Making memory visible in the interface&lt;/p&gt;

&lt;p&gt;I did not want Hindsight to become an invisible backend feature.&lt;/p&gt;

&lt;p&gt;The PactTrace dashboard exposes the memory workflow directly:&lt;/p&gt;

&lt;p&gt;Capture → Remember → Recall → Verify → Act&lt;/p&gt;

&lt;p&gt;After an analysis, the interface displays:&lt;/p&gt;

&lt;p&gt;number of memories recalled&lt;/p&gt;

&lt;p&gt;historical evidence&lt;/p&gt;

&lt;p&gt;current evidence&lt;/p&gt;

&lt;p&gt;condition status&lt;/p&gt;

&lt;p&gt;severity&lt;/p&gt;

&lt;p&gt;commitment ledger&lt;/p&gt;

&lt;p&gt;recommendation&lt;/p&gt;

&lt;p&gt;memory timeline&lt;/p&gt;

&lt;p&gt;negotiation brief&lt;/p&gt;

&lt;p&gt;The timeline records application events such as quote submission, Hindsight recall, and completed comparison.&lt;/p&gt;

&lt;p&gt;It is not hidden model reasoning.&lt;/p&gt;

&lt;p&gt;That distinction matters because I wanted users to understand what the system did, without pretending to expose internal model reasoning.&lt;/p&gt;

&lt;p&gt;The final negotiation brief converts the comparison into something more useful than a generic AI response.&lt;/p&gt;

&lt;p&gt;For CloudNova, the recommendation is essentially:&lt;/p&gt;

&lt;p&gt;Ask the vendor to confirm the onboarding-fee waiver and provide a revised quote applying the promised 15% renewal discount to the 130-seat account.&lt;/p&gt;

&lt;p&gt;That is the final step of the workflow:&lt;/p&gt;

&lt;p&gt;memory becomes action.&lt;/p&gt;

&lt;p&gt;Handling provider failures without faking success&lt;/p&gt;

&lt;p&gt;External AI services fail.&lt;/p&gt;

&lt;p&gt;Rate limits happen. Network requests time out. Structured model responses can fail validation.&lt;/p&gt;

&lt;p&gt;PactTrace includes bounded retry behavior for selected Groq failures.&lt;/p&gt;

&lt;p&gt;Rate limits and transient server failures can be retried at most twice.&lt;/p&gt;

&lt;p&gt;Short Retry-After instructions are respected.&lt;/p&gt;

&lt;p&gt;If the provider asks the application to wait longer than the request budget allows, PactTrace fails safely instead of retrying too early.&lt;/p&gt;

&lt;p&gt;There is also one bounded correction attempt if the structured comparison fails schema or evidence validation.&lt;/p&gt;

&lt;p&gt;What I did not want was a system that weakens its validator simply to produce a successful-looking response.&lt;/p&gt;

&lt;p&gt;Retention has another subtle failure mode.&lt;/p&gt;

&lt;p&gt;If a memory-storage request times out, the data might already have reached the provider.&lt;/p&gt;

&lt;p&gt;For that reason, PactTrace does not blindly retry Hindsight retention or claim that the operation rolled back.&lt;/p&gt;

&lt;p&gt;It reports uncertainty instead.&lt;/p&gt;

&lt;p&gt;That is less convenient than saying everything succeeded, but it is more accurate.&lt;/p&gt;

&lt;p&gt;What I learned&lt;/p&gt;

&lt;p&gt;Building PactTrace changed how I think about AI application architecture.&lt;/p&gt;

&lt;p&gt;Memory is not the same thing as a larger prompt&lt;br&gt;
A larger context window can process information you provide now.&lt;/p&gt;

&lt;p&gt;Persistent memory allows a future request to recover information that was captured earlier.&lt;/p&gt;

&lt;p&gt;That changes what the application can know at decision time.&lt;/p&gt;

&lt;p&gt;Retrieval still needs boundaries&lt;br&gt;
Semantic recall is powerful, but retrieval alone is not enough.&lt;/p&gt;

&lt;p&gt;I still need metadata checks, conservative deduplication, vendor filtering, and careful selection before recalled information reaches the model.&lt;/p&gt;

&lt;p&gt;Structured output still needs validation&lt;br&gt;
A JSON schema controls shape.&lt;/p&gt;

&lt;p&gt;It does not automatically prove that the values inside the JSON are supported by the source material.&lt;/p&gt;

&lt;p&gt;Grounding checks still matter.&lt;/p&gt;

&lt;p&gt;Uncertainty should be part of the product&lt;br&gt;
“Insufficient evidence” is sometimes a much better result than an impressive but unsupported conclusion.&lt;/p&gt;

&lt;p&gt;Not every missing term is a conflict.&lt;/p&gt;

&lt;p&gt;Not every unclear condition should be guessed.&lt;/p&gt;

&lt;p&gt;Memory should be visible&lt;br&gt;
Showing the historical promise, new evidence, condition state, and recommendation makes the system easier to review.&lt;/p&gt;

&lt;p&gt;The user can understand why the application surfaced an issue instead of receiving a mysterious final answer.&lt;/p&gt;

&lt;p&gt;Where PactTrace can go next&lt;/p&gt;

&lt;p&gt;The current architecture focuses on the core memory and evidence workflow.&lt;/p&gt;

&lt;p&gt;A larger enterprise version would need additional infrastructure including:&lt;/p&gt;

&lt;p&gt;organization identity&lt;/p&gt;

&lt;p&gt;authentication and authorization&lt;/p&gt;

&lt;p&gt;tenant-specific memory-bank isolation&lt;/p&gt;

&lt;p&gt;durable write idempotency&lt;/p&gt;

&lt;p&gt;access-controlled audit trails&lt;/p&gt;

&lt;p&gt;persistent multi-vendor workspaces&lt;/p&gt;

&lt;p&gt;verified financial exposure calculations&lt;/p&gt;

&lt;p&gt;stronger operational monitoring&lt;/p&gt;

&lt;p&gt;I intentionally leave financial impact unset today because the application does not yet have a verified baseline, currency, contract-period, and pricing calculator.&lt;/p&gt;

&lt;p&gt;It is better to return no financial number than manufacture one.&lt;/p&gt;

&lt;p&gt;The core idea remains the same:&lt;/p&gt;

&lt;p&gt;A later decision becomes more useful when the agent can recover relevant evidence from an earlier interaction.&lt;/p&gt;

&lt;p&gt;Hindsight provides that persistent memory layer.&lt;/p&gt;

&lt;p&gt;Groq provides structured extraction and comparison.&lt;/p&gt;

&lt;p&gt;PactTrace connects the two with validation and a workflow designed around real vendor decisions.&lt;/p&gt;

&lt;p&gt;Remembering the relationship is what turns an isolated quote into a meaningful negotiation question.&lt;/p&gt;

&lt;p&gt;Project links&lt;/p&gt;

&lt;p&gt;PactTrace source code:&lt;br&gt;
&lt;a href="https://github.com/v9vek26/pacttrace" rel="noopener noreferrer"&gt;https://github.com/v9vek26/pacttrace&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Live PactTrace application:&lt;br&gt;
&lt;a href="https://pacttrace.vercel.app" rel="noopener noreferrer"&gt;https://pacttrace.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hindsight GitHub:&lt;br&gt;
&lt;a href="https://github.com/vectorize-io/hindsight" rel="noopener noreferrer"&gt;https://github.com/vectorize-io/hindsight&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hindsight documentation:&lt;br&gt;
&lt;a href="https://hindsight.vectorize.io/" rel="noopener noreferrer"&gt;https://hindsight.vectorize.io/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vectorize guide to agent memory:&lt;br&gt;
&lt;a href="https://vectorize.io/articles/agent-memory-vs-rag" rel="noopener noreferrer"&gt;https://vectorize.io/articles/agent-memory-vs-rag&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>ux</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
