MemorySyncMemorySync
Core Concepts

Memory Record Structure

This page is the field-by-field reference for the Memory row. Every column listed here exists on the underlying memory model. The columns are grouped by purpose so you can navigate by intent rather than alphabetically.

Identity columns

ColumnTypeNotes
idinteger (PK, auto-inc)Internal numeric id. Indexed.
vector_idvarchar(64), uniqueIdentifier issued by the vector index. Nullable until the embedding lands.
parent_idinteger, nullableSelf-FK for hierarchical memories (a summary points at its child rows).
cluster_idbigint, nullable, indexedPersistent cluster assignment for the intelligence views.

Scope columns

ColumnTypeBehaviour
user_idint, FK → users.id, CASCADEHard owner. Server-resolved.
project_idvarchar(64), FK → projects.project_id, SET NULLNullable. Drops to null if the project is deleted.
environmentvarchar(20), default "production"Constrained to development, staging, production.

Content columns (encrypted at rest)

ColumnTypeNotes
textbytes (LargeBinary)Stored as text_ciphertext. Authenticated-encryption ciphertext with a per-user key.
summarybytes, nullableStored as summary_ciphertext. Reserved for batch 5:1 summarization.

Semantic columns

ColumnTypeSource
extracted_typevarchar(32), nullableLLM-assigned: preference, fact, intent, relationship.
extracted_keyvarchar(64), nullableLLM-assigned category slug, e.g. food, occupation.
content_typevarchar(32), nullable, indexedClassifier output: report, pitch_deck, blog, technical, meeting, ...
tagsarray of strings, nullableLower-cased dedup of user tags + top-5 semantic topics.
sourcevarchar(64), nullable, indexedOrigin label such as api, email, web.
event_typevarchar(64), nullable, indexedTrigger label that produced the row.
metadata_jsonJSON, nullableUser keys merged with system keys. See Metadata.

Scoring columns

ColumnType / rangeMeaning
importancefloat, default 0.5, range 0..1User- or semantic-driven weight.
importance_scoreint, nullable, 0..100Deterministic post-commit score (no LLM).
quality_scorefloat, nullable, 0..1Semantic engine quality.
confidence_scorefloat, nullable, 0..1Combination of evidence, consistency, and freshness.
freshness_scorefloat, nullable, 0..1Content-type-aware freshness.
evidence_countint, default 0Count of corroborating relationships.
consistency_scorefloat, default 1.0Drops as contradictions are recorded.
usage_countint, default 0Recall frequency, used as a ranking signal.
decay_scorefloat, default 1.0Decreases over time without recall.

Lifecycle columns

ColumnType / defaultRole
tiervarchar(16), default "hot"Storage tier — see Memory Tiers.
retention_statusvarchar(32), default "active"Lifecycle state — see Memory Lifecycle.
expires_attimestamp, nullableComputed from ttl_minutes when supplied.
archive_attimestamp, nullableWhen the policy moves the row to archived.
retention_expires_attimestamp, nullableWhen the policy soft-deletes the row.
hard_delete_attimestamp, nullableSoft-delete timestamp + 7-day grace.
deleted_attimestamp, nullableSoft-delete marker.
created_attimestamp, default now()Set on insert, never updated.
updated_attimestamp, default now()Tracks lifecycle transitions.

Hierarchy and aggregation columns

ColumnTypeNotes
is_summarybool, default falseMarks aggregated memories.
summary_ofJSON array of intChild memory ids represented by this summary.
source_input_hashvarchar(64), nullableSHA-256 of the sanitized input — used for write-time dedup.

What the API actually returns

MemoryResponse exposes the decrypted text (renamed content in some shapes), the metadata bundle, scoring fields, lifecycle fields, tier, source, event_type, tags, extracted_type, extracted_key, and timestamps. Encryption columns and internal hashes (source_input_hash, ciphertext columns) are never returned.