MemRosetta -- AI टूल्स के लिए लोकल long-term memory इंजन
(github.com/obst2580)AI coding टूल्स (Claude Code, Cursor, Codex, Gemini आदि) का इस्तेमाल करते समय हर बार session बदलने पर context खो जाता है.
कल तय किया गया architecture, पिछले हफ्ते के debugging results, मेरी पसंदीदा coding style -- हर बार फिर से समझानी पड़ती है.
MemRosetta इस समस्या को हल करने के लिए एक लोकल long-term memory इंजन है.
एक लाइन में install:
npm install -g memrosetta && memrosetta init --claude-code
यह कैसे काम करता है
सारी memories एक लोकल SQLite फ़ाइल (~/.memrosetta/memories.db) में store होती हैं. Claude Code, Cursor,
Codex, Gemini एक ही DB share करते हैं, इसलिए एक टूल में store की गई memory को दूसरे टूल में search किया जा सकता है.
मौजूदा RAG की तरह documents को text chunks में तोड़ने के बजाय, यह atomic memory units में store करता है.
एक fact एक record होता है.
// सोमवार session — Claude बातचीत के दौरान अपने-आप MCP call करता है
store({
"content": "Injeungeun OAuth2 + PKCEro gyeoljeong",
"memoryType": "decision",
"keywords": ["auth", "oauth2", "pkce"]
})
// मंगलवार नया session — Claude MCP से search करता है
search({ "query": "auth" })
→ [0.95] Injeungeun OAuth2 + PKCEro gyeoljeong (decision, 2026-03-31)
→ [0.82] API rate limiteun yujeodang 100req/min (fact, 2026-03-31)
→ [0.41] Login peiji UI wanseong (event, 2026-03-28)
चाहे 100 memories जमा हो चुकी हों, यह keyword matching + semantic similarity + ACT-R activation score को मिलाकर सिर्फ़ सबसे ज़्यादा relevant top 5 results लौटाता है. यह वैसा ही है जैसे इंसानी दिमाग़ संबंधित memory को याद करता है — जिन्हें बार-बार याद किया जाता है वे ज़्यादा आसानी से याद आती हैं, और जिन्हें लंबे समय तक इस्तेमाल नहीं किया गया वे स्वाभाविक रूप से धुंधली पड़ जाती हैं, लेकिन गायब नहीं होतीं.
मुख्य विशेषताएँ
- hybrid search: FTS5 keyword matching + vector semantic similarity + Convex Combination fusion
- contradiction detection: लोकल NLI model (71MB) नई facts और मौजूदा memories के बीच विरोधाभास को अपने-आप detect करके relation से जोड़ता है
- adaptive forgetting: cognitive science के ACT-R model पर आधारित. बार-बार search की जाने वाली memories का activation score बढ़ता है, और इस्तेमाल न होने वाली memories स्वाभाविक रूप से fade होती हैं (delete नहीं होतीं)
- time model: हर memory के लिए 4 timestamps -- कब store हुई, बातचीत कब हुई, असली घटना का समय, invalidation का समय
- relation graph: updates, extends, derives, contradicts, supports -- memories को आपस में जोड़ता है
- LLM की ज़रूरत नहीं: core engine बिना external API calls के लोकल में चलता है. embedding (33MB) और NLI (71MB) दोनों लोकल हैं
टूल-वार integration
memrosetta init --claude-code # Claude Code: hooks + CLAUDE.md + MCP
memrosetta init --cursor # Cursor: MCP + .cursorrules
memrosetta init --codex # Codex: config.toml + AGENTS.md
memrosetta init --gemini # Gemini: settings.json + GEMINI.md
MCP(Model Context Protocol) के ज़रिए AI session के दौरान सीधे memories को store/search करता है. Claude Code के मामले में, session के दौरान Claude सीधे MCP के ज़रिए store करता है (सबसे अच्छी quality, लागत $0), और session खत्म होने पर Stop Hook safety net के रूप में छूटी हुई चीज़ों को पूरक करता है.
प्रतिस्पर्धी उत्पादों से तुलना
Mem0, Zep, Letta जैसी मौजूदा AI memory solutions cloud-based हैं और LLM dependency रखती हैं. MemRosetta सिर्फ़ एक लोकल SQLite पर चलता है, और contradiction detection, ACT-R forgetting model, time model, relation graph जैसी सुविधाएँ मौजूदा solutions में नहीं हैं.
- GitHub: https://github.com/obst2580/memrosetta
- Homepage: https://memrosetta.liliplanet.net
- npm:
npm install -g memrosetta - 696+ tests, MIT license
1 टिप्पणियां
नमस्ते, मुझे लगता है कि यह एक अच्छा आइडिया है।
क्या आपने इसे प्रोजेक्ट के हिसाब से अलग करने के बारे में सोचा है?