MemorySyncMemorySync
Memory Model

Record Structure

This page walks through every column on the memories table — what it holds, who can write it, what it defaults to, and which other systems read it. Field names match the model definition exactly.

Identity and ownership

FieldTypeNotes
idInteger (PK)The only stable handle. Stable across all caches and indexes.
user_idInteger (FK, indexed)Hard owner. Cascade-deletes when the user is removed.
project_idInteger (FK, indexed, nullable)Soft scope. SET NULL on cascade so memory survives a project rename.
environmentString(20), default "production"Check constraint: must be one of development | staging | production.

Content fields (encrypted at rest)

FieldTypeNotes
textLargeBinary (column name text_ciphertext)Required. Stored encrypted; decrypted only on the read path with the tenant key.
summaryLargeBinary (column name summary_ciphertext), nullablePopulated by the summarizer for memories that belong to a cluster of three or more.

Vector fields

FieldTypeNotes
vectorArray of Float, nullablePersisted in the durable store as a backup of what is in the index. Null until embedding succeeds.
vector_idString(64), unique, nullableStable handle for the vector inside the index. Rewritten on every content update.
embedding_versionString(32), nullableLets the platform tell which generation of embedding model produced this vector and re-embed selectively when models advance.

User-supplied metadata

FieldTypeNotes
metadata_jsonJSON, nullableFree-form key/value blob. Not validated against a schema, but bounded in size — oversized payloads are rejected with HTTP 413.
tagsArray of String, nullableCaller-chosen labels. Used as an OR filter at recall time.
sourceString(64), indexed, nullableOrigin label, e.g. email, slack, web, api, upload.
event_typeString(64), indexed, nullableTrigger label, e.g. meeting, decision, status_update.
importanceFloat, default 0.5Range [0, 1]. Caller hint; ranking weights it at 15% by default.
content_typeString(32), indexed, nullableOptional category — drives content-aware freshness decay.

Lifecycle and retention fields

FieldTypeNotes
retention_statusString(32), default "active", indexedOne of active | archived | soft_deleted | hard_delete_pending | purged.
retention_expires_atDateTime (TZ), indexed, nullableWhen the active window ends.
archive_atDateTime (TZ), indexed, nullableWhen the row transitions to read-only archived.
hard_delete_atDateTime (TZ), indexed, nullableWhen the row is queued for permanent deletion (after the 7-day grace).
archived_at / soft_deleted_at / hard_delete_queued_at / purged_atDateTime (TZ), nullable eachSet when each transition fires; never cleared.

Platform-owned scoring fields

  • quality_score — semantic quality from the analysis pass, [0, 1], nullable.
  • confidence_score — accuracy confidence, [0, 1], nullable.
  • freshness_score — content-type-aware recency factor, [0, 1], nullable.
  • decay_score — exponential decay over time-without-use, default 1.0.
  • usage_count — cumulative recall hits, default 0.
  • last_accessed_at — set every time the memory is returned by a query.
  • consistency_score — default 1.0; reduced by every recorded contradiction.
  • evidence_count — default 0; incremented for every supports/extends edge.

Intelligence and extraction identity

  • importance_score — deterministic 0–100 score from the gating pass, nullable until evaluated.
  • intelligence_statuspending | processed | batched | skipped | failed; default pending.
  • estimated_cost_micros — projected processing cost in micro-USD, used by the cost gate.
  • last_evaluated_at / reevaluation_count — when and how often the gate re-scored.
  • extracted_type — semantic category (fact, event, decision, …).
  • extracted_key — canonical dedup key.
  • extraction_attempt_id — link to the extraction run that produced this memory.

Relational and tier fields

  • parent_id (Integer, indexed, nullable) — when a memory is a fragment of another.
  • summary_of (JSON array of ids) — when this row is itself a summary, the list of source memory ids it consolidates.
  • is_summary (Boolean, default false) — flips when the summarizer produced this row.
  • tier (String(16), default "hot", indexed) — one of hot | warm | cold; controls indexing strategy and recall SLA.