Remembering what happened earlier in the same conversation is the easy case — it's just context window management, summarization when it gets long, and nothing more exotic than that.
Remembering specific past interactions across sessions ("last time we talked about X, you said Y") needs a retrieval layer — store structured records of past sessions, retrieve relevant ones by similarity or metadata when a new session starts.
Remembering general facts and preferences that should apply going forward (not a specific past event, but a standing rule) requires actively writing and maintaining a structured profile — this is the pattern most "AI memory" products are actually promising, and it's the one that needs the most deliberate engineering, not just a vector database.