MemorySync
Core Concepts

Relationships & Summaries

Use relationships to connect known records and summaries to condense a selected set of memories. Both operations stay inside the authenticated memory scope.

Connect related memories

Create a relationship when your application knows how two memory records are connected. The source and target must be different records in the caller’s authorized scope.

TypeUse
supports / contradictionRepresent confirming or conflicting information.
derived_from / summary_of / detail_ofRepresent provenance or level of detail.
continuation / extendsRepresent an idea that continues another.
caused_by / references / similarRepresent causal, reference, or similarity links.

Create a relationship

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",
)
relation = client.create_relation(
101,
to_memory_id=102,
relationship_type="supports",
confidence=0.9,
metadata={"note": "Confirmed by the later decision"},
)

Summarize a selected set

Summarization creates a new memory from the IDs you provide. Review the result before using it as authoritative context.

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",
)
summary = client.summarize([101, 102, 103], lossless=True)

When to use each operation

NeedOperation
Keep two records and describe their connection.Create a relationship.
Reduce several related records into one concise record.Create a summary.
Correct tags, importance, source, or metadata.Update the original memory.
Remove information that should no longer be retained.Forget the memory.

Keep generated summaries reviewable

  • Preserve source IDs when your workflow needs traceability.
  • Do not treat a generated summary as a replacement for an authoritative source system.
  • Do not create relationships from untrusted model output without validation.
  • Use lossless only according to your product’s retention and re-expansion needs.