Memory types
Every memory is one atomic statement, written in the third person so it makes sense on its own months later ("The user's sister Priya lives in Toronto", not "She lives there"). Each has a type, an optional subject entity, a confidence and the ids of the turns it came from.
| Type | Use it for | Example |
|---|---|---|
fact | Stable state about the user | The user lives in Berlin. |
preference | Likes, dislikes, diet, style | The user prefers window seats. |
event | Something that happened at a time | The user ran a half marathon on 5 April 2026. |
plan | An intended future action | The user plans to visit Lisbon in June. |
relationship | A connection to a person, pet or organisation | Priya is the user's sister. |
Entities
Named people, places, organisations, pets and items become entities. "Acme Corp" and "Acme Corporation" resolve to the same entity by exact name or alias, then trigram similarity, then embedding similarity; new spellings are recorded as aliases. Entities are linked by edges (for example Priya to Shopify) that have their own validity, and retrieval follows those links one hop.
Time-to-live
Events and plans can expire automatically: set TTL_DAYS_EVENT or TTL_DAYS_PLAN and expired
memories are removed by the periodic sweep, leaving an EXPIRE entry in the log without content.