id(UUID, PK)namespace(string, normalized, unique, indexed)display_name(string)created_at,updated_at
id(UUID, PK)user_id(FK ->users.id)content(text)type(string — one of:knowledge,context,summary,event,code_snippet,preference)tags(JSON/array, dialect-aware)metadata_(JSON)created_at,updated_at,deleted_at
id(UUID, PK)memory_id(FK ->memory.id)embedding(vector,EMBEDDING_DIMENSIONS— default 1536)model(string — the model name used to generate the embedding)
cache_key(string/hash, PK)namespace(string)payload(JSON)expires_at(UTC datetime)hit_count(integer)last_hit_at(datetime)created_at,updated_at
Returned by EmbeddingService.embed():
vector— the embedding float arrayis_fallback—trueif embedding provider was unavailable and zero-vector was usedmodel— the model name usederror— error message if fallback was triggered,nullotherwise
Returned by LLMService.classify_memory():
memory_type— one of the 6 valid typestags— list of 1-5 lowercase tagsclassified_by_llm—trueif LLM successfully classified,falseif defaults were used
Returned by MemoryService.save_memory():
memory— the persistedMemoryobjectclassified_by_llm— whether LLM auto-classification was usedembedding_is_fallback— whether embedding fell back to zero-vectorembedding_error— error message if embedding failed,nullotherwise
All memory operations are scoped by resolved namespace user on the server side. A namespace is resolved to a user row on first use.