MemorySync
Guides

Personalization

Use durable, user-approved preferences to adapt tone, format, recommendations, or interface behavior without replaying full interaction histories.

Separate preference from behavior

DataExampleSystem of record
Durable preference“Use concise answers.”MemorySync can supply retrieval context.
Account settingLocale or accessibility settingYour application database remains authoritative.
Temporary intent“Show options for this trip.”Current request or session context.
Sensitive decisionEligibility or account accessYour governed business system.

Capture an explicit preference

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
end_user_id="user-123",
)
memory = client.add(
"The user prefers concise answers.",
source="preference",
metadata={'channel':'settings'},
)

Apply only when relevant

Query for the preference needed by the current task. Your application should decide whether the result is current, appropriate, and allowed before changing the experience.

Handle preference changes

  1. 1Treat the user’s latest explicit choice in your application as authoritative.
  2. 2Forget the superseded record and add the confirmed replacement instead of keeping competing statements.
  3. 3Preserve enough source context to explain where the preference came from.
  4. 4Provide a visible way for users to review or reset personalization when appropriate.

Privacy defaults

  • Collect the minimum information needed for the feature.
  • Avoid direct personal information in external identifiers.
  • Do not infer sensitive traits for personalization.
  • Honor export and deletion requirements throughout your application.
Was this page helpful?