document_type="memory-record" and Synap stores each record as one memory.
Extraction is skipped. Synap only changes what it needs to so the record fits its shape. Once a load is in, Synap consolidates that scope by itself, so the imported memories are linked to what you already have.
Memory records are enabled per Instance. On an Instance where they are not enabled,
memory-record is refused with 422 unknown_document_type, and the call is never treated as a document to extract.Send records
document is one record object or a list of up to 100. Use batch_create for larger loads: each item can be a memory-record call, and a batch takes up to 100 items. Scope comes from the call (user_id, customer_id, scope), as for any create.
The call returns the usual create response. Each record’s outcome is on the status route.
The record
Any other key is refused. Without an
id, the record’s content within its scope is its identity.
source takes the same object as any create. Set source.system to name where the records came from: it is kept with each memory and is part of a record’s identity, so keep it the same when you re-send.
What Synap does to a record
Records about someone else (“Dana’s manager prefers window seats”), or already in the third person, are stored as sent.
Conflicts
When a record contradicts a memory you already have,on_conflict decides:
Outcomes on the status route
status() lists one entry per record, in the order you sent them:
outcome:stored,duplicateorrejected_conflict.perspective:rewritten,name_replaced,unchanged,kept_by_guard(a rewrite would have changed more than the person, so the original was stored) ornot_checked(the check was unavailable, so the record was stored as sent).category_flag:unknownwhen the category isn’t one of your Instance’s categories.subject:linkedwhen the subject was linked to an entity,unresolvedwhen it wasn’t, or null when the record has none.consolidation: for user-scope records,pendinguntil Synap’s consolidation run for the scope commits, thendonewith itsconsolidation_run_id. Null for customer- and client-scope records, which the consolidation run does not cover.
records key.
If your PII protection refuses a record, the whole ingestion fails: status is failed and none of that call’s records are stored. Check status.status before you read records.
Consolidation runs by itself
Records arrive without the context extraction would add: which other memories they relate to, what they repeat or contradict, what deserves promotion. Synap adds that context with a consolidation cycle it starts itself. Once a scope has had no new records for a short while, Synap runs one consolidation cycle there. You don’t trigger anything. A large load split over many calls starts one run, not many, and a scope that is busy with another run waits for it. Consolidation applies to user-scope records. Records stored at customer or client scope are stored, searchable and linked to the graph, but no consolidation run starts for them.Limits and errors
The SDKs raise both 422 errors as
InvalidInputError, with the server’s code on code (serverCode in TypeScript).