Memory management system, providing context to LLM