A single cross-session memory entry.
Records are plain structs (no Ecto), scoped to an agent_id. tokenize/1
is shared by the writer (to build the inverted index) and the searcher (to
parse a query) so the index and queries always agree on tokenization.
Summary
Functions
Build a record, filling id, type, tags, and timestamps.
Downcase, split on non-word boundaries, drop short tokens, dedup.
The valid memory types.
Types
@type mem_type() :: :decision | :pattern | :gotcha | :link | :insight | :note