Bug: `topic_segment=False` causes `add_memory()` to skip the entire extraction pipeline, resulting in empty Qdrant storage
Bug Description
When topic_segment=False is set in the configuration, add_memory() returns early
before performing any LLM extraction, resulting in zero memory entries being stored
in the vector database. The vector store remains empty regardless of how many messages
are processed.
This makes it impossible to use LightMem without the LLMlingua-2 model, even though
the README and configuration documentation suggest that topic_segment is an optional
component (defaulting to False).
Affected File
src/lightmem/memory/lightmem.py, lines 298–307
Code
if not self.config.topic_segment: # TODO: self.logger.info(f"[{call_id}] Topic segmentation disabled, returning emitted messages") return { "triggered": True, "cut_index": len(msgs), "boundaries": [0, len(msgs)], "emitted_messages": msgs, "carryover_size": 0, } The # TODO comment confirms this is an incomplete code path. The early return completely bypasses: senmem_buffer_manager — topic-level segmentation shortmem_buffer_manager — extraction trigger logic manager.meta_text_extract() — LLM knowledge extraction convert_extraction_results_to_memory_entries() — MemoryEntry creation offline_update() / online_update() — storing entries into Qdrant
Hello, thank you for your interest in LightMem. This part has been a low-priority item in our update schedule, as setting topic_segment=False prevents the use of key functionalities of LightMem. However, we will arrange for it to be updated as soon as possible. Thank you for pointing out this issue.
The issue has been solved as PR #64 .