ironmanc2014

Agent Memory

AI 智能体v1.1.0
作者:ironmanc2014更新于 2026-05-11共 2 个版本 · 最新版本发布于 2026-03-17agent-memory-architect@clawhub_ironmanc2014/agent-memory-architect
多 Agent 协作上下文管理记忆增强#Agent Memory#Multi Agent#Self Improving#Learning

据 AlphaMoat 统计,截至 2026-09,Agent Memory 累计下载 3,735 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 2,859 位,在「AI 智能体」分类(969 个)中排名第 571 位。

累计安装
181
累计下载
3,735
星标
-
全站排名
#2,859
全站前 57% · 「AI 智能体」前 59%
平台累计安装累计下载星标评论
ClawHub ↗361,504--
SkillHub ↗1813,735-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文介绍按不同层级整理记忆、从用户纠正中学习、进行反思和在代理间共享知识。持久记忆可能保留个人偏好和项目内容;应限定保存范围,提供审阅与删除方式,并避免保存秘密或敏感资料。

资料发布于 2026-10-29

可以用来做什么

  • 规划不同层级的记忆结构
  • 整理用户确认的偏好和纠正记录
  • 设计代理间共享知识的边界

什么时候用

  • 代理需要跨会话保留信息时
  • 启用持久化前已明确保存、访问和删除范围时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

设计一套分层记忆方案,说明哪些信息会保存、谁能访问以及如何删除。

月度数据趋势

累计下载3,735
3222,1553,9882026-03 · 累计下载 5752026-05 · 累计下载 1,1632026-06 · 累计下载 1,3482026-07 · 累计下载 1,8322026-08 · 累计下载 2,2962026-09 · 累计下载 3,73526-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。 该技能有同名的其他版本,调整前的数据归属当前下载量最大的这一个。

月份累计下载环比星标
2026-093,735—-
2026-082,296+25.3%-
2026-071,832+35.9%-
2026-061,348+15.9%-
2026-051,163—-
2026-03575—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

6.6 KB · ClawHub v1.1.0
---
name: agent-memory-architect
description: >
  Complete memory architecture for AI agents — tiered storage (HOT/WARM/COLD),
  auto-learning from corrections, self-reflection, multi-agent memory sharing,
  and intelligent decay. One-click setup gives any agent persistent memory that
  compounds over time. Use when: setting up agent memory, the agent needs to
  remember preferences/patterns/corrections, building multi-agent teams with
  shared knowledge, when asked about memory architecture/self-learning/self-improving agents,
  or when user says "记住这个", "remember this", "memory setup", "memory stats",
展开全部(共 224 行)
  "what do you know about me", "forget X".
---

# Agent Memory Architect

Persistent, self-organizing memory for AI agents. Learn from corrections,
remember preferences, share knowledge across agents, and get smarter over time.

## Quick Start

### Automated Setup

Run the bootstrap script to initialize everything:

```bash
python <skill-dir>/scripts/bootstrap.py
```

This creates the full directory structure, `hot.md`, `corrections.log`, and `index.md` — ready to go.

### Manual Setup

If you prefer manual setup:

```bash
mkdir -p ~/agent-memory/{projects,domains,agents,archive}
```

Then create `~/agent-memory/hot.md`:

```markdown
# HOT Memory — Always Loaded

## Preferences
<!-- User-confirmed rules. Never decay. -->

## Patterns
<!-- Observed 3+ times. Decay after 30 days unused. -->

## Recent
<!-- New corrections. Promote after 3x confirmation. -->
```

Create `~/agent-memory/corrections.log`:

```markdown
# Corrections Log (last 50)

<!-- Format:
[DATE] WHAT → WHY
  Type: preference|technical|workflow|communication
  Count: N/3
  Status: pending|confirmed|archived
-->
```

Done. Memory is active. Everything below is automatic.

## Architecture

Three-tier storage inspired by CPU cache hierarchies:

```
🔥 HOT  — hot.md (≤100 lines, always loaded)
    Confirmed preferences + high-frequency patterns. Never decays.

🌡️ WARM — projects/, domains/, agents/ (≤200 lines each, loaded on context)
    Per-project and per-domain knowledge. Decays after 90 days unused.

❄️ COLD — archive/ (unlimited, loaded on explicit query)
    Historical reference. Never auto-deleted.
```

See `references/architecture.md` for full design details including file formats,
lifecycle rules, namespace inheritance, and compaction pipelines.

## How It Works

### Detection — What Triggers Learning

| Signal | Confidence | Action |
|--------|-----------|--------|
| "No, do X instead" | High | Log correction |
| "I told you before" | High | Bump priority, flag repeated |
| "Always/Never do X" | Confirmed | Promote to preference |
| Same correction 3x | Auto | Ask to confirm as rule |
| "For this project…" | Scoped | Write to `projects/{name}.md` |

### Ignore — What Does NOT Trigger Learning

- Silence (never infer from no response)
- One-time instructions ("do X now")
- Hypotheticals ("what if…")
- Third-party preferences ("John likes…")
- Context-specific ("in this file…")

### Auto-Promotion / Demotion

| Rule | Trigger |
|------|---------|
| Promote to HOT | Pattern applied 3x in 7 days |
| Demote to WARM | Unused 30 days |
| Archive to COLD | Unused 90 days |
| Delete | Never (unless user says "forget X") |

### Self-Reflection

After completing significant work, evaluate:

1. **Did it meet expectations?** — Compare outcome vs intent
2. **What could be better?** — Identify improvements
3. **Is this a pattern?** — If yes, log to corrections

Log format:
```
CONTEXT: [task type]
REFLECTION: [what I noticed]
LESSON: [what to do differently]
```

### Applying Memory

When using a learned pattern, always cite the source:
```
Using bullet format (from hot.md:12, confirmed 2026-01)
```

### Conflict Resolution

1. Most specific wins: project > domain > global
2. Most recent wins (same level)
3. If ambiguous → ask user

## User Commands

| Say this | Agent does |
|----------|-----------|
| "What do you know about X?" | Search all tiers, report findings |
| "Show my patterns" | Display hot.md contents |
| "Memory stats" | Show tier sizes, health, recent activity |
| "Forget X" | Remove from all tiers (confirm first) |
| "Export memory" | ZIP all memory files |
| "记住这个" / "Remember this" | Log to corrections or promote to preference |

## Memory Stats

On "memory stats", report:
```
📊 Agent Memory

🔥 HOT: hot.md — X entries (≤100 line limit)
🌡️ WARM: projects/ (N files), domains/ (N files)
❄️ COLD: archive/ (N files)

Recent 7 days: X corrections, Y promotions, Z demotions
```

## Multi-Agent Setup

For teams with multiple agents, see `references/multi-agent.md`.
Each agent gets its own HOT memory while sharing WARM knowledge:

```
~/agent-memory/
├── hot.md              # Main agent HOT (always loaded)
├── agents/
│   ├── coder.md        # Coder agent HOT
│   ├── writer.md       # Writer agent HOT
│   └── daily.md        # Daily agent HOT
├── domains/            # Shared domain knowledge
├── projects/           # Per-project patterns
└── archive/            # Decayed patterns
```

## Security

See `references/security.md` for complete boundaries.

**Never store:** passwords, API keys, financial data, health info, biometrics.
**Store with caution:** work context (decay after project ends), schedules (general patterns only).

## Compaction

When hot.md exceeds 100 lines:
1. Merge similar corrections into single rules
2. Archive unused patterns
3. Summarize verbose entries
4. Never lose confirmed preferences

## Troubleshooting

| Problem | Cause | Solution |
|---------|-------|----------|
| Memory not loading | Directory doesn't exist | Run bootstrap script or `mkdir -p ~/agent-memory` |
| hot.md too large | Over 100 lines, slow loading | Run compaction: merge similar entries, archive unused |
| Corrections not promoting | Haven't hit 3x threshold | Repeat correction or say "Always do X" to force |
| Agent forgot a preference | Entry decayed to COLD | Retrieve from `archive/` and re-add to hot.md |
| Multi-agent conflicts | Two agents learned opposite rules | Check `agents/*.md` for conflicts, set explicit override |
| "Memory stats" shows 0 | Fresh install, no corrections yet | Normal — memory builds over time from interactions |
| Permission denied on ~/agent-memory | OS file permissions | `chmod -R 755 ~/agent-memory` (Linux/Mac) |

## Scope

This skill ONLY:
- Learns from explicit user corrections and self-reflection
- Stores preferences in local files (`~/agent-memory/`)
- Reads its own memory files

This skill NEVER:
- Accesses external services
- Infers preferences from silence
- Stores sensitive data
- Modifies its own SKILL.md

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。