Overview
- Skill Key
- 2830201534/pidan-memory
- Author
- 2830201534
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/2830201534/pidan-memory
- Latest Commit SHA
- 166c5fc560eda01e9ca5cbce1d55febf7f07ef2c
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Pidan Memory 技能。 若已安装,则直接安装 Pidan Memory 技能。
# Pidan Memory Skill
本地持久化向量记忆系统,为 AI Assistant 提供长期记忆能力。支持多用户/共享模式。
## 概述
基于 **LanceDB + Ollama** 实现的本地向量记忆系统,支持语义搜索和多用户隔离。
## 架构
```
用户输入 → Ollama (向量化) → LanceDB (存储/搜索)
↑
nomic-embed-text (768维向量)
```
## 功能
### 1. 自动记忆(推荐)
**安装 Hook 后自动生效,无需手动调用!**
每次对话后自动评估并存储重要信息,覆盖 16 大类场景。
**安装方式:**
```bash
# 1. 复制文件
mkdir -p ~/.openclaw/hooks/pidan-memory
cp HOOK.md handler.ts ~/.openclaw/hooks/pidan-memory/
cp auto_memory.py ~/.openclaw/workspace/memory/
# 2. 启用
openclaw hooks enable pidan-memory
openclaw gateway restart
```
### 2. 记住信息 (remember)
手动存储重要信息到向量数据库
**参数:**
- `content`: 记忆内容 (必填)
- `summary`: 摘要 (可选)
- `importance`: 重要程度 1-5 (默认 3)
- `user_id`: 用户 ID (默认 default)
**示例:**
```json
{
"command": "remember",
"parameters": {
"content": "用户最喜欢吃火锅",
"summary": "饮食偏好",
"importance": 4,
"user_id": "default"
}
}
```
### 3. 搜索记忆 (recall)
语义向量搜索
**参数:**
- `query`: 搜索关键词
- `limit`: 返回数量 (默认 5)
- `user_id`: 用户 ID
### 4. 获取最近记忆 (recent_memories)
获取用户的有权限访问的记忆
### 5. 模式管理
#### 获取当前模式 (get_mode)
```json
{
"command": "get_mode",
"parameters": {}
}
```
#### 设置模式 (set_mode)
```json
{
"command": "set_mode",
"parameters": {
"mode": "private" // 或 "shared"
}
}
```
**模式说明:**
- `private`: 多用户模式(默认),每个用户记忆独立隔离
- `shared`: 共享模式,所有用户可互相查询共享记忆
### 6. 删除记忆 (delete_memory)
删除记忆(需二次确认,只有创建人可删除)
**参数:**
- `memory_id`: 记忆 ID (必填)
- `confirm`: 是否确认删除 (默认 false)
**首次请求(获取确认):**
```json
{
"command": "delete_memory",
"parameters": {
"memory_id": "uuid-xxx",
"confirm": false
}
}
```
**确认删除:**
```json
{
"command": "delete_memory",
"parameters":...
# 🧠 Pidan Memory
本地持久化向量记忆系统,为 AI Assistant 提供长期记忆能力。
[简体中文](./README.md) | [English](./README_EN.md)
## ✨ 特性
- 📦 **向量存储** - 基于 LanceDB + Ollama,本地向量语义搜索
- 🔄 **自动记忆** - 每次对话自动评估存储(需安装 Hook)
- 👥 **多用户/共享模式** - 支持私有隔离和共享模式切换
- 🧹 **自动去重** - 每 20 条自动触发去重
- 🔐 **安全删除** - 只有创建人可删除,需二次确认
- 🔍 **语义搜索** - 支持自然语言查询
## 快速开始
### 1. 安装
```bash
# 方式一:ClawHub 安装(推荐)
clawhub install pidan-memory
# 方式二:手动安装
cd ~/.openclaw/workspace/skills
git clone https://github.com/your-repo/pidan-memory.git
```
### 2. 启动 Ollama
```bash
# 启动 Ollama 服务
ollama serve
# 下载 embedding 模型(首次)
ollama pull nomic-embed-text
```
### 3. 安装 Hook(启用自动记忆)
```bash
# 复制 Hook 文件
mkdir -p ~/.openclaw/hooks/pidan-memory
cp HOOK.md handler.ts ~/.openclaw/hooks/pidan-memory/
cp auto_memory.py ~/.openclaw/workspace/memory/
# 启用 Hook
openclaw hooks enable pidan-memory
# 重启 Gateway
openclaw gateway restart
```
## 使用方法
### 自动记忆(推荐)
安装 Hook 后,每次对话自动评估并存储。覆盖 16 大类场景。
### 模式管理
```bash
# 获取当前模式
echo '{"command": "get_mode", "parameters": {}}' | python3 run.py
# 切换到共享模式
echo '{"command": "set_mode", "parameters": {"mode": "shared"}}' | python3 run.py
# 切换回私有模式
echo '{"command": "set_mode", "parameters": {"mode": "private"}}' | python3 run.py
```
**模式说明:**
- `private` (默认): 多用户模式,记忆隔离
- `shared`: 共享模式,所有用户可互相查询
### 其他命令
```bash
# 记住信息
echo '{"command": "remember", "parameters": {"content": "用户最喜欢吃火锅", "importance": 4}}' | python3 run.py
# 搜索记忆
echo '{"command": "recall", "parameters": {"query": "饮食偏好"}}' | python3 run.py
# 查看最近记忆
echo '{"command": "recent_memories", "parameters": {"limit": 10}}' | python3 run.py
# 删除记忆(首次请求,确认)
echo '{"command": "delete_memory", "parameters": {"memory_id"...
heyixuan2
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).
capt-marbles
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.
carlulsoe
Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, or processing voice recordings locally without cloud APIs.
carlzhao007
飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化。 使用场景:飞书自动化工作流、任务进度追踪、批量任务处理、需要实时反馈的场景。
cartoonitunes
BottyFans agent skill for autonomous creator monetization. Lets AI agents register, build a profile, publish posts (public, subscriber-only, or pay-to-unlock), upload media, accept USDC subscriptions and tips on Base, send and receive DMs, track earnings, and appear on the creator leaderboard. Use this skill when an agent needs to monetize content, interact with fans, manage a creator profile, handle payments in USDC, or operate as an autonomous creator on the BottyFans platform.
camopel
Free multi-engine web search via ddgs CLI (DuckDuckGo, Google, Bing, Brave, Yandex, Yahoo, Wikipedia) + arXiv API search. No API keys required. Use when user needs web search, research paper discovery, or when other skills need a search backend. Drop-in replacement for web-search-plus.