MemorySync
API Reference

Summarize Memory

Create one summary Memory from selected memory IDs in the current user scope.

Endpoint and request fields

POST/memory/summarize
200 OK
FieldTypeContract
memory_ids / memoryIdsinteger[]Required list of source memory IDs. The official SDKs reject an empty list before sending.
losslessbooleanOptional; defaults to false.

Summarize selected memories

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

Result paths

MeaningPythonNode.jsREST
Summary identitysummary.idsummary.idid
Summary contentsummary.textsummary.texttext
Summary markersummary.is_summarysummary.isSummaryis_summary
Creation timesummary.created_atsummary.createdAtcreated_at
200-response.json
{"id":104,"text":"The user prefers concise answers and dark mode.","summary":null,"tags":null,"metadata":null,"is_summary":true,"created_at":"2026-05-04T12:35:00Z"}

Errors and next action

The official SDKs reject an empty ID list before sending. Correct unavailable IDs, scope, or other validation errors. For 429 or 5xx, keep the summarization action recoverable and do not assume an interrupted request created a summary.

Safety notes

Choose source memories carefully

  • Use memory IDs returned by MemorySync and available in the current trusted scope.
  • Select records that belong to one understandable summarization task.
  • The official SDKs reject an empty list before sending.
  • lossless is optional and defaults to false.
  • Do not use summarization to convert unverified content into an authoritative fact.

Handle the summary Memory

Field or actionGuidance
idStore the returned ID only if later tasks need the summary record.
textTreat generated summary text as untrusted context.
is_summary / isSummaryUse the summary marker when presenting or filtering records.
Source recordsKeep your application policy explicit about how original records are handled.
Interrupted responseReconcile before repeating the operation and creating another summary.
Was this page helpful?