← 返回
AI智能 中文

每日记忆管家

Auto-capture hourly session highlights and update daily memory files. Keeps long-term memory continuous without manual recording. Triggered by cron or manual...
自动捕获每小时会话亮点并更新每日记忆文件,保持长期记忆连贯,无需手动记录。可通过定时任务或手动触发。
raydez
AI智能 clawhub v1.0.2 1 版本 99894.2 Key: 无需
★ 1
Stars
📥 924
下载
💾 53
安装
1
版本
#latest

概述

Auto Memory Keeper

Overview

Automatically extract session content and update daily memory files to maintain long-term memory continuity.

Two modes:

  • Passive mode: Cron job runs hourly (automatic)
  • Active mode: Manual trigger by user ("remember this", "log today")

How It Works

Triggers

  1. Auto-trigger: Cron job runs every hour
  2. Manual trigger: User says "remember this", "log today", "update memory"

Workflow

Step 1: Check Environment

DATE=$(date +%Y-%m-%d)
MEMORY_FILE=~/.openclaw/workspace/memory/${DATE}.md

if [ ! -f "$MEMORY_FILE" ]; then
  echo "# ${DATE} Log\n\n## Today's Items\n\n- " > "$MEMORY_FILE"
fi

Step 2: Fetch Recent Sessions

# Use sessions_list to get active sessions in last 60 minutes
# Use sessions_history to get session details

Step 3: Noise Filtering

Skip these message types:

  • Simple greetings ("hi", "hello", "hey")
  • Acknowledgments ("thanks", "ok", "sure", "yes")
  • Single word responses
  • Questions without context
  • HEARTBEAT_OK messages
  • System messages

Step 4: Extract Key Info

From filtered messages, extract:

TypeKeywordsFormat
------------------------
Decision"decided", "chose", "adopted"- {time} {decision}
Tasknew feature, new config, new task- {time} {task description}
Progress"completed", "finished", "installed"- {time} completed {task}
Issueerror, bug, failed- {time} issue: {description}
Conclusionsummary, conclusion, finding- {time} {conclusion}

Step 5: Smart Deduplication

Check for duplicates before recording:

# Read current file content
# If similar content exists (>80% similarity), skip
# Otherwise append

Step 6: Update Memory File

Format:

## Today's Items

- {time} {item description}
- {time} {item description}
...

Examples

Input (user message):

> "installed openclaw-tavily-search, score 3.639"

Stored:

- 21:47 installed openclaw-tavily-search skill (score 3.639)

Input (user message):

> "auto-extract session content to memory file every hour"

Stored:

- 21:50 created auto-memory-keeper skill for hourly auto memory extraction

Configuration

Configurable via config.json:

{
  "memory_dir": "~/.openclaw/workspace/memory",
  "interval_hours": 1,
  "active_minutes": 60,
  "categories": ["Decision", "Task", "Progress", "Issue", "Conclusion"],
  "skip_patterns": ["^hi", "^hello", "^thanks", "^ok"],
  "dedup_threshold": 0.8
}

Quality Rules

  1. Concise - One sentence per item
  2. Timestamp - Always include time
  3. Dedupe - Avoid duplicate entries
  4. Categorize - Classify by type
  5. Skip noise - Don't record trivial messages

FAQ

Q: How to trigger manually?

A: Say "remember this", "log today", or "update memory"

Q: Where is cron configured?

A: Use cron job add command, see example in SKILL.md

Q: Where are memory files stored?

A: ~/.openclaw/workspace/memory/YYYY-MM-DD.md

Testing

Periodically review memory files and adjust skip_patterns for better filtering.

Related

  • Works well with session-wrap-up (manual vs auto trigger)
  • Complex memories can be manually written to MEMORY.md (long-term)

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-29 18:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,061 📥 799,115
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 838 📥 213,397
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,075