2.2 KiB
2.2 KiB
title, type, tags, sources, last_updated
| title | type | tags | sources | last_updated | |||||
|---|---|---|---|---|---|---|---|---|---|
| Shared Memory Architecture | concept |
|
|
2026-04-23 |
Definition
Shared Memory Architecture 是多 Agent 系统中,所有 Agent 共用一套公共记忆文件(GOALS.md、DECISIONS.md、PROJECT_STATUS.md),确保团队目标、关键决策和项目状态对所有 Agent 可见的架构模式。
核心洞察
"Shared memory + private context: The combination is critical — agents need common ground (goals, decisions) but also their own space to accumulate domain expertise"
共享记忆解决的问题:
- 知识孤岛:营销洞察不会自动影响开发优先级
- 上下文丢失:每个 Agent 独立会话无法继承团队决策
- 重复工作:Agent A 的发现对 Agent B 不可见
共享文件结构
team/
├── GOALS.md # 当前 OKR 和优先级(所有 Agent 读取)
├── DECISIONS.md # 关键决策日志(追加写入)
├── PROJECT_STATUS.md # 当前项目状态(所有 Agent 更新)
├── agents/
│ ├── milo/ # Milo 的私有上下文和笔记
│ ├── josh/ # Josh 的私有上下文
│ ├── marketing/ # 营销 Agent 的研究笔记
│ └── dev/ # 开发 Agent 的技术笔记
共享记忆类型
| 文件 | 用途 | 写入规则 |
|---|---|---|
| GOALS.md | 团队目标和 OKR | 定期更新(周/日) |
| DECISIONS.md | 关键决策记录 | 决策时追加 |
| PROJECT_STATUS.md | 项目当前状态 | 状态变更时更新 |
与 Private Context 的关系
Shared Memory + Private Context 组合是关键:
- Shared Memory:共同基础(目标、决策、项目状态)
- Private Context:独立空间积累领域专业知识
- 两者缺一不可:只有共享记忆导致缺乏深度,只有私有上下文导致知识孤岛
Related Concepts
- Agent-Memory — OpenClaw 的长期记忆机制
- Private Context — Agent 私有上下文
- OpenClaw — 提供 workspace 目录体系支持
- Agent Specialization — 专业化 Agent 依赖共享记忆协调