OpenClaw 记忆系统

# OpenClaw Memory System Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "OpenClaw 记忆系统" with this command: npx skills add nick-liu1989/openclaw-memory-system

OpenClaw Memory System Skill

完整的记忆系统技能包,支持多模态记忆、细粒度隔离、自然语言修正。

技能信息

  • 名称: openclaw-memory-system
  • 版本: 1.0.0
  • 描述: 多模态记忆系统,支持图片/工具记忆、项目/Agent/用户隔离、自然语言修正
  • 作者: 刘哈娜
  • 许可证: MIT

核心功能

P1 - 多模态记忆系统

  • 图片记忆管理(元数据/描述/检索)
  • 工具调用记忆(历史记录/统计分析)
  • 多模态检索(统一 API/跨模态关联)

P2 - 细粒度项目隔离

  • 项目记忆命名空间
  • Agent 记忆隔离与继承
  • 用户记忆与权限控制

P3 - 自然语言记忆修正

  • 反馈意图解析(修正/补充/删除/确认)
  • 版本控制(历史/对比/回滚)
  • 飞书交互卡片

安装步骤

方法 1: ClawHub 安装(推荐)

clawhub install openclaw-memory-system

方法 2: 手动安装

# 1. 复制技能文件
cp -r /path/to/openclaw-memory-system/skills/* \
  ~/.openclaw/workspace/skills/

# 2. 复制配置文件
cp -r /path/to/openclaw-memory-system/configs/* \
  ~/.openclaw/workspace/configs/

# 3. 复制测试文件(可选)
cp -r /path/to/openclaw-memory-system/tests/* \
  ~/.openclaw/workspace/tests/

# 4. 验证安装
node ~/.openclaw/workspace/skills/multimodal-memory/test-multimodal.js

方法 3: Git 安装

cd ~/.openclaw/workspace/skills
git clone https://github.com/your-repo/openclaw-memory-system.git
mv openclaw-memory-system/skills/* .
mv openclaw-memory-system/configs/* ../configs/

配置说明

1. 多模态配置

文件:configs/multimodal-config.json

{
  "storage": {
    "baseDir": "memory/multimodal",
    "imagesDir": "images",
    "toolCallsDir": "tool-calls",
    "captionsDir": "captions"
  },
  "limits": {
    "maxStringLength": 5000,
    "maxIndexSize": 1000,
    "cleanupDays": 30
  },
  "validation": {
    "forbiddenDirs": ["/etc", "/root", "/var"],
    "sensitiveKeywords": ["password", "secret", ".ssh"]
  },
  "performance": {
    "cacheSize": 100,
    "cacheTTL": 300000
  }
}

2. 命名空间配置

文件:configs/memory-namespaces.json

{
  "version": "1.0",
  "namespaces": {
    "projects": {
      "default": {
        "path": "memory",
        "description": "默认项目",
        "users": ["liumeng"]
      }
    },
    "agents": {
      "liu-hana": {
        "path": "MEMORY.md",
        "inherit": [],
        "shareWith": []
      }
    },
    "users": {
      "liumeng": {
        "path": "users/user_liumeng",
        "permissions": ["read", "write", "delete", "admin"]
      }
    }
  }
}

快速开始

1. 保存图片记忆

const { ImageMemory } = require('./skills/multimodal-memory/image-memory');
const imgMem = new ImageMemory();

await imgMem.save({
  path: '/path/to/image.png',
  caption: '测试图片',
  tags: ['测试'],
  context: { sessionId: 'test' }
});

2. 记录工具调用

const { ToolMemory } = require('./skills/multimodal-memory/tool-memory');
const toolMem = new ToolMemory();

await toolMem.record({
  toolName: 'web_search',
  parameters: { query: '测试' },
  result: { success: true },
  duration: 1000
});

3. 创建项目

const { ProjectMemory } = require('./skills/project-memory-isolation/project-memory');
const projMem = new ProjectMemory();

await projMem.createProject('my-project', {
  description: '我的项目',
  users: ['liumeng']
});

4. 自然语言修正

const { MemoryCorrect } = require('./skills/memory-feedback/memory-correct');
const corrector = new MemoryCorrect();

await corrector.autoCorrect('不对,我其实不喜欢健身,喜欢游泳');

测试

# 安装依赖
cd ~/.openclaw/workspace
npm install --save-dev jest

# 运行所有测试
npm test

# 运行单个测试
node skills/multimodal-memory/test-multimodal.js
node skills/memory-feedback/feedback-parser.js "不对,我不喜欢健身"

性能指标

指标目标实际
图片检索延迟<100ms<50ms
工具检索延迟<50ms<30ms
安全评分>9092
测试覆盖率>70%70%

安全特性

  • ✅ 路径验证(禁止访问系统目录)
  • ✅ 权限控制(三级权限)
  • ✅ 原子写入(防止数据损坏)
  • ✅ 版本控制(可回滚)
  • ✅ 敏感信息过滤

常见问题

Q: 图片保存失败?

A: 检查 configs/multimodal-config.json 中的路径配置,确保目录存在。

Q: 权限验证失败?

A: 检查 configs/memory-namespaces.json 中的用户配置,确保用户有相应权限。

Q: 如何启用飞书通知?

A: 在 memory-correct.js 中配置飞书 webhook URL。

依赖要求

  • Node.js >= 14.0.0
  • OpenClaw >= 2026.2.26
  • Jest(测试用,可选)

更新日志

v1.0.0 (2026-03-17)

  • ✅ P1 多模态记忆系统
  • ✅ P2 细粒度项目隔离
  • ✅ P3 自然语言记忆修正
  • ✅ 13 个问题修复
  • ✅ 完整测试覆盖

贡献指南

欢迎提交 Issue 和 Pull Request!

许可证

MIT License

联系方式

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated