DEV Community

duchuAZ
duchuAZ

Posted on

I added long-term memory to my chatbot with Walrus — here is what changed

Chatbots are goldfish. Every session starts from zero: preferences, past
decisions, ongoing work — gone. I fixed that on my bot with Walrus Memory
(MemWal)
: conversations persist and get recalled across sessions and users.

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

How the integration looks (TypeScript SDK):

await memwal.rememberAsync("Team decided: retry policy = 3 attempts, backoff 2s");
const hits = await memwal.recall({ query: "retry policy", limit: 5 });
// hits[] -> { text, distance } -> inject top hits into the prompt
Enter fullscreen mode Exit fullscreen mode

Memories are encrypted client-side (SEAL), stored as blobs on Walrus, committed
on Sui. The SDK also ships a mock (MemWalMock) so tests run without a relayer.

Before/after, honestly:

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

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

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

Top comments (0)