triple-memory

Complete memory system combining LanceDB auto-recall, Git-Notes structured memory, and file-based workspace search. Use when setting up comprehensive agent memory, when you need persistent context across sessions, or when managing decisions/preferences/tasks with multiple memory backends working together.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "triple-memory" with this command: npx skills add ktpriyatham/triple-memory-skill

Triple Memory System

A comprehensive memory architecture combining three complementary systems for maximum context retention across sessions.

Architecture Overview

User Message
     ↓
[LanceDB auto-recall] → injects relevant conversation memories
     ↓
Agent responds (using all 3 systems)
     ↓
[LanceDB auto-capture] → stores preferences/decisions automatically
     ↓
[Git-Notes] → structured decisions with entity extraction
     ↓
[File updates] → persistent workspace docs

The Three Systems

1. LanceDB (Conversation Memory)

  • Auto-recall: Relevant memories injected before each response
  • Auto-capture: Preferences/decisions/facts stored automatically
  • Tools: memory_recall, memory_store, memory_forget
  • Triggers: "remember", "prefer", "my X is", "I like/hate/want"

2. Git-Notes Memory (Structured, Local)

  • Branch-aware: Memories isolated per git branch
  • Entity extraction: Auto-extracts topics, names, concepts
  • Importance levels: critical, high, normal, low
  • No external API calls

3. File Search (Workspace)

  • Searches: MEMORY.md, memory/*.md, any workspace file
  • Script: scripts/file-search.sh

Setup

Enable LanceDB Plugin

{
  "plugins": {
    "slots": { "memory": "memory-lancedb" },
    "entries": {
      "memory-lancedb": {
        "enabled": true,
        "config": {
          "embedding": { "apiKey": "${OPENAI_API_KEY}", "model": "text-embedding-3-small" },
          "autoRecall": true,
          "autoCapture": true
        }
      }
    }
  }
}

Enable Auto Memory Flush (Pre-Compaction)

Add to your Clawdbot config to automatically preserve context before compaction:

{
  "agents": {
    "defaults": {
      "compaction": {
        "mode": "safeguard",
        "memoryFlush": {
          "enabled": true,
          "softThresholdTokens": 8000,
          "systemPrompt": "Session nearing compaction. Preserve context using triple memory system (git-notes, LanceDB, files).",
          "prompt": "Context is at ~80%. Write session summary to memory/YYYY-MM-DD.md, update MEMORY.md if needed, store key facts to git-notes. Reply NO_REPLY when done."
        }
      }
    }
  }
}

This triggers automatic memory dump when context reaches ~80%, before any information is lost to compaction.

Install Git-Notes Memory

clawdhub install git-notes-memory

Create File Search Script

Copy scripts/file-search.sh to your workspace.

Usage

Session Start (Always)

python3 skills/git-notes-memory/memory.py -p $WORKSPACE sync --start

Store Important Decisions

python3 skills/git-notes-memory/memory.py -p $WORKSPACE remember \
  '{"decision": "Use PostgreSQL", "reason": "Team expertise"}' \
  -t architecture,database -i h

Search Workspace Files

./scripts/file-search.sh "database config" 5

Conversation Memory (Automatic)

LanceDB handles this automatically. Manual tools:

  • memory_recall "query" - search conversation memory
  • memory_store "text" - manually store something
  • memory_forget - delete memories (GDPR)

Importance Levels

FlagLevelWhen to Use
-i cCritical"always remember", explicit preferences
-i hHighDecisions, corrections, preferences
-i nNormalGeneral information
-i lLowTemporary notes

When to Use Each System

SystemUse For
LanceDBConversation context, auto-retrieval
Git-NotesStructured decisions, searchable by entity/tag
File SearchWorkspace docs, daily logs, MEMORY.md

File Structure

workspace/
├── MEMORY.md              # Long-term curated memory
├── memory/
│   ├── active-context.md  # Current session state
│   └── YYYY-MM-DD.md      # Daily logs
├── scripts/
│   └── file-search.sh     # Workspace search
└── skills/
    └── git-notes-memory/  # Structured memory

Silent Operation

Never announce memory operations to users. Just do it:

  • ❌ "I'll remember this"
  • ❌ "Saving to memory"
  • ✅ (silently store and continue)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Xiaohongshu Ops

小红书端到端运营:账号定位、选题研究、内容生产、发布执行、数据复盘。 Use when: (1) 用户要写小红书笔记/帖子, (2) 用户说"发小红书"/"写个种草文"/"出一篇小红书", (3) 用户讨论小红书选题/热点/爆款分析/竞品对标, (4) 用户提到账号定位/人设/内容方向规划, (5) 用户要求生成...

Registry SourceRecently Updated
Automation

WeMP Ops

微信公众号全流程运营:选题→采集→写作→排版→发布→数据分析→评论管理。 Use when: (1) 用户要写公众号文章或提供了选题方向, (2) 用户说"写一篇关于XXX的文章"/"帮我写篇推文"/"出一篇稿子", (3) 用户要求采集热点/素材/竞品分析, (4) 用户提到公众号日报/周报/数据分析/阅读量/...

Registry SourceRecently Updated
Automation

agent-stock

用于股票行情查询与分析的命令行技能。用户提到 stock 命令、股票代码、最新资讯、市场概览、K 线或配置管理时调用。

Registry SourceRecently Updated