LightMem
ZJUNLPLightMem is a Python memory framework for LLM agents that compresses incoming dialogue, segments it by topic, has a language model extract memory entries, and later updates or deletes conflicting entries in an offline pass. It retrieves through Qdrant, FAISS or BM25, runs with hosted or local models and includes an MCP server. Zhejiang University's NLP group, ZJUNLP, builds it.
The repository also hosts the group's related memory methods and benchmark scripts; this entry reads the LightMem library, which installs from source because the README still marks the PyPI install as coming soon.
Openness
5 high confidence- license
- MIT (root LICENSE over the repository)+Apache-2.0 (declared in pyproject.toml; also the bundled VLM2Vec embedder)
- source
- public
- core features withheld
- no — the 610-path tree at 8021186 carries the root MIT LICENSE and an Apache-2.0 LICENSE for the vendored VLM2Vec code, with no ee/, enterprise/, commercial/ or proprietary/ path; an academic lab's release
LightMem's repository is MIT licensed while its package manifest names Apache 2.0, and either license allows any use. The whole framework runs from the published source against hosted or local models, and the university lab that publishes it sells nothing beside it.
- https://raw.githubusercontent.com/zjunlp/LightMem/main/LICENSE recorded 2026-11-20
The LICENSE is the MIT License, "Copyright (c) 2025 ZJUNLP".
- https://raw.githubusercontent.com/zjunlp/LightMem/main/pyproject.toml recorded 2026-11-20
The manifest names the package lightmem with license = {text = "Apache-2.0"} and repository zjunlp/LightMem.
- https://raw.githubusercontent.com/zjunlp/LightMem/main/README.md recorded 2026-11-20
The README installs from source with "pip install -e .", marks "pip install lightmem" as "Coming soon", and supports OpenAI, DeepSeek, Ollama, vLLM and Transformers backends.
Adoption
2 low confidenceLightMem installs from source and the README marks its PyPI release as coming soon, so GitHub stars are the only signal. A star is not a use, and on a repository that also carries a paper's benchmark scripts many record interest in the research.
- https://api.github.com/search/repositories?q=repo:zjunlp/LightMem recorded 2026-11-20
zjunlp/LightMem: 1,227 stars, license MIT, not archived, last pushed 2026-11-17.
Capability
3 medium confidenceLightMem extracts memories from dialogue itself and later lets a model update or delete entries that newer ones contradict. It keeps one store of entries with no profile or graph, and nothing in it ages memories out on its own.
- https://raw.githubusercontent.com/zjunlp/LightMem/main/README.md recorded 2026-11-20
The examples call add_memory with extraction forced, then "Offline Update" through construct_update_queue_all_entries and offline_update_all_entries, then retrieve(question, limit=5); RetrieverConfig supports qdrant, FAISS and BM25.
- https://raw.githubusercontent.com/zjunlp/LightMem/main/src/lightmem/memory/lightmem.py recorded 2026-11-20
offline_update_all_entries calls the update model for each entry with high-scoring candidates and, by its returned action, deletes the entry or rewrites its memory text.
Verified 2026-11-20, except some scores, still awaiting re-confirmation