Robust Long‑Term Memory

by rotoslider

Not rated
GitHub

About

A persistent, human‑like memory system for AI companions

Details

Author
rotoslider
Categories
Other, Developer Tools

Setup

Install Robust Long‑Term Memory in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/rotoslider/long-term-memory-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Robust Long‑Term Memory MCP for LM Studio

A persistent, human‑like memory system for AI companions inLM Studio, powered by a hybrid of SQLite (structured storage) and ChromaDB (semantic search). It’s designed for decades‑long use, seamless recall across sessions, and automatic backups — making your AI companion feel like a continuous, living persona. Now with biological behavior: time‑based lazy decay and reinforcement by use.

- SQLitefor structured metadata and fast queries
- ChromaDBfor semantic similarity and natural recall
- JSON backupsfor portability

Cross‑chat continuity: memories persist beyond a single chat

Cross‑model continuity: swap models freely, the memory stays intact

Cross‑machine portability: move the database to another system and continue seamlessly

Automatic backups: daily backups and after every 100 memories, pruned to keep the last 10

Invisible memory integration: tools are hidden from the user; conversations feel natural

- Lazy Decay: importance decreases only when a memory is accessed after idle time
- Reinforcement: frequent recall strengthens memory importance
- Adaptive Semantic Threshold: balances precision/recall with a safe top‑1 fallback
- Clone the repo:

git clone https://github.com/Rotoslider/long-term-memory-mcp.git cd long-term-memory-mcp
chromadb sentence-transformers fastmcp (sqlite3 is built into Python; do not install separately)

3. (Optional) For faster HuggingFace model fetching:

pip install "huggingface_hub[hf_xet]"

Edit your LM Studio mcp.json to include the correct path:

{ "mcpServers": { "long_term_memory": { "command": "C:\\Python313\\python.exe", "args": [ "D:\\a.i. apps\\long_term_memory_mcp\\LongTermMemoryMCP.py" ], "env": {} } } }

- Open Server (MCP) Settings
- Load the MCP Tool: "long_term_memory"

- Cross‑Chats→ Start a new chat — memories are still there.
- Cross‑Models→ Switch models — the same memory remains available.
- Cross‑Machines→ Copy the database folder (memory_db/ and memory_backups/) and your system prompt, point to the path, and everything carries over.

💡 Think of it as your AI’s diary: chats are conversations, the database is the journal.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.