memory-management

ak-eyther 的头像作者 ak-eyther

通过事件合并和每周清理管理三 tier 代理内存(热/温/冷)。在完成任务后用于内存更新。

📖 中文导读:通过事件合并和每周清理管理三 tier 代理内存(热/温/冷)。在完成任务后用于内存更新。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: memory-management description: Manage tri-tier agent memory (hot/warm/cold) with event consolidation and weekly cleanup. Use for memory updates after completing tasks. allowed-tools: - Read - Edit

Memory Management - Tri-Tier System

Memory Structure

{
  "hot_memory": {
    "_description": "Last 20 events - always loaded",
    "recent_events": [],
    "active_tasks": [],
    "recent_learnings": []
  },
  "warm_memory": {
    "_description": "Events 21-100 - patterns",
    "patterns": [],
    "known_issues": [],
    "successful_strategies": []
  },
  "cold_memory": {
    "_description": "Events 101+ - archived",
    "historical_patterns": []
  }
}

When to Update

After Task Completion

Update hot_memory.recent_events:
- What was done
- Outcome
- Lessons learned

Weekly Consolidation

hot → warm (after 20 events)
warm → cold (after 100 events)

Update Pattern

{
  "recent_events": [
    {
      "date": "2025-11-24",
      "task": "Built FastAPI endpoint",
      "outcome": "Success",
      "lessons": ["Async patterns work well", "Remember CORS"]
    }
  ]
}