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
| Field | Type | Contract |
|---|---|---|
memory_ids / memoryIds | integer[] | Required list of source memory IDs. The official SDKs reject an empty list before sending. |
lossless | boolean | Optional; defaults to false. |
Summarize selected memories
import osfrom memorysync import MemorySyncClientclient = 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
| Meaning | Python | Node.js | REST |
|---|---|---|---|
| Summary identity | summary.id | summary.id | id |
| Summary content | summary.text | summary.text | text |
| Summary marker | summary.is_summary | summary.isSummary | is_summary |
| Creation time | summary.created_at | summary.createdAt | created_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.
losslessis optional and defaults to false.- Do not use summarization to convert unverified content into an authoritative fact.
Handle the summary Memory
| Field or action | Guidance |
|---|---|
id | Store the returned ID only if later tasks need the summary record. |
text | Treat generated summary text as untrusted context. |
is_summary / isSummary | Use the summary marker when presenting or filtering records. |
| Source records | Keep your application policy explicit about how original records are handled. |
| Interrupted response | Reconcile before repeating the operation and creating another summary. |
Related reference
Was this page helpful?