Memory Model
Memory Types
MemorySync uses several enumerations to describe what a memory is and what state it is in. Each enum below lives in code with a fixed allowed-values list — clients should treat any unknown value as a forward-compatible extension and not crash on it.
Extraction categories
Set on extracted_type. Decided by the extraction pipeline, not by the caller.
| Value | When it is assigned |
|---|---|
fact | Stable factual claim about an entity ("Alice is the CTO"). |
event | Time-bound occurrence ("Q2 launch on April 15"). |
status | Snapshot of state at a moment ("Project Phoenix is in review"). |
relationship | Edge between named entities ("Alice reports to Bob"). |
policy | Rule, procedure, or guideline. |
decision | A commitment or choice that has been made. |
entity | Identity record for a person, org, or thing. |
summary | Document-level distillation of multiple sources. |
Extraction decisions
created— candidate became a memory row.discarded_low_signal— failed the importance threshold.discarded_redundant— too close to an existing memory.discarded_transient— content was deemed temporary (small talk, ephemeral state).discarded_policy— blocked by a tenant or system policy.pending— still waiting for the extraction worker to pick it up.
Lifecycle states
| State | Visible to recall? | Recoverable? |
|---|---|---|
active | Yes | n/a — normal state. |
archived | No (read-only) | Yes — admins can move back to active. |
soft_deleted | No | Yes — for 7 days, by admin restore endpoint. |
hard_delete_pending | No | No — queued for permanent deletion. |
purged | No | No — terminal. Only the audit row remains. |
Deletion methods (why a deletion happened)
retention_policy— automatic, due to retention timeline.user_request— initiated by the memory's owner.admin_action— initiated by a tenant admin.gdpr_request— data-subject right-to-be-forgotten.legal_hold_release— deletion that was paused for legal hold and is now resuming.
Memory tiers
| Tier | Indexing strategy | Recall SLA target |
|---|---|---|
hot (default) | Fully indexed, in-memory. | < 100 ms. |
warm | Partial index, lazy load. | < 500 ms. |
cold | No active search index — needs restoration. | < 2 s on best effort. |
Extraction status (the pipeline's own state machine)
pending— waiting to be picked up.analyzing— running semantic analysis.scoring— importance scoring in progress.completed— done.failed— exhausted retries.skipped— bypassed by policy or cost gate.
Content types (optional, drive freshness decay)
Allowed values: report, pitch_deck, blog, technical, architecture, meeting, multimedia, legal, research, email, notes, financial. The platform uses this to choose a content-aware freshness half-life — financial data decays slower than meeting notes.