Agent Memory OS
Build an agent that gets more organized over time instead of more chaotic.
Turn an agent's memory from "a pile of chat history" into a long-term working memory operating system.
What problem this solves
A lot of agents look impressive in short conversations, then collapse under real work:
- - they forget what matters
- active projects pollute long-term memory
- useful lessons never become reusable rules
- the system looks good for a week, then decays
This skill exists to fix that.
It helps the agent move from:
to:
- - "I have a stable global brain, project-specific working brains, reusable lessons, validation logic, and a maintenance loop that keeps the whole system healthy."
What makes this different
This is not just:
- - note-taking guidance
- a vector-search recipe
- a memory dump strategy
It is a workflow for building an agent memory system with:
- - separation of concerns
- promotion paths for reusable knowledge
- validation cases
- operational maintenance rules
Use this skill when
The user says or implies things like:
- - "My agent keeps forgetting"
- "Once projects pile up, everything gets messy"
- "I want long-term memory for my AI agent"
- "I need project memory separated from global memory"
- "I want reusable lessons, not just logs"
- "I want to share or standardize an agent memory setup"
Example trigger prompts
This skill should feel natural on prompts like:
- - "Help me design long-term memory for my coding agent."
- "My AI assistant keeps mixing projects and forgetting context."
- "I need a reusable memory architecture for multi-project agents."
- "How do I separate durable agent memory from active project memory?"
- "Help me turn chat history into a reusable working-memory system."
What the user gets
By the end of this workflow, the user should have:
- 1. a memory architecture that separates global and project concerns
- a minimum project-memory structure
- routing and promotion rules
- validation cases to prove the system works
- a maintenance runbook so it does not decay immediately
Privacy and publishing rule
When using this skill for sharable/public output:
- - never expose real user names, private IDs, workspace-specific secrets, session paths, internal message IDs, or private document URLs
- rewrite examples into generalized patterns
- replace personal/project-specific references with neutral placeholders
- do not bundle private memories, raw chat excerpts, or personally identifying workflow traces into the skill
If the user explicitly wants a public/shareable version, treat privacy-preserving abstraction as mandatory, not optional.
Recommended workflow
Step 0 — Decide whether to use a full memory system
Not every agent needs this full setup.
Read references/architecture-decision-guide.md when the user is unsure whether they need a full global / project / bridge system, or whether a simpler setup is enough.
Step 1 — Diagnose the real memory problem
Classify the user's issue before proposing architecture.
Typical failure modes:
- - single-brain overload: everything is dumped into one place
- project pollution: local project state contaminates long-term memory
- retrieval confusion: the agent doesn't know where to look first
- knowledge stagnation: lessons never graduate into reusable rules
- maintenance decay: the structure exists but slowly becomes stale
Read references/failure-modes.md when you need a sharper diagnosis rubric.
Step 2 — Choose the architecture
Default recommendation: a
three-part system
- - global memory for durable rules, preferences, SOPs, stable principles
- project memory for local complexity and active work
- bridge/promotions for candidate → promoted → canonical evolution
Read references/architecture.md when you need the design rationale.
Step 3 — Create the minimum working structure
For each project, start with 5 files:
- - INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6
- INLINECODE7
Use the bundled templates in:
Step 4 — Define routing and promotion rules
Make sure the agent knows:
- - what belongs to global memory
- what stays project-local
- what becomes a candidate for reuse
- what evidence is required before promotion
Read:
- - INLINECODE10
- INLINECODE11
Step 5 — Validate with concrete cases
Do not stop at design. Test the system with at least 3 case types:
- - continuous project execution
- interruption and recovery
- cross-project reuse
Use measurable criteria: recovery accuracy, unnecessary follow-up questions, reuse success, structure completeness, etc.
Read references/validation.md for a compact validation model.
Step 6 — Add a maintenance runbook
A memory system is not done when designed. It is done when it can be maintained.
Define:
- - when to update daily logs
- when to update project status
- when to record lessons
- when candidates get promoted
- when to deprecate outdated rules
- how often to review global/project/bridge memory
Read references/maintenance.md when writing or reviewing the runbook.
Minimal success path
A good first run of this skill usually looks like:
- 1. identify the dominant failure mode
- choose the global/project/bridge architecture
- create the 5 core project files
- define one promotion rule and one routing rule
- validate with one interruption-recovery case and one reuse case
- write a simple maintenance rhythm
If the agent can recover better, reuse more, and stay cleaner over time, the system is working.
Packaging guidance
Keep the public skill:
- - short in SKILL.md
- practical in workflow
- generalized in examples
- private details removed
Do not include:
- - personal identifiers
- real workspace paths tied to an individual
- raw private conversation excerpts
- internal-only document links
- unredacted project-specific evidence
Read references/publish-checklist.md before publishing or sharing widely.
Output style for public-facing use
If the user wants something that attracts attention, write with this shape:
- - start from a painful, recognizable problem
- name the failure mode clearly
- present the architecture as a relief pattern
- show a small, concrete workflow
- prove it with validation cases
- end with operational simplicity, not abstract theory
Make it feel like a usable system, not an academic essay.
Agent Memory OS
构建一个随时间推移变得更有序而非更混乱的智能体。
将智能体的记忆从“一堆聊天记录”转变为一个长期工作记忆操作系统。
解决的问题
许多智能体在简短对话中表现亮眼,但在实际工作中却崩溃:
- - 它们会忘记重要事项
- 活跃项目污染长期记忆
- 有用经验从未成为可复用规则
- 系统第一周表现良好,随后逐渐退化
本技能旨在解决这些问题。
它帮助智能体从:
转变为:
- - “我拥有稳定的全局大脑、项目专属工作大脑、可复用经验、验证逻辑,以及保持整个系统健康的维护循环。”
独特之处
这不仅仅是:
这是一个构建智能体记忆系统的工作流程,包含:
- - 关注点分离
- 可复用知识的晋升路径
- 验证案例
- 运维维护规则
适用场景
当用户说出或暗示以下内容时:
- - “我的智能体总是忘记”
- “项目一多,一切就变得混乱”
- “我想要AI智能体的长期记忆”
- “我需要将项目记忆与全局记忆分离”
- “我想要可复用的经验,而不仅仅是日志”
- “我想分享或标准化智能体记忆设置”
触发提示示例
本技能在以下提示中应显得自然:
- - “帮我为编码智能体设计长期记忆。”
- “我的AI助手总是混淆项目并忘记上下文。”
- “我需要一个适用于多项目智能体的可复用记忆架构。”
- “如何将持久的智能体记忆与活跃项目记忆分离?”
- “帮我把聊天记录转化为可复用的工作记忆系统。”
用户获得的内容
通过本工作流程,用户应获得:
- 1. 分离全局和项目关注点的记忆架构
- 最小项目记忆结构
- 路由和晋升规则
- 证明系统有效的验证案例
- 防止系统立即退化的维护手册
隐私与发布规则
当使用本技能制作可分享/公开输出时:
- - 绝不暴露真实用户名、私有ID、工作区特定密钥、会话路径、内部消息ID或私有文档URL
- 将示例改写为通用模式
- 用中性占位符替换个人/项目特定引用
- 不要将私有记忆、原始聊天摘录或个人身份识别的工作流痕迹打包进技能
如果用户明确需要公开/可分享版本,请将隐私保护抽象视为强制性要求,而非可选项。
推荐工作流程
第0步 — 决定是否使用完整记忆系统
并非每个智能体都需要完整设置。
当用户不确定是否需要完整的全局/项目/桥接系统,或更简单的设置是否足够时,请阅读references/architecture-decision-guide.md。
第1步 — 诊断真实记忆问题
在提出架构前先对用户的问题进行分类。
典型故障模式:
- - 单脑过载:所有内容都倾倒在一个地方
- 项目污染:本地项目状态污染长期记忆
- 检索混乱:智能体不知道先查看哪里
- 知识停滞:经验从未升级为可复用规则
- 维护退化:结构存在但逐渐过时
当需要更精确的诊断标准时,请阅读references/failure-modes.md。
第2步 — 选择架构
默认推荐:
三部分系统
- - 全局记忆:用于持久规则、偏好、标准操作程序、稳定原则
- 项目记忆:用于本地复杂性和活跃工作
- 桥接/晋升:用于候选→晋升→规范的演进
当需要设计原理时,请阅读references/architecture.md。
第3步 — 创建最小工作结构
每个项目从5个文件开始:
- - PROJECT.md
- STATUS.md
- DECISIONS.md
- ASSETS.md
- LESSONS.md
使用捆绑模板:
- - assets/project-templates/
- assets/bridge-templates/
第4步 — 定义路由和晋升规则
确保智能体知道:
- - 什么属于全局记忆
- 什么保留在项目本地
- 什么成为可复用候选
- 晋升前需要什么证据
阅读:
- - references/routing.md
- references/promotion.md
第5步 — 用具体案例验证
不要止步于设计。至少用3种案例类型测试系统:
使用可衡量标准:恢复准确性、不必要的后续问题、复用成功率、结构完整性等。
阅读references/validation.md获取简洁的验证模型。
第6步 — 添加维护手册
记忆系统在设计完成时并未结束。只有在能够被维护时才算完成。
定义:
- - 何时更新每日日志
- 何时更新项目状态
- 何时记录经验
- 何时晋升候选
- 何时弃用过时规则
- 多久审查全局/项目/桥接记忆
在编写或审查手册时阅读references/maintenance.md。
最小成功路径
本技能的首次良好运行通常如下:
- 1. 识别主导故障模式
- 选择全局/项目/桥接架构
- 创建5个核心项目文件
- 定义一条晋升规则和一条路由规则
- 用一个中断恢复案例和一个复用案例验证
- 编写简单的维护节奏
如果智能体能够更好地恢复、更多地复用,并随时间保持更清晰,则系统正在工作。
打包指南
保持公开技能:
- - SKILL.md简短
- 工作流程实用
- 示例通用化
- 移除私有细节
不要包含:
- - 个人标识符
- 与个人绑定的真实工作区路径
- 原始私有对话摘录
- 仅限内部的文档链接
- 未经编辑的项目特定证据
在广泛发布或分享前阅读references/publish-checklist.md。
面向公众的输出风格
如果用户想要吸引注意力的内容,请按以下结构撰写:
- - 从痛苦且可识别的问题开始
- 清晰命名故障模式
- 将架构呈现为缓解模式
- 展示小而具体的工作流程
- 用验证案例证明
- 以操作简洁性而非抽象理论结束
让它感觉像一个可用的系统,而非学术论文。