मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट48k · #4263

conversation-memory

यह क्या करती है

यह टूल AI को पिछली बातचीत याद रखने में मदद करता है। यह हाल में कही गई बातों को भी स्टोर करता है और लोगों, जगहों या चीज़ों के बारे में ज़रूरी लंबे समय की जानकारी भी।

कब इस्तेमाल करें

  • ✓कोई भी chatbot या virtual assistant बनाते समय।
  • ✓जब आप चाहते हैं कि AI पिछली बातचीत की खास बातें याद रखे।
  • ✓यूज़र के लिए ज़्यादा पर्सनल और लगातार चलने वाला अनुभव बनाने के लिए।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/conversation-memory/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/conversation-memory/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“AI, याद रखो मेरा नाम John है और मुझे कुत्ते पसंद हैं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह AI के लिए एक दिमाग की तरह काम करता है। यह हाल के मैसेज को शॉर्ट-टर्म मेमोरी में और ज़रूरी जानकारी को लॉन्ग-टर्म मेमोरी में रखता है। यह बातचीत में आए लोगों, जगहों या चीज़ों के बारे में तथ्य भी नोट करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Conversation Memory

Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory

Capabilities

  • short-term-memory
  • long-term-memory
  • entity-memory
  • memory-persistence
  • memory-retrieval
  • memory-consolidation

Prerequisites

  • Knowledge: LLM conversation patterns, Database basics, Key-value stores
  • Skills_recommended: context-window-management, rag-implementation

Scope

  • Does_not_cover: Knowledge graph construction, Semantic search implementation, Database administration
  • Boundaries: Focus is memory patterns for LLMs, Covers storage and retrieval strategies

Ecosystem

Primary_tools

  • Mem0 - Memory layer for AI applications
  • LangChain Memory - Memory utilities in LangChain
  • Redis - In-memory data store for session memory

Patterns

Tiered Memory System

Different memory tiers for different purposes

When to use: Building any conversational AI

interface MemorySystem {
    // Buffer: Current conversation (in context)
    buffer: ConversationBuffer;
    // Short-term: Recent interactions (session)
    shortTerm: ShortTermMemory;
    // Long-term: Persistent across sessions
    longTerm: LongTermMemory;
    // Entity: Facts about people, places, things
    entity: EntityMemory;
}

class TieredMemory implements MemorySystem {
    async addMessage(message: Message): Promise<void> {
        // Always add to buffer
        this.buffer.add(message);
        // Extract entities
        const entities = await extractEntities(message);
        for (const entity of entities) {
            await this.entity.upsert(entity);
        }
        // Check for memorable content
        if (await isMemoryWorthy(message)) {
            await this.shortTerm.add({
                content: message.content,
                timestamp: Date.now(),
                importance: await scoreImportance(message)
            });
        }
    }

    async consolidate(): Promise<void> {
        // Move important short-term to long-term
        const memories = await this.shortTerm.getOld(24 * 60 * 60 * 1000);
        for (const memory of memories) {
            if (memory.importance > 0.7 || memory.referenced > 2) {
                await this.longTerm.add(memory);
            }
            await this.shortTerm.remove(memory.id);
        }
    }

    async buildContext(query: string): Promise<string> {
        const parts: string[] = [];
        // Relevant long-term memories
        const longTermRelevant = await this.longTerm.search(query, 3);
        if (longTermRelevant.length) {
            parts.push('## Relevant Memories\n' +
                longTermRelevant.map(m => `- ${m.content}`).join('\n'));
        }
        // Relevant entities
        const entities = await this.entity.getRelevant(query);
        if (entities.length) {
            parts.push('## Known Entities\n' +
                entities.map(e => `- ${e.name}: ${e.facts.join(', ')}`).join('\n'));
        }
        // Recent conversation
        const recent = this.buffer.getRecent(10);
        parts.push('## Recent Conversation\n' + formatMessages(recent));

        return parts.join('\n\n');
    }
}

Entity Memory

Store and update facts about entities

When to use: Need to remember details about people, places, things

interface Entity {
    id: string;
    name: string;
    type: 'person' | 'place' | 'thing' | 'concept';
    facts: Fact[];
    lastMentioned: number;
    mentionCount: number;
}
interface Fact {
    content: string;
    confidence: number;
    source: string;  // Which message this came from
    timestamp: number;
}

class EntityMemory {
    async extractAndStore(message: Message): Promise<void> {
        // Use LLM to extract entities and facts
        const extraction = await llm.complete(`
            Extract entities and facts from this message.
            Return JSON: { "entities": [
                { "name": "...", "type": "...", "facts": ["..."] }
            ]}

            Message: "${message.content}"
        `);
        const { entities } = JSON.parse(extraction);
        for (const entity of entities) {
            await this.upsert(entity, message.id);
        }
    }

    async upsert(entity: ExtractedEntity, sourceId: string): Promise<void> {
        const existing = await this.store.get(entity.name.toLowerCase());
        if (existing) {
            // Merge facts, avoiding duplicates

…
अक्सर पूछे जाने वाले सवाल

शॉर्ट-टर्म और लॉन्ग-टर्म मेमोरी में क्या अंतर है?

शॉर्ट-टर्म मेमोरी में हाल की बातचीत रहती है, जैसे पिछले कुछ मिनटों में क्या कहा गया। लॉन्ग-टर्म मेमोरी में वह ज़रूरी जानकारी रहती है जिसे बातचीत खत्म होने के बाद भी लंबे समय तक याद रखना होता है।

क्या AI मेरी हर बात याद रखेगा?

नहीं, यह उन्हीं बातों को स्टोर करने पर ध्यान देता है जो सबसे ज़्यादा ज़रूरी हों या जिन्हें साफ़ तौर पर महत्वपूर्ण बताया गया हो। इसकी सीमाएं हैं और यह बातचीत के लिए ज़रूरी चीज़ों को प्राथमिकता देता है।

'entities' क्या होते हैं?

Entities वे लोग, जगहें, चीज़ें या विचार होते हैं जिनके बारे में AI खास जानकारी स्टोर कर सकता है। उदाहरण के लिए, अगर आप अपने कुत्ते 'Rex' का ज़िक्र करते हैं, तो AI यह बात स्टोर कर सकता है।

जानकारी

लेखक का मूल विवरण

Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#4263
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills