DEV Community

Aryta James
Aryta James

Posted on Edited on

How I Used Walrus Memory to Build LoveChild, a Pregnancy Chatbot That Remembers Every Discomfort You Face and Prepares a Brief for Your Doctor

Antenatal check-ups are weeks apart, and by the time a pregnant woman is in the clinic, half of what happened is forgotten. A chatbot that forgets when the tab closes makes it worse. A slightly high BP at week 24, swollen ankles at week 29 and a headache at week 30 each look harmless alone. Together they are a warning sign for pre-eclampsia.

What LoveChild does

LoveChild is a chatbot for pregnant women. She logs whatever she notices, it remembers every note, and it flags patterns across them. Before an appointment, one tap on Doctor's Report gives her a one-page summary for her doctor: what she reported week by week, what keeps coming back, and what to ask.

How Walrus Memory is wired in

Every message runs the same loop, with one namespace per mother so notes never mix:

  1. Recall: query her namespace for notes related to the message.
  2. Generate: put the recalled notes in the prompt, then answer (Gemini 1.5 Flash).
  3. Remember: if the message has a new symptom or vital reading, save it as an encrypted blob.
const memwal = MemWal.create({ key, accountId, serverUrl: "https://relayer.memory.walrus.xyz" });
await memwal.remember("Week 30: Morning headache and swollen feet, home BP 138/88", `lovechild-${motherId}`);
const hits = (await memwal.recall({ query: message, namespace: `lovechild-${motherId}`, limit: 5 })).results;
Enter fullscreen mode Exit fullscreen mode

Before and after

I tested with Ada, a persona at week 30 with rising home BP. She sends "My feet are still swelling and I had a morning headache."

Without memory, the bot says to rest and drink water, and treats it as a routine complaint. With memory, it replied:

"...especially since you mentioned back in week 26 that the swelling was sticking around even in the mornings, and we logged that stubborn frontal headache and blood pressure reading..."

Same model, same message. The only difference is what was stored on Walrus.

Evidence of real use

There are 30 blobs on Walrus Mainnet, 10 each for three test personas (Ada, Blessing, Chiamaka). No real patients have used it yet. Two friends who have had babies tried the chat to see if logging felt natural, so treat this as a small trial, not a launch.

MemWalAccount on Suiscan: https://suiscan.xyz/mainnet/object/0x763b3b257e9575d546b449b8f2cc9a1ee05f8c3c0d17bfbd0e5d84bfc389e4d8

A live blob on Walruscan: https://walruscan.com/mainnet/blob/633xZoeAN3WtiacYouKR2YLXZP9hki05eqYHVm_5-TQ

Try it

Web: https://love-child.vercel.app, code: https://github.com/nobl3Y/LoveChild

Model: Gemini 1.5 Flash (gemini-1.5-flash), not Claude or GPT. Memory: @mysten-incubation/memwal on Walrus Mainnet.

Originally published on Medium: https://medium.com/@arytajames/how-lovechild-uses-walrus-to-give-maternal-care-a-memory-ec5a8b82d64a

Top comments (0)