Memoria: AI 智能体结构化记忆系统 - Openclaw Skills
作者:互联网
2026-03-30
什么是 Memoria?
Memoria 是一个专门设计的实用工具,旨在解决 AI 智能体工作流中的上下文丢失挑战。作为 Openclaw Skills 生态系统中的基础组件,它提供了一个结构化仓库,用于存储特定会话的数据、用户偏好和长期事实。通过使用强大的命令行界面,它允许智能体主动记录见解并在未来的交互中检索它们,从而确保一致且个性化的用户体验。
该工具弥补了短暂聊天会话与永久知识库之间的鸿沟,是开发人员构建复杂智能体工作流的必备插件。通过将其集成到您的 Openclaw Skills 套件中,您可以让智能体记住特定的用户决策、编码任务中吸取的教训以及项目特定的承诺,而无需手动重新输入。
下载入口:https://github.com/openclaw/skills/tree/main/skills/kitakitsune0x/memoria
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install memoria
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 memoria。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Memoria 应用场景
- 管理长期用户偏好,如编码风格、语言设置或首选框架。
- 在使用 Openclaw Skills 的复杂开发项目中记录架构决策及其背后的推理。
- 通过结构化的唤醒 (wake)、检查点 (checkpoint) 和休眠 (sleep) 命令处理会话移交,以保持连续性。
- 跟踪项目里程碑和截止日期,确保 AI 智能体与用户目标保持一致。
- 将本地智能体记忆与 Notion 数据库同步,实现跨平台的可视化与协作。
- 通过使用 MEMORIA_VAULT 环境变量定义仓库路径来初始化环境。
- 使用 wake 命令启动活动会话,以恢复之前的上下文和历史数据。
- 主动捕获记忆条目,使用特定类型,如交互过程中识别出的偏好、事实或教训。
- 执行会话中期检查点 (checkpoint),以保存当前进度并确保长时任务期间的数据持久化。
- 将本地记忆仓库与远程 Notion 页面同步,以维持单一事实来源。
- 使用 sleep 命令结束会话,生成移交摘要并为未来的会话定义后续步骤。
Memoria 配置指南
# 设置存储记忆文件的仓库路径
export MEMORIA_VAULT=~/memory
# 配置 Notion 集成以进行云端同步
memoria setup-notion --token --page
# 初始化会话
memoria wake
Memoria 数据架构与分类体系
Memoria 将数据组织成严格定义的分类体系,以优化 Openclaw Skills 内的检索效率。
| 类型 | 应用场景 |
|---|---|
| fact | 个人详细信息、位置、系统设置或静态数据。 |
| decision | 在开发生命周期中所做选择的理由。 |
| preference | 用户关于行为或输出格式的明确要求。 |
| lesson | 在任务中发现的技术见解或优化后的工作流。 |
| commitment | 智能体或用户做出的目标、截止日期或承诺。 |
| relationship | 关于合作者或利益相关者的上下文信息。 |
| project | 关于特定构建范围和状态的高层数据。 |
name: memoria
description: Structured memory system for AI agents. Use when the user wants to store, recall, or search memories, manage session lifecycle (wake/sleep/checkpoint), sync to Notion, or when the user shares important information that should be remembered (facts, decisions, preferences, lessons, commitments, relationships, projects).
Memoria
Environment
Set the vault path so all commands work:
export MEMORIA_VAULT=~/memory
If not set, pass -v ~/memory on every command.
Session Lifecycle
Run at the start and end of every session:
memoria wake # start session, restore context
memoria checkpoint --working-on "" # mid-session save
memoria sleep "" --next "" # end session, write handoff
Storing Memories
memoria remember "" --content ""
memoria sync --push # always sync after storing
Types: fact, decision, preference, lesson, commitment, relationship, project
What to capture (proactively, without being asked)
| Signal | Type |
|---|---|
| Human shares personal info (name, location, health, settings) | fact |
| A decision is made with reasoning | decision |
| Human says "I prefer / always / never..." | preference |
| An insight or lesson emerges | lesson |
| A promise, goal, or deadline is set | commitment |
| A person is mentioned with context | relationship |
| An ongoing project is discussed | project |
If in doubt, store it. Better to have a memory you never look up than to forget something.
Proactive capture triggers
Listen for these patterns and store immediately:
- "I always...", "I never...", "I prefer..." ->
preference - "Let's go with...", "We decided...", "The plan is..." ->
decision - "I learned that...", "Turns out...", "The trick is..." ->
lesson - "My name is...", "I take...", "I live in...", "I work at..." ->
fact - "I need to...", "I promised...", "By next week..." ->
commitment - "Talk to Alice about...", "Bob said..." ->
relationship - "We're building...", "The project is..." ->
project
Examples
memoria remember fact "Human lives in Tokyo" --content "Mentioned during onboarding"
memoria remember preference "No emojis in code" --content "Explicitly requested"
memoria remember decision "Use Fly.io" --content "Chosen over Vercel for APAC latency"
memoria sync --push
Searching
Before making decisions or giving advice, check existing memories:
memoria search ""
Other Commands
memoria store "" --content " " # store in explicit category
memoria list [category] # list documents
memoria get # get specific document
memoria status # vault stats + session state
memoria sync --pull # pull Notion changes to local
Notion Setup
One-time configuration:
memoria setup-notion --token --page
After setup, always run memoria sync --push after storing memories.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
信号管道:自动化营销情报工具 - Openclaw Skills
技能收益追踪器:监控 Openclaw 技能并实现变现
AI 合规准备就绪度:评估与治理工具 - Openclaw Skills
FOSMVVM ServerRequest 测试生成器:自动化 API 测试 - Openclaw Skills
酒店搜索器:AI 赋能的住宿与位置情报 - Openclaw Skills
Dub 链接 API:程序化链接管理 - Openclaw Skills
IntercomSwap:P2P BTC 与 USDT 跨链兑换 - Openclaw Skills
spotplay:macOS 原生 Spotify 播放控制 - Openclaw Skills
DeepSeek OCR:AI驱动的图像文本识别 - Openclaw Skills
Web Navigator:自动化网页研究与浏览 - Openclaw Skills
AI精选
