<?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: Ar1Ma「🦑」🦭/acc | 🥃</title>
    <description>The latest articles on DEV Community by Ar1Ma「🦑」🦭/acc | 🥃 (@ar1madotsui).</description>
    <link>https://dev.to/ar1madotsui</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%2F4139414%2F76ac6d1e-f07d-4d55-9bc6-da03cb34cf3f.jpg</url>
      <title>DEV Community: Ar1Ma「🦑」🦭/acc | 🥃</title>
      <link>https://dev.to/ar1madotsui</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ar1madotsui"/>
    <language>en</language>
    <item>
      <title>What building a bot with real memory taught me about storage that cannot be edited</title>
      <dc:creator>Ar1Ma「🦑」🦭/acc | 🥃</dc:creator>
      <pubDate>Wed, 23 Sep 2026 20:58:19 +0000</pubDate>
      <link>https://dev.to/ar1madotsui/what-building-a-bot-with-real-memory-taught-me-about-storage-that-cannot-be-edited-5c9g</link>
      <guid>https://dev.to/ar1madotsui/what-building-a-bot-with-real-memory-taught-me-about-storage-that-cannot-be-edited-5c9g</guid>
      <description>&lt;p&gt;A support bot asks for your order number for the third time. A companion app has&lt;br&gt;
no idea what you told it yesterday. Most of us have met a chatbot that forgets,&lt;br&gt;
and the usual fix is a chat history table.&lt;br&gt;
I have been building one that does not forget, for the Walrus Sessions 8&lt;br&gt;
hackathon. The theme is chatbots that remember, and the memory lives on Walrus&lt;br&gt;
rather than in a database I run. The bot talks on Telegram, uses DeepSeek for the&lt;br&gt;
language model, and stores everything it knows as lines of text with tags on&lt;br&gt;
them.&lt;br&gt;
I assumed the language model would be the hard part. It was not. The hard part&lt;br&gt;
was timing, and the ways a storage layer can tell you something that is not true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory you cannot edit&lt;/strong&gt;&lt;br&gt;
There is no update and no delete. A line, once written, stays. So the bot does&lt;br&gt;
not change its mind by editing anything. When you finish a task, it writes a&lt;br&gt;
second line saying the task is done, and the reader folds every line about that&lt;br&gt;
task down to the newest one.&lt;br&gt;
That works, but only if the fold is predictable. Mine was not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A write is a job, not a write&lt;/strong&gt;&lt;br&gt;
The call that stores a line returns in about a second. It does not mean the line&lt;br&gt;
is stored. What comes back is a job id and a status of running.&lt;br&gt;
I watched one job to the end. It sat pending for the first 1.2 seconds, went to&lt;br&gt;
running at 3.2 seconds, and only reached uploaded at 26.1 seconds. That last&lt;br&gt;
state is the first one where the line can be read back.&lt;br&gt;
So a client on this has to keep its own outbox, hold each line until a read&lt;br&gt;
proves the world can see it, and decide what "accepted" means. In my case a&lt;br&gt;
failed job and a slow job look identical for the first four minutes, which is a&lt;br&gt;
gap I cannot close from the client side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A read that returns nothing&lt;/strong&gt;&lt;br&gt;
This one cost me a user's trust in a way I did not notice at first. The bot told&lt;br&gt;
someone their memory was empty. It was not. That namespace held three lines,&lt;br&gt;
written half an hour earlier.&lt;br&gt;
I asked the same question again 3 seconds later and got all three back. The&lt;br&gt;
retriever sometimes answers an empty list for a query that matches, and then&lt;br&gt;
matches. My first retry waited 0.6 seconds, which sits inside that gap, so the&lt;br&gt;
read gave up and the bot reported an empty memory.&lt;br&gt;
The waits now grow, 0.6 then 2 then 3 seconds, and there is a test that checks a&lt;br&gt;
namespace which really is empty still stops rather than paying all of that on&lt;br&gt;
every message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two lines, one second, one lost reminder&lt;/strong&gt;&lt;br&gt;
Timestamps were precise to the second. Every line the model produces in one turn&lt;br&gt;
is stamped from a single clock reading, so a turn that mentions the same task&lt;br&gt;
twice produces two lines with identical timestamps.&lt;br&gt;
The fold keeps the newest line, and with two lines tied there was nothing left to&lt;br&gt;
sort by except the order the storage layer returned them in. That order is not&lt;br&gt;
guaranteed. One of the two orders kept the line without the reminder time, so a&lt;br&gt;
reminder vanished and nothing on screen said so.&lt;br&gt;
I found it by accident, when the same deadline appeared twice with different&lt;br&gt;
wording. The fix was to stop guessing: the tie is now broken by what a line knows&lt;br&gt;
before it is broken by the text of the line, so both orders produce the same&lt;br&gt;
answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What changed&lt;/strong&gt;&lt;br&gt;
With those three fixed, the bot does what it says it does. Reminders survive a&lt;br&gt;
restart, a finished task stays finished, and when someone asks what it knows it&lt;br&gt;
answers from the stored lines rather than from a cached guess.&lt;br&gt;
There is a script in the repo that prints the before and after side by side on&lt;br&gt;
the same input, because a paragraph claiming a bug is fixed is worth less than&lt;br&gt;
two printed lines that show it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The session&lt;/strong&gt;&lt;br&gt;
It is called Walrus Sessions 8: Chatbots That Remember, and it runs until October 9. &lt;br&gt;
If you have wanted to try agent memory that is not a vector store on your own&lt;br&gt;
machine, it is a good excuse to build something small.&lt;/p&gt;

&lt;p&gt;Register directly on DeepSurge:&lt;br&gt;
&lt;a href="https://www.deepsurge.xyz/hackathons/c0141a4a-21be-4009-bc63-7c168608c849" rel="noopener noreferrer"&gt;https://www.deepsurge.xyz/hackathons/c0141a4a-21be-4009-bc63-7c168608c849&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>web3</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
