본문으로 건너뛰기
Skillpedia
에이전트48k · #4263

conversation-memory

하는 일

이 도구는 AI가 과거 대화를 기억하도록 돕습니다. 최근에 말한 내용을 저장하고, 중요한 장기 정보(사람이나 사물에 대한 세부 사항 등)도 저장합니다.

사용하는 경우

  • ✓어떤 종류의 챗봇이나 가상 어시스턴트를 만들 때.
  • ✓AI가 이전 대화의 특정 세부 사항을 떠올리기를 원할 때.
  • ✓더 개인화되고 지속적인 사용자 경험을 만들고 싶은 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/conversation-memory/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 이름은 John이고 개를 좋아한다는 것을 기억해 주세요.”

매주 새 스킬 5개. 읽는 데 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가 제가 말하는 모든 것을 기억하나요?

아니요, 가장 관련이 있거나 명시적으로 중요하다고 표시된 내용을 저장하는 데 집중합니다. 한계가 있으며, 대화에 필수적인 것을 우선합니다.

‘엔티티’란 무엇인가요?

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
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬