← 返回 Skills 市场
56
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install bagua-memory
功能描述
八卦记忆系统 (Bagua Memory) - AI Agent 记忆管理框架。 将记忆按八个维度(规则/知识/热记忆/决策/事件/关联/归档/偏好)分类存储, 通过生命周期自动衰减和卦变关联联想检索。 使用场景: (1) 为 AI Agent 建立结构化的长期记忆系统 (2) 管理 workspace 中的记忆...
使用说明 (SKILL.md)
八卦记忆系统
基于文件的记忆管理框架,零依赖,适用于任何能读写本地文件的 AI Agent。
详细架构见 references/architecture.md(权威来源:memory/bagua/README.md)。
⚡ 自激活(首次触发必做)
检测条件:如果 AGENTS.md 或 SOUL.md 中不存在 ## 记忆规则 章节,说明尚未激活。
激活步骤:
- 运行
bash scripts/init_bagua.sh .(在 workspace 根目录,自动创建 memory/ 和 MEMORY.md) - 读取
references/soul-inject.md,将其内容追加到AGENTS.md(或SOUL.md)末尾 - 如果
HEARTBEAT.md存在,将references/heartbeat-inject.md追加进去 - 告知用户:"八卦记忆系统已激活 ✅"
核心流程
写入记忆
- 新信息按归类指南判断所属卦位
- 写入对应
memory/bagua/\x3C卦位>/下的 Markdown 文件 - 文件命名:
YYYY-MM-DD.md(时间线类)或按主题命名
检索记忆(渐进式)
- L0:读
MEMORY.md(索引+归类指南) - L1:根据话题读 1-2 个相关卦位
- L2:复杂检索时读
memory/bagua/README.md(卦变关联表)
记忆维护
- 归档:离卦超过 7 天 → 移入艮卦
- 压缩:艮卦超过 30 天 → 摘要化
- 恢复:归档记忆再次被引用 → 升回原卦位
八卦速查
| 卦 | 目录 | 存什么 | 边界 |
|---|---|---|---|
| ☰ 乾 | qian/ |
系统规则、行为准则 | - |
| ☷ 坤 | kun/ |
知识库、事实 | 相对稳定的信息 |
| ☲ 离 | li/ |
近期新发现 | 只放"新东西",不放对话总结 |
| ☵ 坎 | kan/ |
决策推理 | 只记"为什么"(reason) |
| ☳ 震 | zhen/ |
事件时间线 | 只记"发生了什么"(fact) |
| ☴ 巽 | xun/ |
关联网络 | 人/项目/概念关系 |
| ☶ 艮 | gen/ |
归档记忆 | 冷却中的旧记忆 |
| ☱ 兑 | dui/ |
用户偏好 | 风格、习惯、情感 |
与 MEMORY.md 的关系
MEMORY.md 是入口(L0),记忆本体在 memory/bagua/ 各卦位下。
安全使用建议
This skill appears to do what it says: create a file-based memory structure and inject rules into agent config files. Before activating it: 1) Inspect references/soul-inject.md and references/heartbeat-inject.md to confirm you accept the injected rules. 2) Backup AGENTS.md and SOUL.md (and any other workspace config) so you can revert unwanted changes. 3) Consider running scripts/init_bagua.sh manually rather than allowing automatic self-activation so you control when files are created and appended. 4) Be aware that the skill will store information in workspace files and will delete/modify those files when instructed to 'forget'—do not put secrets into conversation content if you do not want them persisted. If you need higher assurance, run the init script in a sandboxed workspace first.
功能分析
Type: OpenClaw Skill
Name: bagua-memory
Version: 1.0.0
The bagua-memory skill is a structured file-based memory management framework for AI agents. It uses a shell script (scripts/init_bagua.sh) to initialize a local directory structure and provides markdown templates (references/soul-inject.md) to guide the agent in categorizing and archiving information. All operations are local to the workspace, and there is no evidence of data exfiltration, malicious network activity, or unauthorized system access.
能力评估
Purpose & Capability
The name/description (long-term memory management) match the delivered artifacts: an init script that creates a memory/bagua directory structure, README and MEMORY.md templates, and instructions for writing/reading/archiving memories. No unrelated binaries or credentials are requested.
Instruction Scope
SKILL.md instructs the agent to read and write local files (memory/, MEMORY.md) and to append the contents of references/soul-inject.md (and heartbeat-inject.md) into AGENTS.md or SOUL.md. That behavior is coherent with establishing persistent memory rules, but it is intrusive because it modifies shared configuration files in the workspace. There are no network endpoints or exfiltration steps.
Install Mechanism
There is no external install/download. The init script is bundled with the skill and only uses standard POSIX commands to create directories and write files. No archives or remote fetches are performed.
Credentials
The skill requests no environment variables, credentials, or config paths. All file operations are confined to the workspace (memory/ and workspace-level MEMORY.md, AGENTS.md, SOUL.md, HEARTBEAT.md).
Persistence & Privilege
The skill does not set always:true, but it does persistently modify workspace config files (appending the memory-rule block into AGENTS.md or SOUL.md). That gives the skill a lasting influence on agent behavior across sessions; this is plausible for a memory system but should be explicitly authorized by the user.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install bagua-memory - 安装完成后,直接呼叫该 Skill 的名称或使用
/bagua-memory触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of 八卦记忆系统 (Bagua Memory), an AI Agent memory management framework.
- 乾、坤、离、坎、震、巽、艮、兑. Hexagram Retrieval
- Organizes memory into eight categories (rules, knowledge, hot memory, decision, event, association, archive, preference) with lifecycle-based decay and associative retrieval.
- Structured for file-based storage; suitable for any AI Agent with local file access.
- Provides self-activation instructions and detailed workflows for memory writing, retrieval, archival, compression, and recovery.
- Features progressive memory lookup and clear categorization via the "bagua" model.
- the current skill is for openclaw.
元数据
常见问题
bagua-memory 是什么?
八卦记忆系统 (Bagua Memory) - AI Agent 记忆管理框架。 将记忆按八个维度(规则/知识/热记忆/决策/事件/关联/归档/偏好)分类存储, 通过生命周期自动衰减和卦变关联联想检索。 使用场景: (1) 为 AI Agent 建立结构化的长期记忆系统 (2) 管理 workspace 中的记忆... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 56 次。
如何安装 bagua-memory?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install bagua-memory」即可一键安装,无需额外配置。
bagua-memory 是免费的吗?
是的,bagua-memory 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
bagua-memory 支持哪些平台?
bagua-memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 bagua-memory?
由 良鼠(@xuanyizhi)开发并维护,当前版本 v1.0.0。
推荐 Skills