Files
nexus/wiki/concepts/双层记忆架构.md
2026-04-17 23:18:07 +08:00

41 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "双层记忆架构"
type: concept
tags: [openclaw, memory, agent]
last_updated: 2026-04-17
---
## Definition
双层记忆架构是 OpenClaw 中解决 AI Agent 记忆问题的架构方案由三层组成短期记忆层、长期记忆层、self-improving 层。
## Architecture
### 短期记忆层
- 文件:`memory/YYYY-MM-DD.md`
- 作用每天对话记录Session 启动时读取,接上昨天工作
- 创建时机:每次 Session 启动时检查并创建
### 长期记忆层
- 技术memory-lancedb-pro基于 LanceDB 的向量数据库)
- 作用:重要决策、用户偏好、反复使用的流程,语义搜索找回
- 价值:跨日期的知识复用
### Self-Improving 层
- 机制每天23:00定时复盘
- 流程:读取当天 memory → 调用 self_improvement_log → 检查 Pattern-Key 重复 → 同步到长期记忆 → 发送 Telegram 摘要
- 核心作用:推动 Agent 行为模式持续进化
## Three-Layer Summary
| 层级 | 职责 |
|-----|------|
| 短期记忆 | 管每日上下文 |
| 长期记忆 | 管知识 |
| Self-Improving | 管成长 |
## Aliases
- 双层记忆
## Related
- [[Self-Improving Skill]]
- [[每日复盘机制]]
- [[OpenClaw]]