Skip to main content

Usage

Walrus Memory exposes 3 entry points.

The main difference between MemWal and MemWalManual is what the relayer does for you. With MemWal, the relayer handles embeddings, Seal encryption, and storage. With MemWalManual, your runtime handles embeddings and Seal encryption locally, and the relayer uploads the resulting ciphertext to Walrus, stores the vector row, and runs the vector search on recall.

Compare the 3 entry points:

Entry pointImportWhen to use
MemWal@mysten-incubation/memwalRecommended default, relayer handles embeddings, Seal, and storage
MemWalManual@mysten-incubation/memwal/manualYou need client-managed embeddings and local Seal operations
withMemWal@mysten-incubation/memwal/aiYou already use the Vercel AI SDK and want memory as middleware

Namespace rules​

  • Set a default namespace in create(...) when one app or agent uses one boundary (for example todo, personal, or project-x); this client config value is what every call that omits namespace falls back to
  • Pass namespace per call when one client needs multiple boundaries; a per-call namespace takes precedence over the client config value
  • If omitted, namespace falls back to client config, then to "default"

Good namespace examples: todo, personal, password, project-x. Avoid keeping everything in "default" after early testing.

What is Seal in Walrus Memory?​

All blobs on Walrus are public, so Walrus Memory encrypts private memory with Seal before it reaches Walrus. For what Seal is, see What is Seal encryption?. Where the encryption runs depends on the client:

  • Relayer-managed (MemWal): The relayer encrypts every item with Seal. You do not manage keys.
  • Client-managed (MemWalManual): Your runtime embeds and Seal-encrypts locally. A Sui key authorizes Seal encryption and decryption. The relayer uploads the resulting ciphertext to Walrus and stores the vector row, so it never sees plaintext.