Problem
For structured agent state (user profile JSON: predictions, roast history, flip-flop count), we currently:
rememberAndWait the full JSON snapshot on every mutation
recall({ query: "fan profile predictions favorite team", limit: 10 }) on load
- Parse the first hit containing a magic prefix
FAN_PROFILE_JSON:
This works for a hackathon MVP but is fragile:
- Stale reads: semantic recall may return an older snapshot if multiple versions exist in the namespace
- No exact key: we cannot fetch "current profile" deterministically
- Write amplification: every small update re-embeds the entire JSON blob
Reference: https://github.com/Olympusxvn/special-one-agent/blob/master/lib/memory/fan-profile.ts
Proposed improvements (any of)
rememberUpsert(key, value, namespace) — replace prior memory with same key/tag
recallByKey(key, namespace) — deterministic fetch for structured state
- Documented pattern if upsert exists elsewhere (e.g. via metadata/tags) — we may have missed it
Use case
World Cup prediction roast bot: fan profile must be authoritative (latest predictions, toxicity inputs), while semantic lines ("Prediction WRONG: …") remain good fits for recall by meaning.
Environment
@mysten-incubation/memwal@0.0.7, mainnet relayer
- Walrus Sessions 4 project: Mr. Toxic Special One
Thanks — this was the main SDK gap we hit when moving from in-memory demo to persistent Walrus memory.
Problem
For structured agent state (user profile JSON: predictions, roast history, flip-flop count), we currently:
rememberAndWaitthe full JSON snapshot on every mutationrecall({ query: "fan profile predictions favorite team", limit: 10 })on loadFAN_PROFILE_JSON:This works for a hackathon MVP but is fragile:
Reference: https://github.com/Olympusxvn/special-one-agent/blob/master/lib/memory/fan-profile.ts
Proposed improvements (any of)
rememberUpsert(key, value, namespace)— replace prior memory with same key/tagrecallByKey(key, namespace)— deterministic fetch for structured stateUse case
World Cup prediction roast bot: fan profile must be authoritative (latest predictions, toxicity inputs), while semantic lines ("Prediction WRONG: …") remain good fits for
recallby meaning.Environment
@mysten-incubation/memwal@0.0.7, mainnet relayerThanks — this was the main SDK gap we hit when moving from in-memory demo to persistent Walrus memory.