STQ项目文档 文档整理
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
# 3 Essential Tools for OpenClaw
|
||||
|
||||
**Source**: https://x.com/_sean_matthew/status/2028902126005653889
|
||||
**Author**: Sean Matthew (Verified)
|
||||
**Published**: March 4, 2026 at 2:35 AM
|
||||
**Views**: 6,484 | **Reposts**: 13 | **Likes**: 76 | **Bookmarks**: 113
|
||||
|
||||
---
|
||||
|
||||
For the last few weeks, I've been running OpenClaw on a dedicated Mac Mini as my personal AI agent. It's got access to Telegram, my calendar, task manager, my YouTube channel, my Obsidian vault, and many other useful things. But even after wiring up all those integrations, I still found there were three big gaps.
|
||||
|
||||
Because here's the thing: out of the box, OpenClaw can't send emails, can't remember what you worked on last week (at least not very well), and can't reliably browse the web.
|
||||
|
||||
What I will show you below are three tools that fix all of that, plus the exact prompts you can paste into Claude Code to set each one up in minutes.
|
||||
|
||||
I have a full video walkthrough of this setup on YouTube, which you can access here: https://www.youtube.com/watch?v=QvfqAMUJTT4
|
||||
|
||||
---
|
||||
|
||||
## Before You Start
|
||||
|
||||
Make sure you have OpenClaw installed. On whatever machine you're running it, open a Terminal and run this:
|
||||
|
||||
```bash
|
||||
cd ~/.openclaw
|
||||
```
|
||||
|
||||
This puts you in the OpenClaw workspace folder. Launch Claude Code, Codex, or whatever coding agent you like from this directory. All of the following steps assume you're in this directory.
|
||||
|
||||
---
|
||||
|
||||
## Side Note: Why Not Use OpenClaw Itself Here?
|
||||
|
||||
You might be wondering: why not just have OpenClaw install its own skills and tools? It can absolutely do that, and I use it that way frequently. But just as often, I use Claude Code as the background architect of my OpenClaw. There's a reason why I have the Claude Max plan, and I like to use it to its fullest. But as you probably know, Anthropic has [cracked](https://www.theregister.com/2026/02/20/anthropic_clarifies_ban_third_party_claude_access/) [down](https://www.reddit.com/r/ClaudeAI/comments/1r8ecyq/anthropic_bans_oauth_tokens_from_consumer_plans/) on people using their Claude subscriptions with OpenClaw, basically making API keys the only truly "safe" path for now. So in almost all cases, you're paying per-token to run OpenClaw, whether that's through Anthropic, OpenAI, OpenRouter, or whatever provider you're using.
|
||||
|
||||
So, to answer the question above, I use Claude Code to build all of OpenClaw's systems, skills, and workflows. When OpenClaw is actually running day-to-day, it's not burning through tokens to fix faulty setups. It's executing systems that were built precisely with Claude Code.
|
||||
|
||||
---
|
||||
|
||||
## How Skills Work in OpenClaw
|
||||
|
||||
Before we get into the tools, a quick note on how OpenClaw learns new capabilities. There are two ways to add skills:
|
||||
|
||||
1. **Manually** — You teach OpenClaw how to use a tool by creating a SKILL.md file with all the instructions it needs to use the tool. You can use any agent to build this out.
|
||||
2. **ClawHub** — This is OpenClaw's skill registry, basically a repository of pre-built skills you can install. Some come from the OpenClaw creator himself, some are official skills from tool authors, and some are community-contributed.
|
||||
|
||||
A word of warning on ClawHub: There have been reports of malware being deployed on the site. Exercise caution when downloading skills (stick to official or well-known authors). All three skills in this guide come from verified sources.
|
||||
|
||||
To install ClawHub (one-time setup):
|
||||
|
||||
```bash
|
||||
npm i -g clawhub
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tool 1: AgentMail: Give Your Agent Its Own Email
|
||||
|
||||
[AgentMail](https://agentmail.to) is a Y Combinator-backed startup that built an email platform specifically for AI agents. The idea is simple: your agent gets its own real email inbox. This is not Gmail and does not come with the inherent risks of signing up for Google accounts (i.e., account banning). This is an inbox designed from the ground up for agents to send and receive emails programmatically.
|
||||
|
||||
### Create an account
|
||||
|
||||
Go to [agentmail.to](https://agentmail.to) and click "Get Started." You can sign up with Google, and it's free. There are paid plans, but the free tier is very generous and gives you up to 3 inboxes. You'll go through a simple onboarding to create your first inbox. The address will be yourname@agentmail.to. Copy this inbox name, as you'll need it in a minute.
|
||||
|
||||
### Grab your API key
|
||||
|
||||
In the AgentMail dashboard, go to the API keys section and generate your first key. Keep a copy of that handy.
|
||||
|
||||
### Paste this prompt into Claude Code
|
||||
|
||||
Use this prompt to install the AgentMail skill for Open Claw and connect your OpenClaw to all the necessary tools it needs to send and receive email through your new AgentMail inbox.
|
||||
|
||||
```markdown
|
||||
Set up AgentMail for my OpenClaw agent. The AgentMail skill docs and reference are at: https://clawhub.ai/adboio/agentmail Make sure to:
|
||||
1. The AgentMail skill is already installed via clawhub (if not installed, please do so)
|
||||
2. Configure the AGENTMAIL_API_KEY in my openclaw.json. My key is: [YOUR_KEY] under skills.entries.agentmail
|
||||
3. My agent's inbox is: [YOUR_INBOX]
|
||||
4. Install the Python SDK (pip install agentmail python-dotenv)
|
||||
5. Test sending and receiving an email
|
||||
```
|
||||
|
||||
Replace [YOUR_KEY] and [YOUR_INBOX] with the values you saved earlier. Claude Code will handle the rest.
|
||||
|
||||
### What this looks like in practice
|
||||
|
||||
In the full walkthrough video I linked above, I forwarded a newsletter I received in my personal email to my AgentMail inbox. OpenClaw picked it up and immediately pinged me on Telegram to let me know something landed in the inbox. I asked it to give me the main takeaways, and it came back with a clean summary of the entire email.
|
||||
|
||||
That's a simple personal use case: I'm forwarding invoices, newsletters, and other stuff from my day-to-day life to Jarvis (my OpenClaw agent), and it gives me summaries and action items.
|
||||
|
||||
But you could take this much further:
|
||||
|
||||
- Set up a **support inbox** where your agent handles first-line responses to customer inquiries
|
||||
- Have it **process incoming invoices** and extract key details
|
||||
- Build a **daily email digest** that your agent compiles and sends to you on Telegram
|
||||
- Route different types of emails to different agent workflows via webhooks
|
||||
|
||||
The possibilities are really endless.
|
||||
|
||||
---
|
||||
|
||||
## Tool 2: QMD: Upgrade the Agent's Memory
|
||||
|
||||
This might be the single biggest upgrade you can make to your OpenClaw. Let me explain the problem first.
|
||||
|
||||
### The problem with default memory
|
||||
|
||||
Out of the box, OpenClaw has a memory system. When you interact with it, it creates markdown files stored in a local SQLite database. Anytime you want to ask about previous work or past sessions, it uses keyword-based search to find relevant memories.
|
||||
|
||||
The problem is obvious: if you ask "hey, what did we do with XYZ last week?" but the actual conversation used different words, the keyword search fails. So your agent easily forgets things you've worked on.
|
||||
|
||||
And it gets worse over time. The more you interact with OpenClaw and the more memories you accumulate, the more bloated your queries get. You're pulling in a ton of irrelevant tokens every time you ask about history, which burns through API costs and makes your agent slower and dumber.
|
||||
|
||||
### What QMD is
|
||||
|
||||
[QMD](https://github.com/tobi/qmd) is an open-source tool built by Tobi Lutke (the CEO of Shopify). It's a local hybrid search engine for markdown files that combines three search strategies:
|
||||
|
||||
1. **Keyword search** (traditional matching, same as OpenClaw's default memory system)
|
||||
2. **Vector semantic search** (understands meaning, not just exact words)
|
||||
3. **LLM-powered re-ranker** (scores results by actual relevance)
|
||||
|
||||
The key thing: it all runs entirely on your machine. No API keys, no cloud services, no data leaving your computer. It downloads some small local models (they don't take up much space) and everything happens locally and efficiently.
|
||||
|
||||
### Setup
|
||||
|
||||
Paste this prompt into ClaudeCode to install QMD and hook it up to your OpenClaw as its memory backbone:
|
||||
|
||||
```markdown
|
||||
Set up QMD as the memory backend for my OpenClaw agent. Follow the official docs here: https://docs.openclaw.ai/concepts/memory#qmd-backend-experimental Make sure to:
|
||||
1. Install the QMD CLI
|
||||
2. Install SQLite with extension support if needed (macOS: brew install sqlite)
|
||||
3. Configure memory.backend = "qmd" in my openclaw.json
|
||||
4. Add my workspace memory files as a QMD collection
|
||||
5. Run the initial embed so models are downloaded and the index is built
|
||||
6. Verify it works by running a test query
|
||||
```
|
||||
|
||||
If I had to pick just one tool from this entire list, it's QMD. The memory upgrade is the single biggest quality-of-life improvement for OpenClaw.
|
||||
|
||||
---
|
||||
|
||||
## Tool 3: Agent-Browser: Give the Agent a Better Browser
|
||||
|
||||
[Agent-browser](https://github.com/vercel-labs/agent-browser) is a CLI tool from Vercel that gives your AI agent a real web browser. This is not just fetching and scraping HTML. This is an actual Chromium browser that can navigate pages, click on things, take screenshots, fill out forms, etc. Basically any interaction a user could have in a browser.
|
||||
|
||||
### Why agent-browser instead of Playwright?
|
||||
|
||||
If you've used Playwright with an AI agent before, you've probably noticed how token-inefficient it is. Every time Playwright interacts with a website, it generates a ton of information. Your AI agent has to process all of that, which fills up its context window and ultimately gives you a worse outcome.
|
||||
|
||||
Agent-browser takes a completely different approach. Everything Playwright can do, agent-browser can do with **93% less tokens**. That's a massive difference for an always-on agent: it means your agent can do a lot more browsing for a lot less money.
|
||||
|
||||
### Install the CLI
|
||||
|
||||
```bash
|
||||
npm install -g agent-browser
|
||||
```
|
||||
|
||||
### Paste this prompt into Claude Code
|
||||
|
||||
```markdown
|
||||
Install the agent-browser skill for my OpenClaw agent. The agent-browser SKILL.md and reference docs are at: https://github.com/vercel-labs/agent-browser/tree/main/skills/agent-browser Follow the OpenClaw skills docs here: https://docs.openclaw.ai/tools/skills Make sure to:
|
||||
1. Install the agent-browser skill into ~/.openclaw/skills/agent-browser/ so it's available to all my agents
|
||||
2. Include the SKILL.md and any reference docs from the repo
|
||||
3. Verify the skill shows up as eligible
|
||||
4. Whenever my agent needs to access the internet or browse a web page, it should use agent-browser
|
||||
```
|
||||
|
||||
This prompt pulls the agent-browser skills from GitHub, installs them on your machine, and tells OpenClaw that anytime it needs to browse the web, it should use agent-browser. Once installed, the skill is available to OpenClaw, as well as Claude Code, Codex, or any other AI agent running on that machine.
|
||||
|
||||
In the walkthrough video I linked above, I showed a simple use case for agent-browser: navigating to Hacker News and summarizing what is trending for the day. I ran it through the command line to show its speed (42s to complete the whole task) and then ran the same workflow through Telegram (which pings my OpenClaw to run the same agent-browser commands). These are relatively simple use cases, but there are ton of different directions you can take agent-browser:
|
||||
|
||||
### Advanced use cases
|
||||
|
||||
- **No-API workflows** — Any site or service that doesn't have an API, where you have to go to a web console or dashboard to interact with it, your agent can now handle that. Fill out forms, export reports, change settings, etc.
|
||||
- **Self-verifying code** — When your agent makes code changes, it can open a preview URL in an actual browser and verify the fix worked. This is a typical workflow for Playwright, but as I mentioned, agent-browser can do it much faster.
|
||||
- **Website monitoring** — Track price drops, product listings, back-in-stock alerts, job listings, or any changes on any page.
|
||||
- **Security guardrails** — This is not a use case per se, but I'll just point out that agent-browser has built-in prompt injection defenses. It's not perfect, but it provides an extra line of defense so your agent isn't getting poisoned by malicious content on the web.
|
||||
- **Electron apps** — This is brand new. Agent-browser has an Electron skill that lets it control desktop apps (e.g., Slack, Notion, VS Code, Discord). I haven't tested this one out yet, but it opens up a whole new category of automation beyond just web browsing.
|
||||
|
||||
---
|
||||
|
||||
## Recap
|
||||
|
||||
There you have it. Three tools, three simple upgrades:
|
||||
|
||||
1. **AgentMail** gives your agent its own dedicated email inbox
|
||||
2. **QMD** gives your agent real semantic memory that actually works
|
||||
3. **Agent-Browser** gives your agent a better, faster, cheaper way to browse the web
|
||||
|
||||
Each one takes only a few minutes to set up, but together they turn a basic OpenClaw install into something that actually feels like a useful assistant.
|
||||
|
||||
Start with QMD. Then hook up all three. I promise that it's worth it.
|
||||
|
||||
---
|
||||
|
||||
## Resources
|
||||
|
||||
- [AgentMail](https://agentmail.to)
|
||||
- [AgentMail skill (ClawHub)](https://clawhub.ai/adboio/agentmail)
|
||||
- [QMD](https://github.com/tobi/qmd)
|
||||
- [OpenClaw Memory Docs (QMD)](https://docs.openclaw.ai/concepts/memory#qmd-backend-experimental)
|
||||
- [Agent-Browser](https://github.com/vercel-labs/agent-browser)
|
||||
- [OpenClaw Skills Docs](https://docs.openclaw.ai/tools/skills)
|
||||
- [ClawHub](https://clawhub.ai)
|
||||
@@ -1,42 +0,0 @@
|
||||
# AgentMail 通知设置
|
||||
|
||||
**创建时间**: 2026-03-25
|
||||
|
||||
## 概述
|
||||
|
||||
已配置 cron job 定期检查 AgentMail 收件箱,新邮件将发送通知到 Slack。
|
||||
|
||||
## 配置详情
|
||||
|
||||
### AgentMail 收件箱
|
||||
- **地址**: xinghui@agentmail.to
|
||||
- **API Key**: am_us_inbox_f6bb4fa4377b77f06a6a9e88a8642cdc6065c05c812241f4350f957c6a32aeef
|
||||
|
||||
### Cron Job
|
||||
- **名称**: Check AgentMail Inbox
|
||||
- **频率**: 每 5 分钟
|
||||
- **任务**: 检查收件箱新邮件(非发送的邮件),并发送摘要到 Slack
|
||||
- **通知渠道**: Slack (user:U0AMK6TPUHG)
|
||||
|
||||
### Cron Job ID
|
||||
```
|
||||
b362be68-92d2-4283-8e9a-a159e97b5797
|
||||
```
|
||||
|
||||
## 相关命令
|
||||
|
||||
```bash
|
||||
# 查看 cron jobs
|
||||
openclaw cron list
|
||||
|
||||
# 查看特定 job 详情
|
||||
openclaw cron get b362be68-92d2-4283-8e9a-a159e97b5797
|
||||
|
||||
# 删除 cron job
|
||||
openclaw cron delete b362be68-92d2-4283-8e9a-a159e97b5797
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
|
||||
- AgentMail 技能需要安装: `pip install agentmail socksio`
|
||||
- 如果需要更实时的通知,可以考虑配置 Webhook(需要公网 URL)
|
||||
@@ -1,473 +0,0 @@
|
||||
大多数 AI 智能体都有"失忆症"——每次新对话,之前聊过的全部清零。
|
||||
|
||||
memory-lancedb-pro 是 OpenClaw 的生产级长期记忆插件,把你的智能体变成一个真正的 AI 记忆助理——自动捕捉重要信息,让噪音自然衰减,在恰当的时候回忆起恰当的内容。无需手动标记,无需复杂配置。
|
||||
|
||||
没有记忆——每次都从零开始:
|
||||
|
||||
你: "缩进用 tab,所有函数都要加错误处理。"
|
||||
(下一次会话)
|
||||
你: "我都说了用 tab 不是空格!" 😤
|
||||
(再下一次会话)
|
||||
你: "……我真的说了第三遍了,tab,还有错误处理。"
|
||||
|
||||
有了 memory-lancedb-pro——你的智能体学会了、记住了:
|
||||
|
||||
你: "缩进用 tab,所有函数都要加错误处理。"
|
||||
(下一次会话——智能体自动回忆你的偏好)
|
||||
智能体: (默默改成 tab 缩进,并补上错误处理) ✅
|
||||
你: "上个月我们为什么选了 PostgreSQL 而不是 MongoDB?"
|
||||
智能体: "根据我们 2 月 12 日的讨论,主要原因是……" ✅
|
||||
|
||||
这就是 AI 记忆助理 的价值——学习你的风格,回忆过去的决策,提供个性化的回应,不再让你重复自己。
|
||||
|
||||
你能得到的
|
||||
|
||||
自动捕捉
|
||||
智能体从每次对话中学习——不需要手动调用 memory_store
|
||||
|
||||
智能提取
|
||||
LLM 驱动的 6 类分类:用户画像、偏好、实体、事件、案例、模式
|
||||
|
||||
智能遗忘
|
||||
Weibull 衰减模型——重要记忆留存,噪音自然消退
|
||||
|
||||
混合检索
|
||||
向量 + BM25 全文搜索,融合交叉编码器重排序
|
||||
|
||||
上下文注入
|
||||
相关记忆在每次回复前自动浮现
|
||||
|
||||
多作用域隔离
|
||||
按智能体、按用户、按项目隔离记忆边界
|
||||
|
||||
任意 Provider
|
||||
OpenAI、Jina、Gemini、Ollama 或任意 OpenAI 兼容 API
|
||||
|
||||
完整工具链
|
||||
CLI、备份、迁移、升级、导入导出——生产可用
|
||||
|
||||
社区维护的 安装脚本 一条命令搞定安装、升级和修复:
|
||||
|
||||
curl -fsSL https://raw.githubusercontent.com/CortexReach/toolbox/main/memory-lancedb-pro-setup/setup-memory.sh -o setup-memory.sh
|
||||
bash setup-memory.sh
|
||||
|
||||
脚本覆盖的完整场景和其他社区工具,详见下方 生态工具。
|
||||
|
||||
通过 OpenClaw CLI(推荐):
|
||||
|
||||
openclaw plugins install memory-lancedb-pro@beta
|
||||
|
||||
或通过 npm:
|
||||
|
||||
npm i memory-lancedb-pro@beta
|
||||
|
||||
如果用 npm 安装,你还需要在 openclaw.json 的 plugins.load.paths 中添加插件安装目录的 绝对路径。这是最常见的安装问题。
|
||||
|
||||
在 openclaw.json 中添加配置:
|
||||
|
||||
{
|
||||
"plugins": {
|
||||
"slots": { "memory": "memory-lancedb-pro" },
|
||||
"entries": {
|
||||
"memory-lancedb-pro": {
|
||||
"enabled": true,
|
||||
"config": {
|
||||
"embedding": {
|
||||
"provider": "openai-compatible",
|
||||
"apiKey": "${OPENAI_API_KEY}",
|
||||
"model": "text-embedding-3-small"
|
||||
},
|
||||
"autoCapture": true,
|
||||
"autoRecall": true,
|
||||
"smartExtraction": true,
|
||||
"extractMinMessages": 2,
|
||||
"extractMaxChars": 8000,
|
||||
"sessionMemory": { "enabled": false }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
为什么用这些默认值?
|
||||
|
||||
- autoCapture + smartExtraction → 智能体自动从每次对话中学习
|
||||
|
||||
- autoRecall → 相关记忆在每次回复前自动注入
|
||||
|
||||
- extractMinMessages: 2 → 正常两轮对话即触发提取
|
||||
|
||||
- sessionMemory.enabled: false → 避免会话摘要在初期污染检索结果
|
||||
|
||||
验证并重启:
|
||||
|
||||
openclaw config validate
|
||||
openclaw gateway restart
|
||||
openclaw logs --follow --plain | grep "memory-lancedb-pro"
|
||||
|
||||
你应该能看到:
|
||||
|
||||
- memory-lancedb-pro: smart extraction enabled
|
||||
|
||||
- memory-lancedb-pro@...: plugin registered
|
||||
|
||||
完成!你的智能体现在拥有长期记忆了。
|
||||
|
||||
更多安装路径(已有用户、升级)
|
||||
已在使用 OpenClaw?
|
||||
|
||||
- 在 plugins.load.paths 中添加插件的 绝对路径
|
||||
|
||||
- 绑定记忆插槽:plugins.slots.memory = "memory-lancedb-pro"
|
||||
|
||||
- 验证:openclaw plugins info memory-lancedb-pro && openclaw memory-pro stats
|
||||
|
||||
从 v1.1.0 之前的版本升级?
|
||||
|
||||
# 1) 备份
|
||||
openclaw memory-pro export --scope global --output memories-backup.json
|
||||
# 2) 试运行
|
||||
openclaw memory-pro upgrade --dry-run
|
||||
# 3) 执行升级
|
||||
openclaw memory-pro upgrade
|
||||
# 4) 验证
|
||||
openclaw memory-pro stats
|
||||
|
||||
详见 CHANGELOG-v1.1.0.md 了解行为变更和升级说明。
|
||||
|
||||
memory-lancedb-pro 是核心插件。社区围绕它构建了配套工具,让安装和日常使用更加顺畅:
|
||||
|
||||
CortexReach/toolbox/memory-lancedb-pro-setup
|
||||
|
||||
不只是简单的安装器——脚本能智能处理各种常见场景:
|
||||
|
||||
你的情况
|
||||
脚本会做什么
|
||||
|
||||
从未安装
|
||||
全新下载 → 安装依赖 → 选择配置 → 写入 openclaw.json → 重启
|
||||
|
||||
通过 git clone 安装,卡在旧版本
|
||||
自动 git fetch + checkout 到最新 → 重装依赖 → 验证
|
||||
|
||||
配置中有无效字段
|
||||
自动检测并通过 schema 过滤移除不支持的字段
|
||||
|
||||
通过 npm 安装
|
||||
跳过 git 更新,提醒你自行运行 npm update
|
||||
|
||||
openclaw CLI 因无效配置崩溃
|
||||
降级方案:直接从 openclaw.json 文件读取工作目录路径
|
||||
|
||||
extensions/ 而非 plugins/
|
||||
从配置或文件系统自动检测插件位置
|
||||
|
||||
已是最新版
|
||||
仅执行健康检查,不做改动
|
||||
|
||||
bash setup-memory.sh # 安装或升级
|
||||
bash setup-memory.sh --dry-run # 仅预览
|
||||
bash setup-memory.sh --beta # 包含预发布版本
|
||||
bash setup-memory.sh --uninstall # 还原配置并移除插件
|
||||
|
||||
内置 Provider 预设:Jina / DashScope / SiliconFlow / OpenAI / Ollama,或自带任意 OpenAI 兼容 API。
|
||||
|
||||
CortexReach/memory-lancedb-pro-skill
|
||||
|
||||
安装这个 Skill,你的 AI 智能体(Claude Code 或 OpenClaw)就能深度掌握 memory-lancedb-pro 的所有功能。只需说 "help me enable the best config" 即可获得:
|
||||
|
||||
- 7 步引导式配置流程,提供 4 套部署方案:
|
||||
|
||||
满血版(Jina + OpenAI)/ 省钱版(免费 SiliconFlow 重排序)/ 简约版(仅 OpenAI)/ 全本地版(Ollama,零 API 成本)
|
||||
|
||||
- 全部 9 个 MCP 工具 的正确用法:memory_recall、memory_store、memory_forget、memory_update、memory_stats、memory_list、self_improvement_log、self_improvement_extract_skill、self_improvement_review
|
||||
|
||||
Claude Code 安装:
|
||||
|
||||
git clone https://github.com/CortexReach/memory-lancedb-pro-skill.git ~/.claude/skills/memory-lancedb-pro
|
||||
|
||||
OpenClaw 安装:
|
||||
|
||||
git clone https://github.com/CortexReach/memory-lancedb-pro-skill.git ~/.openclaw/workspace/skills/memory-lancedb-pro-skill
|
||||
|
||||
架构
|
||||
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ index.ts (入口) │
|
||||
│ 插件注册 · 配置解析 · 生命周期钩子 │
|
||||
└────────┬──────────┬──────────┬───────────────┘
|
||||
│ │ │
|
||||
┌────▼───┐ ┌────▼───┐ ┌───▼────┐ ┌──▼──────────┐
|
||||
│ store │ │embedder│ │retriever│ │ scopes │
|
||||
│ .ts │ │ .ts │ │ .ts │ │ .ts │
|
||||
└────────┘ └────────┘ └────────┘ └─────────────┘
|
||||
│ │
|
||||
┌────▼───┐ ┌─────▼──────────┐
|
||||
│migrate │ │noise-filter.ts │
|
||||
│ .ts │ │adaptive- │
|
||||
└────────┘ │retrieval.ts │
|
||||
└────────────────┘
|
||||
|
||||
┌─────────────┐ ┌──────────┐
|
||||
│ tools.ts │ │ cli.ts │
|
||||
│ (智能体 API)│ │ (CLI) │
|
||||
└─────────────┘ └──────────┘
|
||||
|
||||
查询 → embedQuery() ─┐
|
||||
├─→ 混合融合 → 重排序 → 生命周期衰减加权 → 长度归一化 → 过滤
|
||||
查询 → BM25 全文 ─────┘
|
||||
|
||||
向量搜索 — 基于 LanceDB ANN 的语义相似度(余弦距离)
|
||||
|
||||
BM25 全文搜索 — 通过 LanceDB FTS 索引进行精确关键词匹配
|
||||
|
||||
混合融合 — 以向量分数为基础,BM25 命中结果获得加权提升
|
||||
|
||||
可配置权重 — vectorWeight、bm25Weight、minScore
|
||||
|
||||
内置 Jina、SiliconFlow、Voyage AI 和 Pinecone 适配器
|
||||
|
||||
兼容任意 Jina 兼容端点(如 Hugging Face TEI、DashScope)
|
||||
|
||||
混合打分:60% 交叉编码器 + 40% 原始融合分数
|
||||
|
||||
优雅降级:API 失败时回退到余弦相似度
|
||||
|
||||
阶段
|
||||
效果
|
||||
|
||||
混合融合
|
||||
结合语义召回和精确匹配召回
|
||||
|
||||
交叉编码器重排序
|
||||
提升语义精确命中的排名
|
||||
|
||||
生命周期衰减加权
|
||||
Weibull 时效性 + 访问频率 + 重要性 × 置信度
|
||||
|
||||
长度归一化
|
||||
防止长条目主导结果(锚点:500 字符)
|
||||
|
||||
硬最低分
|
||||
移除无关结果(默认:0.35)
|
||||
|
||||
MMR 多样性
|
||||
余弦相似度 > 0.85 → 降权
|
||||
|
||||
智能提取
|
||||
|
||||
- LLM 驱动的 6 类提取:用户画像、偏好、实体、事件、案例、模式
|
||||
|
||||
- L0/L1/L2 分层存储:L0(一句话索引)→ L1(结构化摘要)→ L2(完整叙述)
|
||||
|
||||
- 两阶段去重:向量相似度预过滤(≥0.7)→ LLM 语义决策(CREATE/MERGE/SKIP)
|
||||
|
||||
- 类别感知合并:profile 始终合并,events/cases 仅追加
|
||||
|
||||
Weibull 衰减引擎
|
||||
|
||||
- 综合分数 = 时效性 + 频率 + 内在价值
|
||||
|
||||
- 三级晋升:外围 ↔ 工作 ↔ 核心,阈值可配置
|
||||
|
||||
- 访问强化:频繁被召回的记忆衰减更慢(类似间隔重复机制)
|
||||
|
||||
- 重要性调制半衰期:重要记忆衰减更慢
|
||||
|
||||
作用域
|
||||
|
||||
- 内置作用域:global、agent:、custom:、project:、user:
|
||||
|
||||
- 通过 scopes.agentAccess 实现智能体级别的访问控制
|
||||
|
||||
- 默认:每个智能体访问 global + 自己的 agent: 作用域
|
||||
|
||||
自动捕捉
|
||||
|
||||
- 自动捕捉(agent_end):从对话中提取偏好/事实/决策/实体,去重后每轮最多存储 3 条
|
||||
|
||||
- 自动回忆(before_agent_start):注入 上下文(最多 3 条)
|
||||
|
||||
- 过滤低质量内容:智能体拒绝回复、元问题、打招呼
|
||||
|
||||
- 跳过检索:打招呼、斜杠命令、简单确认、表情符号
|
||||
|
||||
- 强制检索:记忆关键词("记得"、"之前"、"上次")
|
||||
|
||||
- 中文感知阈值(中文:6 字符 vs 英文:15 字符)
|
||||
|
||||
CLI 命令
|
||||
|
||||
# 列出记忆
|
||||
openclaw memory-pro list [--scope global] [--category fact] [--limit 20] [--json]
|
||||
|
||||
# 搜索记忆
|
||||
openclaw memory-pro search "查询" [--scope global] [--limit 10] [--json]
|
||||
|
||||
# 查看统计
|
||||
openclaw memory-pro stats [--scope global] [--json]
|
||||
|
||||
# 删除单条
|
||||
openclaw memory-pro delete <id>
|
||||
|
||||
# 批量删除
|
||||
openclaw memory-pro delete-bulk --scope global [--before 2025-01-01] [--dry-run]
|
||||
|
||||
# 导出
|
||||
openclaw memory-pro export [--scope global] [--output memories.json]
|
||||
|
||||
# 导入
|
||||
openclaw memory-pro import memories.json [--scope global] [--dry-run]
|
||||
|
||||
# 重新生成向量
|
||||
openclaw memory-pro reembed --source-db /path/to/old-db [--batch-size 32] [--skip-existing]
|
||||
|
||||
# 升级
|
||||
openclaw memory-pro upgrade [--dry-run] [--batch-size 10] [--no-llm] [--limit N] [--scope SCOPE]
|
||||
|
||||
# 迁移
|
||||
openclaw memory-pro migrate check|run|verify [--source /path]
|
||||
|
||||
# OAuth 登录
|
||||
openclaw memory-pro auth login [--provider openai-codex] [--model gpt-5.4] [--oauth-path /abs/path/oauth.json]
|
||||
openclaw memory-pro auth status
|
||||
openclaw memory-pro auth logout
|
||||
|
||||
Embedding 服务商
|
||||
兼容 任意 OpenAI 兼容 Embedding API:
|
||||
|
||||
服务商
|
||||
模型
|
||||
Base URL
|
||||
维度
|
||||
|
||||
Jina(推荐)
|
||||
jina-embeddings-v5-text-small
|
||||
https://api.jina.ai/v1
|
||||
1024
|
||||
|
||||
OpenAI
|
||||
text-embedding-3-small
|
||||
https://api.openai.com/v1
|
||||
1536
|
||||
|
||||
Voyage
|
||||
voyage-4-lite / voyage-4
|
||||
https://api.voyageai.com/v1
|
||||
1024 / 1024
|
||||
|
||||
Google Gemini
|
||||
gemini-embedding-001
|
||||
https://generativelanguage.googleapis.com/v1beta/openai/
|
||||
3072
|
||||
|
||||
Ollama(本地)
|
||||
nomic-embed-text
|
||||
http://localhost:11434/v1
|
||||
取决于模型
|
||||
|
||||
重排序服务商
|
||||
交叉编码器重排序通过 rerankProvider 支持多个服务商:
|
||||
|
||||
服务商
|
||||
rerankProvider
|
||||
示例模型
|
||||
|
||||
Jina(默认)
|
||||
jina
|
||||
jina-reranker-v3
|
||||
|
||||
SiliconFlow(有免费额度)
|
||||
siliconflow
|
||||
BAAI/bge-reranker-v2-m3
|
||||
|
||||
Voyage AI
|
||||
voyage
|
||||
rerank-2.5
|
||||
|
||||
Pinecone
|
||||
pinecone
|
||||
bge-reranker-v2-m3
|
||||
|
||||
故障排除
|
||||
|
||||
在 LanceDB 0.26+ 上,某些数值列可能以 BigInt 形式返回。升级到 memory-lancedb-pro >= 1.0.14——插件现在会在运算前使用 Number(...) 进行类型转换。
|
||||
|
||||
AI 智能体铁律
|
||||
|
||||
将以下内容复制到你的 AGENTS.md,让智能体自动遵守这些规则。
|
||||
|
||||
## 规则 1 — 双层记忆存储
|
||||
每个踩坑/经验教训 → 立即存储两条记忆:
|
||||
- 技术层:踩坑:[现象]。原因:[根因]。修复:[方案]。预防:[如何避免]
|
||||
(category: fact, importance >= 0.8)
|
||||
- 原则层:决策原则 ([标签]):[行为规则]。触发:[何时]。动作:[做什么]
|
||||
(category: decision, importance >= 0.85)
|
||||
|
||||
## 规则 2 — LanceDB 数据质量
|
||||
条目必须简短且原子化(< 500 字符)。不存储原始对话摘要或重复内容。
|
||||
|
||||
## 规则 3 — 重试前先回忆
|
||||
任何工具调用失败时,必须先用 memory_recall 搜索相关关键词,再重试。
|
||||
|
||||
## 规则 4 — 确认目标代码库
|
||||
修改前确认你操作的是 memory-lancedb-pro 还是内置 memory-lancedb。
|
||||
|
||||
## 规则 5 — 修改插件代码后清除 jiti 缓存
|
||||
修改 plugins/ 下的 .ts 文件后,必须先执行 rm -rf /tmp/jiti/ 再重启 openclaw gateway。
|
||||
|
||||
数据库 Schema
|
||||
|
||||
字段
|
||||
类型
|
||||
说明
|
||||
|
||||
id
|
||||
string (UUID)
|
||||
主键
|
||||
|
||||
text
|
||||
string
|
||||
记忆文本(全文索引)
|
||||
|
||||
vector
|
||||
float[]
|
||||
Embedding 向量
|
||||
|
||||
category
|
||||
string
|
||||
存储类别:preference / fact / decision / entity / reflection / other
|
||||
|
||||
scope
|
||||
string
|
||||
作用域标识(如 global、agent:main)
|
||||
|
||||
importance
|
||||
float
|
||||
重要性分数 0-1
|
||||
|
||||
timestamp
|
||||
int64
|
||||
创建时间戳(毫秒)
|
||||
|
||||
metadata
|
||||
string (JSON)
|
||||
扩展元数据
|
||||
|
||||
v1.1.0 常用 metadata 字段:l0_abstract、l1_overview、l2_content、memory_category、tier、access_count、confidence、last_accessed_at
|
||||
|
||||
状态:Beta——通过 npm i memory-lancedb-pro@beta 安装。使用 latest 的稳定版用户不受影响。
|
||||
|
||||
功能
|
||||
说明
|
||||
|
||||
智能提取
|
||||
LLM 驱动的 6 类提取,支持 L0/L1/L2 元数据。禁用时回退到正则模式。
|
||||
|
||||
生命周期评分
|
||||
Weibull 衰减集成到检索中——高频和高重要性记忆排名更高。
|
||||
|
||||
层级管理
|
||||
三级系统(核心 → 工作 → 外围),自动晋升/降级。
|
||||
|
||||
反馈:GitHub Issues · 回退:npm i memory-lancedb-pro@latest
|
||||
@@ -1,82 +0,0 @@
|
||||
# OpenClaw Memory Plugins 总结笔记
|
||||
|
||||
> 创建时间:2026-03-24
|
||||
> 来源:YouTube 视频总结
|
||||
> 作者:Zac Frulloni
|
||||
|
||||
---
|
||||
|
||||
## 视频来源
|
||||
|
||||
| 视频 | 链接 | 时长 | 播放量 | 发布时长 |
|
||||
|------|------|------|--------|----------|
|
||||
| 视频 1 | https://www.youtube.com/watch?v=u-rDW_wTtWM&t=235s | 10:50 | 10K | 2 周 |
|
||||
| 视频 2 | https://www.youtube.com/watch?v=LHoB1C2H3f0 | 19:12 | 6.9K | 2 周 |
|
||||
|
||||
---
|
||||
|
||||
## 视频主题概述
|
||||
|
||||
### 视频 1:I Tested Every OpenClaw Memory Plugin: The 3 Winners
|
||||
|
||||
**核心内容**:Zac Frulloni 测试了所有 OpenClaw 的 Memory 插件,评选出 3 个最佳方案。
|
||||
|
||||
**主要内容**:
|
||||
- 介绍了多种 OpenClaw 可用的记忆/内存插件
|
||||
- 对比各插件的优缺点
|
||||
- 推荐 3 个他认为最优秀的 memory 解决方案
|
||||
- 可能涉及 Obsidian 集成方案
|
||||
|
||||
**标签**:`#openclaw` `#obsidian` `#aiautomation`
|
||||
|
||||
---
|
||||
|
||||
### 视频 2:The Massive OpenClaw Memory Mistake You're Making Right Now
|
||||
|
||||
**核心内容**:指出当前用户在使用 OpenClaw Memory 时犯的一个重大错误。
|
||||
|
||||
**主要内容**:
|
||||
- 探讨了 AI 记忆/遗忘问题("The AI Amnesia Problem")
|
||||
- 分析了为什么很多用户的 Memory 设置是错误的
|
||||
- 可能涉及 Ollama 作为本地模型的配置
|
||||
- 提供了正确的 Memory 设置方法
|
||||
|
||||
**标签**:`#openclaw` `#obsidian` `#ollama`
|
||||
|
||||
---
|
||||
|
||||
## 核心要点总结
|
||||
|
||||
### Memory 重要性
|
||||
|
||||
两个视频都围绕 OpenClaw 的 Memory(记忆)功能展开,强调了:
|
||||
|
||||
1. **AI 遗忘问题**:AI 在每次会话后会"忘记"之前的内容
|
||||
2. **持久记忆方案**:需要通过外部工具(如 Obsidian)来实现长期记忆
|
||||
3. **插件选择**:不同 Memory 插件有不同的适用场景
|
||||
|
||||
### 常见问题
|
||||
|
||||
- **错误配置**:很多用户在设置 Memory 时方法不正确
|
||||
- **工具选择**:Ollama vs 其他本地模型的选择
|
||||
- **多 Agent 场景**:多个 Agent 是否需要独立的 Memory vault
|
||||
|
||||
---
|
||||
|
||||
## 相关资源
|
||||
|
||||
- Zac Frulloni 的 OpenClaw 教程网站:https://remoteopenclaw.com/
|
||||
- Skool 社区:https://www.skool.com/openclaw-clawdbotmoltbot-3639
|
||||
|
||||
---
|
||||
|
||||
## 待进一步了解
|
||||
|
||||
1. 具体是哪 3 个 Memory 插件获胜?
|
||||
2. 视频中提到的 "Mistake" 具体是什么?
|
||||
3. Ollama 在 Memory 配置中的最佳实践
|
||||
|
||||
---
|
||||
|
||||
> 笔记状态:待补充详细细节
|
||||
> 如需更详细的内容,建议直接观看原视频
|
||||
@@ -1,96 +0,0 @@
|
||||
# OpenClaw Eligible Skills
|
||||
|
||||
**Generated**: 2026-03-25
|
||||
**Command**: `openclaw skills list --eligible`
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
- **Total Skills**: 64/64 ready
|
||||
- **Doctor Warnings**: 4 warnings about Telegram group settings
|
||||
|
||||
---
|
||||
|
||||
## Skills List
|
||||
|
||||
| Status | Skill | Description | Source |
|
||||
|--------|-------|-------------|--------|
|
||||
| ✓ ready | 📦 1password | Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op. | agents-skills-personal |
|
||||
| ✓ ready | 📦 apple-notes | Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks Clawdbot to add a note, list notes, search notes, or manage note folders. | openclaw-managed |
|
||||
| ✓ ready | 📦 apple-reminders | Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output. | openclaw-managed |
|
||||
| ✓ ready | 📦 clawhub | Use the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawhub CLI. | openclaw-bundled |
|
||||
| ✓ ready | 🧩 coding-agent | Delegate coding tasks to Codex, Claude Code, or Pi agents via background process. Use when: (1) building/creating new features or apps, (2) reviewing PRs (spawn in temp dir), (3) refactoring large codebases, (4) iterative coding that needs file exploration. NOT for: simple one-liner fixes (just edit), reading code (use read tool), thread-bound ACP harness requests in chat (for example spawn/run Codex or Claude Code in a Discord thread; use sessions_spawn with runtime:"acp"), or any work in ~/clawd workspace (never spawn agents here). Claude Code: use --print --permission-mode bypassPermissions (no PTY). Codex/Pi/OpenCode: pty:true required. | openclaw-bundled |
|
||||
| ✓ ready | 🎮 gog | Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. | agents-skills-personal |
|
||||
| ✓ ready | 📦 healthcheck | Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS). | openclaw-bundled |
|
||||
| ✓ ready | 📦 node-connect | Diagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps. Use when QR/setup code/manual connect fails, local Wi-Fi works but VPS/tailnet does not, or errors mention pairing required, unauthorized, bootstrap token invalid or expired, gateway.bind, gateway.remote.url, Tailscale, or plugins.entries.device-pair.config.publicUrl. | openclaw-bundled |
|
||||
| ✓ ready | 💎 obsidian | Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli. | openclaw-bundled |
|
||||
| ✓ ready | 📦 skill-creator | Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations. | agents-skills-personal |
|
||||
| ✓ ready | 💬 slack | Use when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs. | openclaw-bundled |
|
||||
| ✓ ready | 📦 summarize | Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube). | openclaw-managed |
|
||||
| ✓ ready | 📦 tmux | Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output. | agents-skills-personal |
|
||||
| ✓ ready | 📦 video-frames | Extract frames or short clips from videos using ffmpeg. | agents-skills-personal |
|
||||
| ✓ ready | ☔ weather | Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed. | openclaw-bundled |
|
||||
| ✓ ready | 📦 accli | This skill should be used when interacting with Apple Calendar on macOS. Use it for listing calendars, viewing events, creating/updating/deleting calendar events, and checking availability/free-busy times. Triggers on requests like "check my calendar", "schedule a meeting", "what's on my schedule", "am I free tomorrow", or any calendar-related operations. | openclaw-managed |
|
||||
| ✓ ready | 📦 agent-browser | Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection | openclaw-managed |
|
||||
| ✓ ready | 📦 agentmail | API-first email platform designed for AI agents. Create and manage dedicated email inboxes, send and receive emails programmatically, and handle email-based workflows with webhooks and real-time events. Use when you need to set up agent email identity, send emails from agents, handle incoming email workflows, or replace traditional email providers like Gmail with agent-friendly infrastructure. | openclaw-managed |
|
||||
| ✓ ready | 📦 Docker | Docker containers, images, Compose stacks, networking, volumes, debugging, production hardening, and the commands that keep real environments stable. Use when (1) the task touches Docker, Dockerfiles, images, containers, or Compose; (2) build reliability, runtime behavior, logs, ports, volumes, or security matter; (3) the agent needs Docker guidance and should apply it by default. | openclaw-managed |
|
||||
| ✓ ready | ⚙️ n8n | Manage n8n workflows and automations via API. Use when working with n8n workflows, executions, or automation tasks - listing workflows, activating/deactivating, checking execution status, manually triggering workflows, or debugging automation issues. | openclaw-managed |
|
||||
| ✓ ready | 📦 ontology | Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access. | agents-skills-personal |
|
||||
| ✓ ready | 📦 tavily-search | Web search via Tavily API (alternative to Brave). Use when the user asks to search the web / look up sources / find links and Brave web_search is unavailable or undesired. Returns a small set of relevant results (title, url, snippet) and can optionally include short answer summaries. | openclaw-managed |
|
||||
| ✓ ready | 📦 opencode-controller | Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode. | agents-skills-personal |
|
||||
| ✓ ready | 🧱 opencode-omo | Turn coding requests into completed work. Plan with Prometheus, execute with Atlas, and iterate with Sisyphus in OpenCode. | openclaw-workspace |
|
||||
| ✓ ready | 📦 Powerpoint / PPTX | Create, inspect, and edit Microsoft PowerPoint presentations and PPTX decks with reliable layouts, templates, placeholders, notes, charts, and visual QA. Use when (1) the task is about PowerPoint or `.pptx`; (2) layouts, placeholders, notes, charts, comments, or template fidelity matter; (3) the deck must render cleanly after edits. | openclaw-managed |
|
||||
| ✓ ready | 📦 proactive-agent-lite | Transform AI agents from task-followers into proactive partners with memory architecture, reverse prompting, and self-healing patterns. Lightweight version focused on core proactive capabilities. | openclaw-workspace |
|
||||
| ✓ ready | 📦 self-improvement | Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks. | openclaw-managed |
|
||||
| ✓ ready | 📦 task-summary | 任务执行总结技能。用于在完成任务后生成结构化的任务总结,记录任务目标、执行步骤、结果和经验教训,以便后续追溯和改进。 | openclaw-workspace |
|
||||
| ✓ ready | 📦 self-reflection | Periodic self-reflection on recent sessions. Analyzes what went well, what went wrong, and writes concise, actionable insights to the appropriate workspace files. Designed to run as a cron job. | agents-skills-personal |
|
||||
| ✓ ready | 📦 architecture-designer | Use when designing new system architecture, reviewing existing designs, or making architectural decisions. Invoke for system design, architecture review, design patterns, ADRs, scalability planning. | agents-skills-personal |
|
||||
| ✓ ready | 📦 automation-workflows | Design and implement automation workflows to save time and scale operations as a solopreneur. Use when identifying repetitive tasks to automate, building workflows across tools, setting up triggers and actions, or optimizing existing automations. Covers automation opportunity identification, workflow design, tool selection (Zapier, Make, n8n), testing, and maintenance. Trigger on "automate", "automation", "workflow automation", "save time", "reduce manual work", "automate my business", "no-code automation". | agents-skills-personal |
|
||||
| ✓ ready | 📦 backtest-expert | Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development. | agents-skills-personal |
|
||||
| ✓ ready | 📦 blog-writer | This skill should be used when writing blog posts, articles, or long-form content in the writer's distinctive writing style. It produces authentic, opinionated content that matches the writer's voice—direct, conversational, and grounded in personal experience. The skill handles the complete workflow from research review through Notion publication. Use this skill for drafting blog posts, thought leadership pieces, or any writing meant to reflect the writer's perspective on AI, productivity, sales, marketing, or technology topics. | agents-skills-personal |
|
||||
| ✓ ready | 📦 brainstorming | You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation. | agents-skills-personal |
|
||||
| ✓ ready | 📦 clawdefender | Security scanner and input sanitizer for AI agents. Detects prompt injection, command injection, SSRF, credential exfiltration, and path traversal attacks. Use when (1) installing new skills from ClawHub, (2) processing external input like emails, calendar events, Trello cards, or API responses, (3) validating URLs before fetching, (4) running security audits on your workspace. Protects agents from malicious content in untrusted data sources. | agents-skills-personal |
|
||||
| ✓ ready | 📦 Code | Coding workflow with planning, implementation, verification, and testing for clean software development. | agents-skills-personal |
|
||||
| ✓ ready | 📦 content-strategy | Build and execute a content marketing strategy for a solopreneur business. Use when planning what content to create, deciding on content formats and channels, building a content calendar, measuring content performance, or systematizing content production. Covers audience research for content, content pillars, distribution strategy, repurposing workflows, and metrics. Trigger on "content strategy", "content marketing", "what content should I create", "content plan", "content calendar", "content ideas", "content distribution", "grow through content". | agents-skills-personal |
|
||||
| ✓ ready | 📦 copywriting | Write persuasive copy for landing pages, emails, ads, sales pages, and marketing materials. Use when you need to write headlines, CTAs, product descriptions, ad copy, email sequences, or any text meant to drive action. Covers copywriting formulas (AIDA, PAS, FAB), headline writing, emotional triggers, objection handling in copy, and A/B testing. Trigger on "write copy", "copywriting", "landing page copy", "headline", "write a sales page", "ad copy", "email copy", "persuasive writing", "how to write [marketing text]". | agents-skills-personal |
|
||||
| ✓ ready | 📦 executing-plans | Use when you have a written implementation plan to execute in a separate session with review checkpoints | agents-skills-personal |
|
||||
| ✓ ready | 📦 feishu-chat-history | Fetch and summarize Feishu group chat history. Use when the user asks to read, review, or summarize messages from a Feishu group chat. Triggers: "看群聊记录", "群里聊了啥", "帮我看看这个群", "群消息历史", "chat history", "what did the group discuss". NOT for: sending messages (use message tool), reading documents (use feishu-doc skill), or wiki operations (use feishu-wiki skill). | agents-skills-personal |
|
||||
| ✓ ready | 📦 feishu-cron-reminder | Create cron jobs that reliably deliver reminders to Feishu (飞书) chats. Use when the user asks to set up scheduled reminders, periodic notifications, or any recurring task that should send messages to a Feishu conversation. Triggers: '飞书定时提醒', '定时任务发飞书', 'cron reminder to feishu', '每小时提醒', 'scheduled feishu message'. | agents-skills-personal |
|
||||
| ✓ ready | 📦 feishu-doc | Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Automatically resolves Wiki URLs to real entities and converts content to Markdown. | agents-skills-personal |
|
||||
| ✓ ready | 📦 feishu-perm | Feishu permission management for documents and files. Activate when user mentions sharing, permissions, collaborators. | agents-skills-personal |
|
||||
| ✓ ready | 📦 feishu-screenshot | Capture macOS screenshots and send to Feishu. Use when the user asks to take a screenshot and share it via Feishu. Triggers: "截个屏发飞书", "截屏", "screenshot", "take a screenshot and send". NOT for: sending existing files (use feishu-send-file skill), or sending text messages (use message tool). | agents-skills-personal |
|
||||
| ✓ ready | 📦 feishu-send-file | Send files to a Feishu group or user via REST API. Use when the user explicitly asks to send a file, attachment, or document to a Feishu chat/group. Triggers: "发文件到飞书", "把这个文件发到群里", "send file to feishu", "发个附件". NOT for: sending text messages (use message tool), sending images/screenshots (use feishu-screenshot skill), or reading documents (use feishu-doc skill). | agents-skills-personal |
|
||||
| ✓ ready | 📦 FFmpeg Video Editor | Generate FFmpeg commands from natural language video editing requests - cut, trim, convert, compress, change aspect ratio, extract audio, and more. | agents-skills-personal |
|
||||
| ✓ ready | 📦 find-skills | Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill. | agents-skills-personal |
|
||||
| ✓ ready | 📦 frontend-design | Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when building web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics. | agents-skills-personal |
|
||||
| ✓ ready | 📦 git-essentials | Essential Git commands and workflows for version control, branching, and collaboration. | agents-skills-personal |
|
||||
| ✓ ready | 📦 interview-designer | Analyze resumes and design interview strategies using evidence-based methodology. Transforms interview prep from "read resume → ask questions" into "define standard → forensic evidence → future simulation". Combines Geoff Smart's Topgrading, Lou Adler's performance-based hiring, and Daniel Kahneman's bias control. Use when preparing for interviews, creating structured interview guides, or designing questions to validate candidate competencies. | agents-skills-personal |
|
||||
| ✓ ready | 📦 Market Research | Size markets, analyze competitors, and validate opportunities with practical frameworks and free data sources. | agents-skills-personal |
|
||||
| ✓ ready | 📦 Memory | Infinite organized memory that complements your agent's built-in memory with unlimited categorized storage. | agents-skills-personal |
|
||||
| ✓ ready | 📦 obsidian-ontology-sync | Bidirectional sync between Obsidian PKM (human-friendly notes) and structured ontology (machine-queryable graph). Automatically extracts entities and relationships from markdown, maintains ontology graph, and provides feedback to improve note structure. Run sync every few hours via cron. | agents-skills-personal |
|
||||
| ✓ ready | 📦 research-paper-writer | Creates formal academic research papers following IEEE/ACM formatting standards with proper structure, citations, and scholarly writing style. Use when the user asks to write a research paper, academic paper, or conference paper on any topic. | agents-skills-personal |
|
||||
| ✓ ready | 📦 security-auditor | Use when reviewing code for security vulnerabilities, implementing authentication flows, auditing OWASP Top 10, configuring CORS/CSP headers, handling secrets, input validation, SQL injection prevention, XSS protection, or any security-related code review. | agents-skills-personal |
|
||||
| ✓ ready | 📦 SEO (Site Audit + Content Writer + Competitor Analysis) | SEO specialist agent with site audits, content writing, keyword research, technical fixes, link building, and ranking strategies. | agents-skills-personal |
|
||||
| ✓ ready | 📦 seo-content-writer | Use when the user asks to "write SEO content", "create a blog post", "write an article", "content writing", "draft optimized content", "write me an article", "create a blog post about", "help me write SEO content", or "draft content for". Creates high-quality, SEO-optimized content that ranks in search engines. Applies on-page SEO best practices, keyword optimization, and content structure for maximum visibility and engagement. | agents-skills-personal |
|
||||
| ✓ ready | 📦 skill-vetter | Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns. | agents-skills-personal |
|
||||
| ✓ ready | 📦 social-content | When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms. Also use when the user mentions 'LinkedIn post,' 'Twitter thread,' 'social media,' 'content calendar,' 'social scheduling,' 'engagement,' or 'viral content.' This skill covers content creation, repurposing, and platform-specific strategies. | agents-skills-personal |
|
||||
| ✓ ready | 📦 Social Media Scheduler | Plan, draft, and organize social media content across platforms. Create content calendars, write platform-optimized posts, and maintain consistent posting schedules. | agents-skills-personal |
|
||||
| ✓ ready | 📦 supabase-postgres-best-practices | Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations. | agents-skills-personal |
|
||||
| ✓ ready | 📦 ui-ux-pro-max | UI/UX design intelligence and implementation guidance for building polished interfaces. Use when the user asks for UI design, UX flows, information architecture, visual style direction, design systems/tokens, component specs, copy/microcopy, accessibility, or to generate/critique/refine frontend UI (HTML/CSS/JS, React, Next.js, Vue, Svelte, Tailwind). Includes workflows for (1) generating new UI layouts and styling, (2) improving existing UI/UX, (3) producing design-system tokens and component guidelines, and (4) turning UX recommendations into concrete code changes. | agents-skills-personal |
|
||||
| ✓ ready | 📦 writing-plans | Use when you have a spec or requirements for a multi-step task, before touching code | agents-skills-personal |
|
||||
| ✓ ready | 📦 Playwright (Automation + MCP + Scraper) | Browser automation via Playwright MCP. Navigate websites, click elements, fill forms, take screenshots, extract data, and debug real browser workflows. Use when (1) you need a real browser, not static fetch; (2) the task involves Playwright MCP, browser tools, Playwright tests, scripts, or JS-rendered pages; (3) the user wants navigation, forms, screenshots, PDFs, downloads, or browser-driven extraction turned into a reliable outcome. | openclaw-workspace |
|
||||
|
||||
---
|
||||
|
||||
## Doctor Warnings
|
||||
|
||||
> ⚠️ **Warning 1**: channels.telegram.accounts.bot1.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.telegram.accounts.bot1.groupAllowFrom or channels.telegram.accounts.bot1.allowFrom, or set groupPolicy to "open".
|
||||
|
||||
> ⚠️ **Warning 2**: channels.telegram.accounts.bot2.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.telegram.accounts.bot2.groupAllowFrom or channels.telegram.accounts.bot2.allowFrom, or set groupPolicy to "open".
|
||||
|
||||
> ⚠️ **Warning 3**: channels.telegram.accounts.xingshu.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.telegram.accounts.xingshu.groupAllowFrom or channels.telegram.accounts.xingshu.allowFrom, or set groupPolicy to "open".
|
||||
|
||||
> ⚠️ **Warning 4**: channels.telegram.accounts.default.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to channels.telegram.accounts.default.groupAllowFrom or channels.telegram.accounts.default.allowFrom, or set groupPolicy to "open".
|
||||
|
||||
**Tip**: Run `openclaw doctor --fix` to apply these changes.
|
||||
@@ -1,260 +0,0 @@
|
||||
# I Spent 5 Days Debugging My OpenClaw Agent's Memory. Here's Everything I Learned.
|
||||
|
||||
**Author:** Ramya Chinnadurai (@code_rams)
|
||||
**Source:** X (Twitter) Article
|
||||
**Date:** Feb 23, 2026
|
||||
|
||||
---
|
||||
|
||||
My agent's name is Chiti. It runs on Telegram, handles customer support for two SaaS products, drafts tweets, manages invoices, and coordinates with my co-founder across timezones. It's the closest thing I have to a junior employee.
|
||||
|
||||
And for weeks, it kept forgetting things.
|
||||
|
||||
Not in a subtle way. I'd spend an hour configuring a daily cron job, switch models, and the next session Chiti would act like we'd never spoken. I'd reference a decision from two days ago and get a blank stare. I'd ask it to continue a task and it would start from scratch.
|
||||
|
||||
So I stopped building features and spent 5 days whenever I get time, just fixing memory. This is everything I found, everything I broke, and everything that actually worked.
|
||||
|
||||
---
|
||||
|
||||
## Day 1: The Agent Forgets Everything After Long Conversations
|
||||
|
||||
The first problem was simple to describe and painful to diagnose.
|
||||
|
||||
After long conversations, Chiti would start losing earlier context. Not gradually, it would just vanish. Things I told it 20 messages ago were gone. Decisions we made at the start of the session? Never happened.
|
||||
|
||||
The culprit was compaction. When the conversation fills up the context window, OpenClaw compresses older messages into a summary to make room for new ones. The summary captures the gist but drops specifics. Names, numbers, exact decisions - gone.
|
||||
|
||||
> "This is by design. The context window is finite. But the default behavior treats everything equally, which means your carefully crafted instruction from message #3 gets the same treatment as casual small talk from message #7."
|
||||
|
||||
**What I did:**
|
||||
|
||||
I enabled memory flush before compaction. This tells the agent to write important context to disk before the compressor runs.
|
||||
|
||||
```json
|
||||
{ "compaction": { "memoryFlush": { "enabled": true, "softThresholdTokens": 4000 } } }
|
||||
```
|
||||
|
||||
When the session approaches the context limit, OpenClaw triggers a silent turn that reminds the agent to save durable facts to memory/YYYY-MM-DD.md before compaction wipes them. The agent writes what matters, compaction runs, and the important stuff survives on disk even if the context summary loses it.
|
||||
|
||||
**What I learned:**
|
||||
|
||||
Compaction is not your enemy. Losing information during compaction is. The fix is making sure anything worth remembering gets written to a file before the compressor touches it. If it's only in the context window, it's temporary. If it's on disk, it survives.
|
||||
|
||||
---
|
||||
|
||||
## Day 2: Search Returns Garbage
|
||||
|
||||
With daily logs accumulating and MEMORY.md growing, I needed the agent to actually find things. The built-in memory search was returning irrelevant results or missing obvious matches.
|
||||
|
||||
The issue was the search backend. OpenClaw's default SQLite-based search uses vector embeddings (semantic similarity) to find relevant chunks. It works for broad queries but struggles with exact matches. I'd search for a specific client name and get results about a completely different topic that happened to use similar language.
|
||||
|
||||
**What I did:**
|
||||
|
||||
I switched to QMD as the memory search backend. QMD combines BM25 (keyword matching) with vector embeddings and a reranker. So when I search for "Charles payment failure", it finds results that contain those exact words AND results that are semantically related, then reranks them by relevance.
|
||||
|
||||
**I also configured the QMD paths to include my learnings folder:**
|
||||
|
||||
```json
|
||||
{ "memory": { "qmd": { "paths": "paths": [ { "path": "/Users/ramya/clawd", "name": "memory-root", "pattern": "MEMORY.md" }, { "path": "/Users/ramya/clawd", "name": "memory-alt", "pattern": "memory_alt.md" }, { "path": "/Users/ramya/clawd/memory", "name": "memory-dir", "pattern": "**/*.md" }, { "path": "/Users/ramya/clawd/learnings", "name": "learnings", "pattern": "**/*.md" } ] } } }
|
||||
```
|
||||
|
||||
**What I learned:**
|
||||
|
||||
Pure semantic search sounds good in theory but fails on proper nouns, specific numbers, and exact phrases. Hybrid search (keywords + vectors + reranking) is significantly better for real-world agent memory. If your agent can't find something you know is in its files, the search backend is probably the bottleneck, not the files themselves.
|
||||
|
||||
---
|
||||
|
||||
## Day 3: The Agent Finds It But Doesn't Use It
|
||||
|
||||
This was the most frustrating day. I confirmed that search was working, I could manually query and get the right results. But during actual conversations, Chiti would not retrieve relevant context even when it clearly existed in memory.
|
||||
|
||||
The problem was that retrieval is not automatic. The agent has to decide to search. And if the conversation doesn't trigger the right cues, it won't look things up.
|
||||
|
||||
**What I did:**
|
||||
|
||||
I added explicit retrieval instructions to the boot sequence. Instead of hoping the agent would search when needed, I told it when to search:
|
||||
|
||||
> Before starting any task:
|
||||
> - Search daily logs for related context
|
||||
> - Check LEARNINGS.md for rules about this type of task
|
||||
> - If a client is mentioned, search for their history
|
||||
|
||||
I also built a retrieval test. I'd plant a specific marker in the daily log — something like "MARKER: 2026-02-20 — Remember to always check git status before claiming code is pushed." Then I'd wait, start a new session, and ask: "What was the marker from yesterday?" If the agent found it, retrieval was working. If not, something was broken.
|
||||
|
||||
**What I learned:**
|
||||
|
||||
There's a difference between "the information exists" and "the agent uses the information." You need both. Search infrastructure handles the first part. Boot instructions and retrieval habits handle the second. Test both separately.
|
||||
|
||||
---
|
||||
|
||||
## Day 4: Making It Compaction-Safe
|
||||
|
||||
By now I had memory flush, hybrid search, and retrieval instructions. But I kept losing context in a specific scenario: very long sessions where compaction ran multiple times.
|
||||
|
||||
The problem was that memory flush only triggers once per compaction cycle. If the session was long enough for two or three compactions, only the first one got the flush treatment. Everything after that was at risk.
|
||||
|
||||
**What I did:**
|
||||
|
||||
I configured context pruning to work alongside compaction:
|
||||
|
||||
```json
|
||||
{ "contextPruning": { "mode": "cache-ttl", "ttl": "6h", "keepLastAssistants": 3 } }
|
||||
```
|
||||
|
||||
This aggressively prunes old context after 6 hours while keeping the last 3 assistant responses. Combined with memory flush, this means the agent writes important stuff to disk early, and old context gets cleaned up before it causes overflow.
|
||||
|
||||
I also added a MARKER test protocol: after any significant configuration change, I plant a marker in the daily log and test retrieval across compaction boundaries. If the marker survives, the change worked. If not, something broke.
|
||||
|
||||
**What I learned:**
|
||||
|
||||
Long sessions are where memory systems actually get tested. Short conversations rarely hit compaction. It's the 2-hour deep work sessions where you lose context and can't figure out why. Test your memory system under load, not just in quick chats.
|
||||
|
||||
---
|
||||
|
||||
## Day 5: The System Prompt Was 28% Bloated
|
||||
|
||||
This was the day everything clicked. I ran /context detail and stared at the numbers.
|
||||
|
||||
My agent was loading 11,887 tokens of system prompt before it even read my message. 51 skills, 20 of which I'd never used. MEMORY.md was 200 lines of company wiki loaded on every single session. And I had two competing boot sequences - one in BOOT.md (which OpenClaw doesn't even recognize) and one buried 200 lines deep in AGENTS.md.
|
||||
|
||||
Worst of all, every time I switched models, Chiti forgot everything. No handover protocol. No write-back of current context. Just gone.
|
||||
|
||||
**The root cause:**
|
||||
|
||||
OpenClaw auto-reads these files on every new session: AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, HEARTBEAT.md, MEMORY.md.
|
||||
|
||||
Everything else — LEARNINGS.md, daily logs, docs, reference files — the agent has to read them itself using tools. If the instruction to read those files isn't in one of the auto-loaded files (specifically AGENTS.md), the agent will never see them.
|
||||
|
||||
My BOOT.md had the entire boot sequence. But OpenClaw doesn't auto-load BOOT.md. So the instructions just sat there, unread, doing nothing.
|
||||
|
||||
**What I did:**
|
||||
|
||||
I did a full audit and cleanup:
|
||||
|
||||
- Moved the boot sequence to the top of AGENTS.md (the only reliable place for startup instructions)
|
||||
- Deleted BOOT.md (not recognized by OpenClaw)
|
||||
- Deleted BOOTSTRAP.md (one-time onboarding file, already completed, wasting 361 tokens every session)
|
||||
- Slimmed MEMORY.md from 200 lines to 90 by moving reference docs to a docs/ folder
|
||||
- Removed 20 unused marketing skills that were eating 3,000 tokens per session
|
||||
- Added write discipline: every task logs its outcome, every mistake becomes a rule
|
||||
- Added a handover protocol: before any model switch or session end, the agent writes current context to the daily log
|
||||
|
||||
**The boot sequence now looks like this:**
|
||||
|
||||
> Before doing ANYTHING:
|
||||
> 1. Read USER.md
|
||||
> 2. Read learnings/LEARNINGS.md
|
||||
> 3. Read memory/YYYY-MM-DD.md (today + yesterday)
|
||||
> 4. Read MEMORY.md (main session only, never in groups)
|
||||
> 5. Read PROTOCOL_COST_EFFICIENCY.md
|
||||
> 6. Print: LOADED: USER | LEARNINGS | DAILY | MEMORY | PROTOCOL
|
||||
|
||||
**The write discipline:**
|
||||
|
||||
> After every task:
|
||||
> 1. Log decision + outcome → memory/YYYY-MM-DD.md
|
||||
> 2. If mistake → append to learnings/LEARNINGS.md
|
||||
> 3. If significant context → update MEMORY.md (only during heartbeat reviews, never directly during tasks)
|
||||
|
||||
**The handover protocol:**
|
||||
|
||||
> Before session end or model switch:
|
||||
> Write HANDOVER section to memory/YYYY-MM-DD.md:
|
||||
> - What was discussed
|
||||
> - What was decided
|
||||
> - Pending tasks with exact details
|
||||
> - Next steps remaining
|
||||
|
||||
**Results:**
|
||||
|
||||
- System prompt: 11,887 → 8,529 tokens
|
||||
- Skills: 51 → 32
|
||||
- Session tokens: 18,280 → 14,627
|
||||
- 28% lighter. Same agent. Same models. Just less noise.
|
||||
|
||||
**What I learned:**
|
||||
|
||||
The real fix wasn't adding more files. It was removing the ones that weren't doing anything. Every token in the system prompt is overhead the agent carries on every single message. Unused skills, bloated memory files, files the system doesn't even read - they all add up silently.
|
||||
|
||||
---
|
||||
|
||||
## The Rules I Wish I Knew On Day 1
|
||||
|
||||
After 5 days of breaking things and fixing them, these are the rules I'd give anyone setting up OpenClaw memory:
|
||||
|
||||
### 1. Only these files auto-load: AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, MEMORY.md.
|
||||
|
||||
Everything else needs an explicit read instruction in AGENTS.md. If it's not in the boot sequence, the agent won't see it. BOOT.md is not a real thing in OpenClaw. I had one for weeks. It did nothing.
|
||||
|
||||
### 2. Boot sequence goes at the top of AGENTS.md.
|
||||
|
||||
Not in the middle. Not at the bottom. The very top. Auto-loaded files get injected into the system prompt, so the boot instructions need to be the first thing the agent processes.
|
||||
|
||||
### 3. Write discipline matters more than read discipline.
|
||||
|
||||
Most people set up files for the agent to read but never enforce writing back. If the agent doesn't log decisions, outcomes, and mistakes to disk, those things only exist in the context window. And the context window gets compacted. Write-back is how temporary context becomes permanent memory.
|
||||
|
||||
### 4. Never write directly to MEMORY.md during tasks.
|
||||
|
||||
Daily logs are raw and append-only. MEMORY.md is curated long-term memory. If you let the agent dump anything into MEMORY.md, it bloats into a 200-line mess within weeks. Curate MEMORY.md during periodic reviews (heartbeat or cron) by distilling insights from recent daily logs. I learned this from a fellow OpenClaw user who caught his agent doing exactly this — bloating MEMORY.md with uncurated noise until it was useless.
|
||||
|
||||
### 5. LEARNINGS.md is the most underrated file.
|
||||
|
||||
Every mistake the agent makes should become a one-line rule. "Never claim code is pushed without checking git status." "Don't read full MEMORY.md in group chats." "Always confirm the user's timezone before scheduling." These rules compound. After a few weeks, your agent has a personal operations manual built from its own failures.
|
||||
|
||||
### 6. Test retrieval, not just storage.
|
||||
|
||||
Storing information and retrieving it are different problems. I've had files indexed and searchable but never accessed because the agent didn't know to look for them. Plant markers, test across sessions, test across model switches. If the agent can't find what you stored yesterday, the storage doesn't matter.
|
||||
|
||||
### 7. The handover protocol is the model-switch fix.
|
||||
|
||||
OpenClaw agents lose all context when you switch models. The new model starts with a fresh context window — it only sees the auto-loaded files. Without a handover protocol that dumps current state to the daily log before the switch, the new model has no idea what was happening. This was my single biggest pain point for weeks.
|
||||
|
||||
### 8. Run /context detail regularly.
|
||||
|
||||
This command shows exactly what's eating your tokens. Skills you forgot you installed, files that grew without you noticing, tools you never use. I found 20 unused skills burning 3,000 tokens per session. That's 3,000 tokens of overhead on every single message, for features I'd never touched.
|
||||
|
||||
### 9. Hybrid search beats pure semantic search.
|
||||
|
||||
BM25 (keywords) + vectors (meaning) + reranking gives significantly better results than vectors alone. Client names, specific numbers, exact phrases — semantic search misses these. Keyword search catches them. Use both.
|
||||
|
||||
### 10. Compaction is not the enemy. Unwritten context is.
|
||||
|
||||
I spent days fighting compaction before realizing the fix was simpler: make sure anything important gets written to a file before compaction runs. Memory flush handles this automatically. If it's on disk, it survives compaction. If it's only in the conversation, it's at risk.
|
||||
|
||||
---
|
||||
|
||||
## My Current Setup
|
||||
|
||||
For reference, here's what my workspace looks like now:
|
||||
|
||||
```
|
||||
workspace/
|
||||
├── AGENTS.md (boot sequence + write discipline + handover protocol)
|
||||
├── SOUL.md (personality and behavior)
|
||||
├── IDENTITY.md (name, role)
|
||||
├── USER.md (owner info)
|
||||
├── TOOLS.md (tool usage guidelines)
|
||||
├── HEARTBEAT.md (autonomous check-in behavior)
|
||||
├── MEMORY.md (curated long-term memory, ~90 lines)
|
||||
├── PROTOCOL_COST_EFFICIENCY.md
|
||||
├── learnings/
|
||||
│ └── LEARNINGS.md (rules from mistakes)
|
||||
├── memory/ (daily logs: YYYY-MM-DD.md)
|
||||
├── docs/ (reference docs moved out of MEMORY.md)
|
||||
│ ├── tweetsmash-arch.md
|
||||
│ ├── knowledge-transfer.md
|
||||
│ ├── infrastructure.md
|
||||
│ └── group-chat-rules.md
|
||||
└── skills/ (32 skills, down from 51)
|
||||
```
|
||||
|
||||
System prompt: 8,529 tokens. Session tokens: 14,627 out of 200,000 context window (7.3%). The agent boots, reads what it needs, writes what it learns, and hands off context before model switches.
|
||||
|
||||
It took 5 days to get here. Most of it was unlearning the assumption that more files equals better memory. It doesn't. Discipline does. My experiment still continues.
|
||||
|
||||
---
|
||||
|
||||
**About the author:**
|
||||
|
||||
I'm building TweetSmash and LinkedMash — social media bookmark tools with my co-founder. I share what I learn about running OpenClaw agents in production on X: [@code_rams](https://x.com/code_rams)
|
||||
Reference in New Issue
Block a user