Advanced Usage
Advanced Walrus Memory features include manual registration (rememberManual() and recallManual()) for precomputed vectors and encrypted payloads, analyze() for LLM-based fact extraction from longer text, and the withMemWal AI middleware for automatic recall before generation and auto-save after generation (on by default; set autoSave: false to turn it off). The relayer uploads your encrypted payloads to Walrus and extracts structured facts for analyze().
When to use advanced features
- you already have a vector or encrypted payload
- you want fact extraction with
analyze() - you want memory inside an AI SDK pipeline
How to use manual registration and recall
Use:
rememberManual()when you already have encrypted payload plus vectorrecallManual()when you already have a query vector
How does analyze() extract facts?
Use analyze() for LLM-based fact extraction when you want the relayer to extract structured facts from longer text and store them as
memories.
How to use the withMemWal middleware
Wire up the withMemWal middleware for automatic recall in AI generation pipelines when you want:
- recall before generation
- optional auto-save after generation
Read next
What parameters do the manual methods take?
Both manual methods take an options object:
rememberManual({ encryptedData, vector, namespace? }):encryptedDatais a base64-encoded string of Seal-encrypted bytes that the relayer uploads to Walrus.vectoris your precomputed embedding (number[]).namespacedefaults to the config namespace ordefault. The result containsid,blob_id,owner, andnamespace.recallManual({ vector, limit?, namespace? }):vectoris your precomputed query embedding (number[]).limitmust be a positive integer (default 10, relayer caps at 100). You can also pass optionalscoringWeights. Each hit contains onlyblob_idanddistance, with no decrypted text.
Both methods reject an empty or non-finite vector before signing. rememberManual rejects a missing or blank encryptedData string with TypeError.