<?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: quanghuyaz909</title>
    <description>The latest articles on DEV Community by quanghuyaz909 (@quanghuyaz909).</description>
    <link>https://dev.to/quanghuyaz909</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%2F4164677%2F9b3a51c7-8ff6-425f-836a-3a93f705a059.png</url>
      <title>DEV Community: quanghuyaz909</title>
      <link>https://dev.to/quanghuyaz909</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/quanghuyaz909"/>
    <language>en</language>
    <item>
      <title>How I built a chatbot that remembers you between sessions (Walrus Memory + Qwen on Groq)</title>
      <dc:creator>quanghuyaz909</dc:creator>
      <pubDate>Mon, 05 Oct 2026 18:34:25 +0000</pubDate>
      <link>https://dev.to/quanghuyaz909/how-i-built-a-chatbot-that-remembers-you-between-sessions-walrus-memory-qwen-on-groq-5452</link>
      <guid>https://dev.to/quanghuyaz909/how-i-built-a-chatbot-that-remembers-you-between-sessions-walrus-memory-qwen-on-groq-5452</guid>
      <description>&lt;p&gt;I wrote this for &lt;strong&gt;Walrus Sessions 8 - Chatbots That Remember&lt;/strong&gt;, a build contest where you add Walrus Memory to a chatbot and write up what changed. Sharing the build story here for anyone wondering how to make a chatbot remember users between sessions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built for Walrus Sessions 8, "Chatbots That Remember"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;I'm a physician from Vietnam teaching myself Web3 and AI, and I wanted to learn by shipping something real. Tell a chatbot your partner's birthday today and by next week it has no idea. For something as personal as a relationship that's the whole point lost: the value is in the bot remembering what you told it &lt;em&gt;last time&lt;/em&gt;, not asking "tell me about them" again.&lt;/p&gt;

&lt;h2&gt;
  
  
  What DuoMind does
&lt;/h2&gt;

&lt;p&gt;DuoMind is a chatbot for couples, on the web and on Telegram. You tell it about your partner (birthday, likes, a promise, a plan) and it remembers permanently. Ask for a gift or date idea later and the answer is grounded in what it actually knows. It works in 7 languages, understands "next Wednesday", and sends a reminder before a birthday.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Walrus Memory is wired in
&lt;/h2&gt;

&lt;p&gt;Every message runs the same loop, with one namespace per user so memories never mix:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Recall&lt;/strong&gt;: query that user's namespace for facts relevant to the message.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate&lt;/strong&gt;: put the recalled facts in the prompt, then answer (Qwen via Groq).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn&lt;/strong&gt;: ask the model to extract short durable facts from the message (a date, a preference, a promise) and &lt;code&gt;remember()&lt;/code&gt; each one as an encrypted blob.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;memwal&lt;/span&gt; &lt;span class="o"&gt;=&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;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;serverUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://relayer.memory.walrus.xyz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&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;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Lan loves sunflowers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`myapp-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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="p"&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="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`myapp-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;8&lt;/span&gt; &lt;span class="p"&gt;})).&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Accounts live on Walrus too: a username maps to a stable namespace plus a password hash, so a password reset (via a Telegram chat attached earlier) keeps the same memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;Without memory, "what should I get her for our anniversary?" gets "I don't know anything about her, what does she like?" every single time. With memory, a test account that had been told about "Lan" answered a later question with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I remember that your girlfriend Lan has a birthday on November 2nd. I also know that she&lt;br&gt;
loves sunflowers."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Same model, same prompt. The only difference is state, and it lives on Walrus rather than in a database I run, so redeploying or losing my server doesn't erase it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evidence of real use
&lt;/h2&gt;

&lt;p&gt;The mainnet account behind DuoMind holds 242 blobs in total. That includes my own test accounts and the internal accounts directory, so it says little about real use. The number that matters is people: five real people (one on Telegram, four on the web) each have 10 or more memories saved, and each of them has seen the bot recall something from an earlier session. Most are friends I asked to try it, so treat it as a small trial, not a launch.&lt;/p&gt;

&lt;p&gt;A live blob on mainnet: &lt;a href="https://walruscan.com/mainnet/blob/R_769AkRK2bTBr_S98-OkhxQ4AzYw_FAh-jmEzQzBLM" rel="noopener noreferrer"&gt;walruscan.com/mainnet/blob/R_769AkRK2bTBr_S98-OkhxQ4AzYw_FAh-jmEzQzBLM&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke (and what I'd improve)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A detached &lt;code&gt;remember()&lt;/code&gt; silently never ran.&lt;/strong&gt; I started the "learn" step after the reply was ready. On Vercel's serverless runtime the function can be frozen the moment it returns, so facts were never stored while the bot kept saying "got it". I only caught it by using the deployed bot: tell it something, ask a few messages later, nothing. Fix: &lt;code&gt;await&lt;/code&gt; it. A local dev server would never have shown this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write-lag.&lt;/strong&gt; &lt;code&gt;remember()&lt;/code&gt; returns when the job is accepted; a fact can take ~15-30s to become recallable. A cheap "is it indexed yet" signal in the SDK would help.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;60 weighted requests/min per delegate key.&lt;/strong&gt; I measured it: with one key for all users, the whole app sustains only about 8 chat messages a minute (each message costs a couple of recalls plus a write per extracted fact). Past that you get a 429, and I had to make sure the bot says "I couldn't save that" instead of pretending it did. Extra delegate keys on the same account raise the ceiling, but it would be nicer to have this documented up front.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;walruscan shows "0 blobs" for my own address&lt;/strong&gt;, because the hosted relayer signs from its own wallet. Look blobs up by ID.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Groq's free tier&lt;/strong&gt; caps Qwen at 1000 output tokens/minute. One verbose reply got a 429, so I cap &lt;code&gt;max_tokens&lt;/code&gt; and send a long answer as two messages.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Web: &lt;a href="https://walrus-memory-chatbot.vercel.app" rel="noopener noreferrer"&gt;https://walrus-memory-chatbot.vercel.app&lt;/a&gt;, Telegram: &lt;a href="https://t.me/DuoMindd_bot" rel="noopener noreferrer"&gt;https://t.me/DuoMindd_bot&lt;/a&gt;, code: &lt;a href="https://github.com/quanghuyaz909/duomind-walrus" rel="noopener noreferrer"&gt;https://github.com/quanghuyaz909/duomind-walrus&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Model: Qwen (&lt;code&gt;qwen/qwen3.8-27b&lt;/code&gt;) on Groq, not Claude or GPT. Memory: &lt;code&gt;@mysten-incubation/memwal&lt;/code&gt; on mainnet.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on Medium: &lt;a href="https://medium.com/@quanghuyaz909/how-i-built-a-chatbot-that-remembers-you-between-sessions-walrus-memory-qwen-on-groq-c12d140845e9" rel="noopener noreferrer"&gt;https://medium.com/@quanghuyaz909/how-i-built-a-chatbot-that-remembers-you-between-sessions-walrus-memory-qwen-on-groq-c12d140845e9&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>chatbot</category>
      <category>web3</category>
      <category>telegram</category>
    </item>
  </channel>
</rss>
