<?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: duchuAZ</title>
    <description>The latest articles on DEV Community by duchuAZ (@duchu).</description>
    <link>https://dev.to/duchu</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%2F4137499%2F3c26bb9e-753a-4857-8801-14c44baf3888.jpg</url>
      <title>DEV Community: duchuAZ</title>
      <link>https://dev.to/duchu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/duchu"/>
    <language>en</language>
    <item>
      <title>I added long-term memory to my chatbot with Walrus — here is what changed</title>
      <dc:creator>duchuAZ</dc:creator>
      <pubDate>Tue, 22 Sep 2026 11:27:41 +0000</pubDate>
      <link>https://dev.to/duchu/i-added-long-term-memory-to-my-chatbot-with-walrus-here-is-what-changed-1im9</link>
      <guid>https://dev.to/duchu/i-added-long-term-memory-to-my-chatbot-with-walrus-here-is-what-changed-1im9</guid>
      <description>&lt;p&gt;Chatbots are goldfish. Every session starts from zero: preferences, past&lt;br&gt;
decisions, ongoing work — gone. I fixed that on my bot with &lt;strong&gt;Walrus Memory&lt;br&gt;
(MemWal)&lt;/strong&gt;: conversations persist and get recalled across sessions and users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I built:&lt;/strong&gt; a support/dev-assistant chatbot. Before memory: "what did we&lt;br&gt;
decide about the API retry policy?" → blank stare. After MemWal &lt;code&gt;remember&lt;/code&gt; +&lt;br&gt;
&lt;code&gt;recall&lt;/code&gt;: it pulls the earlier decision with relevance-ranked results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How the integration looks (TypeScript SDK):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;memwal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;rememberAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Team decided: retry policy = 3 attempts, backoff 2s&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;memwal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;retry policy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// hits[] -&amp;gt; { text, distance } -&amp;gt; inject top hits into the prompt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Memories are encrypted client-side (SEAL), stored as blobs on Walrus, committed&lt;br&gt;
on Sui. The SDK also ships a mock (&lt;code&gt;MemWalMock&lt;/code&gt;) so tests run without a relayer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before/after, honestly:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before: repeated questions, users re-explaining context every session.&lt;/li&gt;
&lt;li&gt;After: follow-ups like "that retry thing we agreed on" resolve correctly.&lt;/li&gt;
&lt;li&gt;Cost: one &lt;code&gt;remember&lt;/code&gt; call per durable fact, one &lt;code&gt;recall&lt;/code&gt; per turn. Latency of
recall is the main thing to watch — keep &lt;code&gt;limit&lt;/code&gt; small (3-5) and cache hot facts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Reproducible:&lt;/strong&gt; public repo + setup instructions in the full write-up&lt;br&gt;
(link article khi có). Built during Walrus Session 8 — memwal/mcp + &lt;code&gt;@mysten-incubation/memwal&lt;/code&gt;&lt;br&gt;
on mainnet, 10+ blobs.&lt;/p&gt;

&lt;p&gt;If you maintain a bot (support, onboarding, tutoring, community), persistent&lt;br&gt;
memory is the highest-ROI upgrade I have made. Questions welcome — happy to&lt;br&gt;
share the recall-prompt wiring.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
