Guides · Personalization
How to Add User Memory for Personalization
User memory for personalization stores preferences, history and profile facts per user ID — retrieved on each interaction so agents respond consistently over time.
Per-user loop
Data model
What to store per user
Preferences, communication style, past issues and goals — with consent; never secrets or PII without explicit permission.
- Store — language preference, timezone, plan tier, dietary restrictions, support history summary
- With consent — demographics, CRM-linked account facts
- Do not store — passwords, full payment cards, health data without compliance review
Multi-tenant
Architecture: namespace by user_id
Every write and retrieval filters by user_id — the foundation of multi-tenant agent memory.
Pattern: separate collections per tenant (enterprise) or shared collection with user_id metadata filter (SaaS). Cross-user leakage is a critical failure mode — enforce at the store layer, not just in application code.
Frameworks
Implementation with Engram, Mem0 and alternatives
Engram on Weaviate for unified vector + memory; Mem0 for framework-agnostic managed API; LangMem for LangGraph thread metadata.
| Framework | Per-user pattern | Best for |
|---|---|---|
| Engram | Weaviate memory collection + user_id filter | Weaviate-native stacks |
| Mem0 | memory.add/search(user_id=) API | Fast personalization POC |
| Zep | Temporal graph scoped by user | CRM + changing facts |
| LangMem | Thread metadata + store | LangGraph agents |
Ethics
Personalization without creepiness
Transparency, opt-out and forget APIs — users should know what is remembered and be able to delete it.
- Disclose memory use in product UI
- Provide “forget me” / delete-all-memories endpoint
- Honor GDPR/CCPA erasure requests
- Don’t infer sensitive attributes without consent
FAQ
Frequently asked questions
How does Mem0 enable personalization?
Engram and Mem0 both scope memories by user_id — extract facts after each turn, retrieve before the next. Engram is Weaviate-native; Mem0 is framework-agnostic.
User memory vs fine-tuning for personalization?
Memory for dynamic per-user facts at runtime. Fine-tuning for static domain tone in weights. Most agents use memory, not fine-tuning, for personalization. See memory vs fine-tuning.
GDPR and user memory?
Implement delete-by-user_id, consent flows and data export. Memory stores must support erasure on request — same as any personal data store.
Cross-device user memory?
Scope by user_id (account), not device_id. Same user sees consistent memories on web and mobile when keyed to their account.
Engram for user personalization?
Yes — per-user memory collections on Weaviate with user_id metadata filters. Unified with RAG on one platform. See Engram explained.
User memory for support bots?
Store prefs (language, plan tier) and episodic ticket history. Combine with RAG for policies. See customer support.
Sync agent memory with CRM?
CRM as source of truth for account facts; agent memory for conversation-derived prefs. Bidirectional sync needs conflict resolution — Zep fits temporal CRM facts.
How do you benchmark personalization memory?
LOCOMO and LongMemEval measure recall of user-specific facts across sessions. Run on your domain before production. See evaluation hub.