lightmem

Extract conversation facts and store them in a vector database for retrieval.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/yuyijiong/paper-to-skill --skill lightmem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lightmem
Source: https://github.com/yuyijiong/paper-to-skill/tree/main/examples/lightmem
Command: npx skills add https://github.com/yuyijiong/paper-to-skill --skill lightmem

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

LightMem adds persistent memory to LLM-based agents by extracting facts from conversations, storing them in a vector DB, and retrieving relevant memories to inform future interactions.

Core Features & Use Cases

  • Fact extraction from conversations and persistent memory across sessions.
  • Vector storage and semantic retrieval for contextual grounding.
  • Topic segmentation and memory management to keep long-running agents coherent.
  • Use case: build memory-enabled personal assistants and chatbots that remember user preferences over time.

Quick Start

Install LightMem and initialize LightMemory with a configuration to start capturing and querying memories.

Frequently Asked Questions about lightmem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistent memory to an LLM agent across sessions?

Persistent memory is added to LLM agents by extracting facts from conversations, storing them in a vector database, and semantically retrieving relevant memories to ground future interactions.

Can I use local models for fact extraction and memory retrieval?

Yes, local models are fully supported for fact extraction and memory retrieval. The system features a configurable backend that works with Ollama, vllm, and other local model deployments.

What is topic segmentation used for in agent memory management?

Topic segmentation in agent memory management divides conversations into distinct topics to keep long-running agents coherent. This separation ensures extracted facts are properly contextualized before vector database storage.

Does this memory system support updating existing facts in the vector database?

Yes, updating existing memories is supported within the vector database. The system manages memory by extracting new facts and updating stored information to maintain accurate contextual grounding for agents.

What's the best way to build a personal assistant that remembers user preferences?

Building a memory-enabled personal assistant involves extracting user preference facts from conversations and storing them in a vector database. Semantic retrieval then injects these relevant memories during generation.