API referenceAgents APIMemory storesConsolidationStart a job

Start a consolidation job

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/memory_stores/{store_id}/consolidations

Start a background job that tidies a memory store: merging duplicates, settling contradictions and expiring memories nobody reads. Long-lived agents accumulate near-duplicate notes; a nightly job keeps retrieval sharp and storage small. Every change keeps the old text in the memory’s history for 30 days.

For how this fits into a full workflow, see Memory consolidation.

Headers

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.
syntic-betaYes, while in previewagents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning.
Content-TypeYesapplication/json
Idempotency-KeyNoUp to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency.

Path parameters

ParameterTypeDescription
store_idstringThe memory store id, starting with mem_.

Body parameters

ParameterTypeRequiredNotes
scopestringNoA scope or a prefix ending in *, such as customer:*. Default: the whole store.
strategiesarray of stringsYesOne or more of merge_duplicates, resolve_conflicts, expire_stale.
stale_after_daysintegerNoFor expire_stale. Default 180, minimum 7.
dry_runbooleanNoDefault false.
modelstringNoThe model that judges duplicates and conflicts. Default Amara Quick.

Response

202 Accepted, Content-Type: application/json

{
  "id": "mcj_01JCG6J8L0N2Q4S6U8W0",
  "type": "memory_consolidation",
  "store_id": "mem_01JC1A3C5E7G9J1L3N5Q",
  "scope": "customer:*",
  "strategies": [
    "merge_duplicates",
    "resolve_conflicts",
    "expire_stale"
  ],
  "dry_run": false,
  "status": "queued",
  "changes": null,
  "usage": null,
  "created_at": "2026-11-05T02:00:00Z",
  "finished_at": null,
  "error": null
}
FieldTypeDescription
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.
changesobjectCounts of memories examined, merged, rewritten, expired and left alone.
usageobjectThe model work the job did, billed like any request.

Examples

curl -sS "https://app.syntic.ai/v1/memory_stores/mem_01JC1A3C5E7G9J1L3N5Q/consolidations" \
  -H "Authorization: Bearer $SYNTIC_API_KEY" \
  -H "syntic-beta: agents-2026-11-01" \
  -H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69" \
  -H "Content-Type: application/json" \
  -d '{
      "scope": "customer:*",
      "strategies": [
        "merge_duplicates",
        "resolve_conflicts",
        "expire_stale"
      ],
      "stale_after_days": 120
    }'

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
409conflict_errorconsolidation_runningA job is already running on an overlapping scope.
403permission_errorzdr_memory_disabledThe organization runs zero data retention without memory enabled.
404not_found_errormemory_store_not_foundNo store with this id in the key’s workspace.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?