mirror of
https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
synced 2026-09-21 09:28:19 +00:00
docs: add AI-friendly installation guide to README
This commit is contained in:
90
README.md
90
README.md
@ -6,6 +6,96 @@
|
||||
|
||||
---
|
||||
|
||||
## AI 自行安装指南
|
||||
|
||||
> 本节面向 AI Agent,按步骤指导你自主安装此插件到 OpenClaw 框架。
|
||||
|
||||
### 步骤 1:克隆仓库
|
||||
|
||||
```bash
|
||||
git clone https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
|
||||
cd TrulyMEM-TrueHumanMEM
|
||||
git checkout openclaw
|
||||
```
|
||||
|
||||
### 步骤 2:编译 TypeScript 插件
|
||||
|
||||
```bash
|
||||
cd ts/
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
编译成功后,`dist/` 目录会输出编译后的 JavaScript 文件。
|
||||
|
||||
### 步骤 3:安装 Skill(让 AI 能调用记忆工具)
|
||||
|
||||
将 `skills/` 目录下的 3 个 Skill 复制到 OpenClaw 的 Skill 目录。优先级:`<workspace>/skills/` > `~/.openclaw/skills/` > `~/.agents/skills/`
|
||||
|
||||
```bash
|
||||
# 方式 A:工作空间级(推荐,仅当前项目可用)
|
||||
cp -r skills/graph-memory <你的项目目录>/skills/graph-memory
|
||||
cp -r skills/graph-memory/persona <你的项目目录>/skills/graph-memory-persona
|
||||
cp -r skills/graph-memory/task <你的项目目录>/skills/graph-memory-task
|
||||
|
||||
# 方式 B:用户级(所有项目可用)
|
||||
cp -r skills/graph-memory ~/.openclaw/skills/graph-memory
|
||||
cp -r skills/graph-memory/persona ~/.openclaw/skills/graph-memory-persona
|
||||
cp -r skills/graph-memory/task ~/.openclaw/skills/graph-memory-task
|
||||
```
|
||||
|
||||
### 步骤 4:安装 Plugin(让 OpenClaw 运行时加载 Tool)
|
||||
|
||||
将 `ts/` 目录作为 OpenClaw 插件加载。在 `openclaw.json` 中添加:
|
||||
|
||||
```json5
|
||||
{
|
||||
"plugins": {
|
||||
"allow": ["@trulymem/openclaw-graph-memory"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
或者直接将编译后的 `ts/dist/` 目录链接到 OpenClaw 的插件目录:
|
||||
|
||||
```bash
|
||||
# 将插件目录软链接到 OpenClaw 插件路径
|
||||
ln -s <本项目的ts/dist目录> ~/.openclaw/plugins/graph-memory
|
||||
```
|
||||
|
||||
### 步骤 5:验证安装
|
||||
|
||||
启动 OpenClaw 后,发送以下消息测试:
|
||||
|
||||
```
|
||||
请记住:我喜欢编程,正在学习 TypeScript
|
||||
```
|
||||
|
||||
AI 应调用 `graph_memory` 工具的 `commit` action 并返回成功确认。
|
||||
|
||||
然后测试检索:
|
||||
|
||||
```
|
||||
我之前说过喜欢什么?
|
||||
```
|
||||
|
||||
AI 应调用 `recall` action 并返回之前写入的信息。
|
||||
|
||||
### 步骤 6:确认 Skill 已加载
|
||||
|
||||
在 OpenClaw 中执行:
|
||||
|
||||
```
|
||||
/skills
|
||||
```
|
||||
|
||||
你应该能看到以下 3 个 Skill:
|
||||
- `graph-memory` - 记忆 CRUD
|
||||
- `graph-memory-persona` - 人设管理
|
||||
- `graph-memory-task` - 任务管理
|
||||
|
||||
---
|
||||
|
||||
## 简介
|
||||
|
||||
本项目是 OpenClaw 的图记忆插件,基于 SQLite 实现持久化图数据库。
|
||||
|
||||
89
README_EN.md
89
README_EN.md
@ -6,6 +6,95 @@ Give AI true long-term memory capability - OpenClaw framework plugin version
|
||||
|
||||
---
|
||||
|
||||
## AI Self-Installation Guide
|
||||
|
||||
> This section is for AI Agents. Follow these steps to install this plugin into your OpenClaw framework.
|
||||
|
||||
### Step 1: Clone the repository
|
||||
|
||||
```bash
|
||||
git clone https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
|
||||
cd TrulyMEM-TrueHumanMEM
|
||||
git checkout openclaw
|
||||
```
|
||||
|
||||
### Step 2: Build the TypeScript plugin
|
||||
|
||||
```bash
|
||||
cd ts/
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
After successful build, the `dist/` directory contains compiled JavaScript files.
|
||||
|
||||
### Step 3: Install Skills (enables AI to call memory tools)
|
||||
|
||||
Copy the 3 Skills from `skills/` to OpenClaw's skill directory. Priority: `<workspace>/skills/` > `~/.openclaw/skills/` > `~/.agents/skills/`
|
||||
|
||||
```bash
|
||||
# Option A: Workspace-level (recommended, current project only)
|
||||
cp -r skills/graph-memory <your-project-dir>/skills/graph-memory
|
||||
cp -r skills/graph-memory/persona <your-project-dir>/skills/graph-memory-persona
|
||||
cp -r skills/graph-memory/task <your-project-dir>/skills/graph-memory-task
|
||||
|
||||
# Option B: User-level (available for all projects)
|
||||
cp -r skills/graph-memory ~/.openclaw/skills/graph-memory
|
||||
cp -r skills/graph-memory/persona ~/.openclaw/skills/graph-memory-persona
|
||||
cp -r skills/graph-memory/task ~/.openclaw/skills/graph-memory-task
|
||||
```
|
||||
|
||||
### Step 4: Install Plugin (enables OpenClaw runtime to load the Tool)
|
||||
|
||||
Load the `ts/` directory as an OpenClaw plugin. Add to `openclaw.json`:
|
||||
|
||||
```json5
|
||||
{
|
||||
"plugins": {
|
||||
"allow": ["@trulymem/openclaw-graph-memory"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Or symlink the compiled `ts/dist/` directory to OpenClaw's plugin directory:
|
||||
|
||||
```bash
|
||||
ln -s <path-to-ts/dist> ~/.openclaw/plugins/graph-memory
|
||||
```
|
||||
|
||||
### Step 5: Verify installation
|
||||
|
||||
After starting OpenClaw, send this message to test:
|
||||
|
||||
```
|
||||
Please remember: I like programming and I'm learning TypeScript
|
||||
```
|
||||
|
||||
The AI should call the `graph_memory` tool's `commit` action and return a success confirmation.
|
||||
|
||||
Then test recall:
|
||||
|
||||
```
|
||||
What did I say I like?
|
||||
```
|
||||
|
||||
The AI should call the `recall` action and return the previously stored information.
|
||||
|
||||
### Step 6: Confirm Skills are loaded
|
||||
|
||||
In OpenClaw, run:
|
||||
|
||||
```
|
||||
/skills
|
||||
```
|
||||
|
||||
You should see these 3 Skills:
|
||||
- `graph-memory` - Memory CRUD
|
||||
- `graph-memory-persona` - Persona management
|
||||
- `graph-memory-task` - Task management
|
||||
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
This project is an OpenClaw plugin for graph-based memory with SQLite persistence.
|
||||
|
||||
Reference in New Issue
Block a user