API referenceObjectsmemory_consolidation

The memory consolidation object

⚠️
Preview — this feature is being built; the design below is the spec.

The memory_consolidation object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.

Example

{
  "id": "mcj_01JCG6J8L0N2Q4S6U8W0",
  "type": "memory_consolidation",
  "store_id": "mem_01JC1A3C5E7G9J1L3N5Q",
  "scope": "customer:*",
  "strategies": [
    "merge_duplicates",
    "resolve_conflicts",
    "expire_stale"
  ],
  "dry_run": false,
  "status": "succeeded",
  "changes": {
    "examined": 2318,
    "merged": 41,
    "rewritten": 9,
    "expired": 133,
    "unchanged": 2135
  },
  "usage": {
    "input_tokens": 412880,
    "output_tokens": 18406,
    "cost_usd": "1.2530"
  },
  "created_at": "2026-11-05T02:00:00Z",
  "finished_at": "2026-11-05T02:06:12Z",
  "error": null,
  "report_file_id": "file_01JCG7K9M1P3R5T7V9X1"
}

Fields

FieldTypeDescription
idstringUnique id of this object.
typestringThe object type, always memory_consolidation.
store_idstringThe memory store.
scopestringScope it applies to.
strategiesarraymerge_duplicates folds near-identical memories into one; resolve_conflicts keeps the newest of two contradicting memories and rewrites the other; expire_stale sets expires_at on memories no session has read for stale_after_days.
dry_runbooleanWhen true, nothing changes and changes reports what would have happened; the proposed edits are in the job’s report file.
statusstringqueued, running, succeeded, failed or canceled.
changesobjectCounts of memories examined, merged, rewritten, expired and left alone.
usageobjectThe model work the job did, billed like any request.
created_atstringWhen it was created, RFC 3339 UTC (some older objects use Unix seconds).
finished_atstringWhen it ended, or null.
errorstring or nullSet when something failed: code and message.
report_file_idstring or nullDownload with file content.

Returned by

Was this page helpful?