作者:互联网 时间: 2026-08-08 20:25:01
记忆设置技能是一个全面的配置框架,旨在消除 AI 驱动的开发工作流中的上下文丢失。通过利用 Openclaw Skills,开发者可以将他们的智能体从无状态的参与者转变为具备上下文感知能力的助手,能够跨多个会话记住过去的决策、项目历史和特定的用户偏好。
该技能建立了一个结构化的环境,使用语义搜索来存储和检索信息。它与嵌入提供商集成,对每日日志、会话转录和精选的长期记忆文件进行索引。这确保了智能体能够主动召回相关的技术细节,减少重复提问并提高复杂软件项目的连续性。
下载入口:https://github.com/openclaw/skills/tree/main/skills/jrbobbyhansen-pixel/memory-setup从源直接安装技能的最快方式。
npx clawhub@latest install memory-setup
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 memory-setup。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
要通过 Openclaw Skills 启用持久上下文,请将以下配置添加到您的 ~/.clawdbot/clawdbot.json 或 moltbot.json 文件中:
{
"memorySearch": {
"enabled": true,
"provider": "voyage",
"sources": ["memory", "sessions"],
"indexMode": "hot",
"minScore": 0.3,
"maxResults": 20
}
}
使用以下命令初始化您的工作区目录结构:
mkdir -p memory/logs memory/projects memory/groups memory/system
touch MEMORY.md
最后,确保在您的环境中导出或在智能体的秘密管理中添加 Voyage AI 或 OpenAI 等提供商的 API 密钥。
该技能利用分层 Markdown 模式来组织和索引信息,以便高效检索。
| 数据组件 | 位置 | 内容类型 |
|---|---|---|
| 长期记忆 | /MEMORY.md |
精选事实、项目摘要和决策 |
| 每日活动 | /memory/logs/ |
记录每日任务的日期标记日志 (YYYY-MM-DD.md) |
| 项目上下文 | /memory/projects/ |
详细的技术文档和特定于项目的笔记 |
| 用户偏好 | /memory/system/ |
开发环境设置和沟通风格 |
| 会话历史 | /sessions/ |
自动生成的对话转录 |
name: memory-setup
description: Enable and configure Moltbot/Clawdbot memory search for persistent context. Use when setting up memory, fixing "goldfish brain," or helping users configure memorySearch in their config. Covers MEMORY.md, daily logs, and vector search setup.
Transform your agent from goldfish to elephant. This skill helps configure persistent memory for Moltbot/Clawdbot.
Add to ~/.clawdbot/clawdbot.json (or moltbot.json):
{
"memorySearch": {
"enabled": true,
"provider": "voyage",
"sources": ["memory", "sessions"],
"indexMode": "hot",
"minScore": 0.3,
"maxResults": 20
}
}
In your workspace, create:
workspace/
├── MEMORY.md # Long-term curated memory
└── memory/
├── logs/ # Daily logs (YYYY-MM-DD.md)
├── projects/ # Project-specific context
├── groups/ # Group chat context
└── system/ # Preferences, setup notes
Create MEMORY.md in workspace root:
# MEMORY.md — Long-Term Memory
## About [User Name]
- Key facts, preferences, context
## Active Projects
- Project summaries and status
## Decisions & Lessons
- Important choices made
- Lessons learned
## Preferences
- Communication style
- Tools and workflows
| Setting | Purpose | Recommended |
|---|---|---|
enabled |
Turn on memory search | true |
provider |
Embedding provider | "voyage" |
sources |
What to index | ["memory", "sessions"] |
indexMode |
When to index | "hot" (real-time) |
minScore |
Relevance threshold | 0.3 (lower = more results) |
maxResults |
Max snippets returned | 20 |
voyage — Voyage AI embeddings (recommended)openai — OpenAI embeddingslocal — Local embeddings (no API needed)memory — MEMORY.md + memory/*.md filessessions — Past conversation transcriptsboth — Full context (recommended)Create memory/logs/YYYY-MM-DD.md daily:
# YYYY-MM-DD — Daily Log
## [Time] — [Event/Task]
- What happened
- Decisions made
- Follow-ups needed
## [Time] — [Another Event]
- Details
Add to your AGENTS.md for agent behavior:
## Memory Recall
Before answering questions about prior work, decisions, dates, people, preferences, or todos:
1. Run memory_search with relevant query
2. Use memory_get to pull specific lines if needed
3. If low confidence after search, say you checked
memorySearch.enabled: true in configclawdbot gateway restartminScore to 0.2 for more resultsmaxResults to 30VOYAGE_API_KEY in environmentOPENAI_API_KEY in environmentlocal provider if no API keys availableTest memory is working:
User: "What do you remember about [past topic]?"
Agent: [Should search memory and return relevant context]
If agent has no memory, config isn't applied. Restart gateway.
{
"memorySearch": {
"enabled": true,
"provider": "voyage",
"sources": ["memory", "sessions"],
"indexMode": "hot",
"minScore": 0.3,
"maxResults": 20
},
"workspace": "/path/to/your/workspace"
}
Without memory:
With memory:
Goldfish → Elephant. ??