Long-horizon LLM agents face a critical challenge: preserving information from past interactions without incurring prohibitive costs. Traditional memory systems consolidate after every interaction, invoking LLMs to extract, summarize, or update memories—a process that becomes increasingly expensive as conversations grow. Coarse summarization can cut costs but risks losing fine-grained contextual evidence, while larger retrieval contexts or multi-hop reasoning shift the burden to query time.
LycheeMemory V2, introduced by Hugging Face researchers, replaces turn-level consolidation with semantic segment-level consolidation. Instead of processing every exchange, the framework batches multiple interactions into segments and encodes each finalized segment into context-independent typed memory records. This approach lowers LLM encoding frequency, while semantic boundary detection preserves coherent event-level and temporal evidence compared to fixed-window batching.
The resulting records are organized with lightweight structured indexes, enabling query-planned evidence retrieval. Experiments using GPT-4.1-Mini demonstrate state-of-the-art performance: 89.22% on LoCoMo and 92.20% on LongMemEval-S. Compared to A-Mem, LycheeMemory reduces construction tokens by 86.0% on LoCoMo and 75.9% on LongMemEval-S without increasing query-time token usage.
The authors conclude that the accuracy–cost trade-off in long-term agent memory depends not only on what information is retained, but also on the granularity at which it is consolidated. The code is available on GitHub.