What the client handles vs. what the relayer handles
| Operation | Client (MemWalManual) | Relayer |
|---|---|---|
| Embedding | Client calls OpenAI/compatible API | — |
| SEAL encryption | Client encrypts locally | — |
| Walrus upload | — | Server uploads via sidecar (server pays gas) |
| Vector registration | — | Server stores {blob_id, vector} in PostgreSQL |
| Recall search | — | Server searches vectors, returns {blob_id, distance} |
| Walrus download | Client downloads from aggregator | — |
| SEAL decryption | Client decrypts locally (SessionKey) | — |
Setup
Core Methods
Remember flow (under the hood)
- Client generates embedding via OpenAI-compatible API
- Client SEAL-encrypts the plaintext locally (no wallet signature needed)
- Client sends
{encrypted_data (base64), vector}to the relayer - Relayer uploads encrypted bytes to Walrus via upload-relay sidecar (server pays gas)
- Relayer stores
{blob_id, vector, owner, namespace}in PostgreSQL
Recall flow (under the hood)
- Client generates query embedding via OpenAI-compatible API
- Client sends the vector to the relayer
- Relayer searches PostgreSQL and returns
{blob_id, distance}hits - Client downloads all matching encrypted blobs from Walrus concurrently
- Client creates a single SEAL SessionKey (one wallet popup in browser mode)
- Client decrypts each blob locally using the shared session key
Browser Integration (wallet signer)
UsewalletSigner instead of suiPrivateKey when integrating with a connected wallet (e.g., @mysten/dapp-kit):
Config Notes
suiNetworkdefaults tomainnetsealKeyServerslets the client override the built-in SEAL key server object IDs- Walrus publisher, aggregator, and upload relay defaults follow
suiNetwork embeddingModeldefaults totext-embedding-3-small(oropenai/text-embedding-3-smallfor OpenRouter)walrusEpochsdefaults to50(storage duration)- All
@mysten/*peer dependencies are loaded dynamically — users who only use the defaultMemWalclient don’t need them installed