๐ง OpenClaw LanceDB Memory System
ๅบไบ LanceDB ๅ้ๆฐๆฎๅบ็ๆบ่ฝ่ฎฐๅฟ็ณป็ป๏ผไธบ OpenClaw Agent ๆไพ้ฟๆ่ฎฐๅฟๅ่ฏญไนๆฃ็ดข่ฝๅใ
Best use case
๐ง OpenClaw LanceDB Memory System is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
ๅบไบ LanceDB ๅ้ๆฐๆฎๅบ็ๆบ่ฝ่ฎฐๅฟ็ณป็ป๏ผไธบ OpenClaw Agent ๆไพ้ฟๆ่ฎฐๅฟๅ่ฏญไนๆฃ็ดข่ฝๅใ
Teams using ๐ง OpenClaw LanceDB Memory System should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/clawlancememory/SKILL.mdinside your project - Restart your AI agent โ it will auto-discover the skill
How ๐ง OpenClaw LanceDB Memory System Compares
| Feature / Agent | ๐ง OpenClaw LanceDB Memory System | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
ๅบไบ LanceDB ๅ้ๆฐๆฎๅบ็ๆบ่ฝ่ฎฐๅฟ็ณป็ป๏ผไธบ OpenClaw Agent ๆไพ้ฟๆ่ฎฐๅฟๅ่ฏญไนๆฃ็ดข่ฝๅใ
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
SKILL.md Source
# ๐ง OpenClaw LanceDB Memory System
ๅบไบ LanceDB ๅ้ๆฐๆฎๅบ็ๆบ่ฝ่ฎฐๅฟ็ณป็ป๏ผไธบ OpenClaw Agent ๆไพ้ฟๆ่ฎฐๅฟๅ่ฏญไนๆฃ็ดข่ฝๅใ



## โจ ็นๆง
- ๐ **่ฏญไนๆฃ็ดข** - ็่งฃๆๆ๏ผไธๅชๆฏๅ
ณ้ฎ่ฏๅน้
- ๐ง **่ชๅจๅ็ฑป** - preference/fact/task/general ๅ็ง่ฎฐๅฟ็ฑปๅ
- ๐ค **่ชๅจๆฝๅ** - ไปๅฏน่ฏไธญ่ชๅจ่ฏๅซ้่ฆไฟกๆฏ
- ๐พ **้ฟๆๅญๅจ** - ๆไน
ๅๅญๅจ๏ผ่ทจ session ไฝฟ็จ
- โก **ๆฏซ็งๅๅบ** - ๅ้ๆฃ็ดข๏ผๅฟซ้ๅๅบ
- ๐ **ๅณๆๅณ็จ** - OpenClaw Hook ้ๆ๏ผ่ชๅจๅ ่ฝฝ
## ๐ ๅฟซ้ๅผๅง
### 1. ๅฎ่ฃ
ไพ่ต
```bash
# ๅ
้ไปๅบ
git clone https://github.com/asbinbin/claw_lance.git
cd claw_lance
# ๅๅปบ่ๆ็ฏๅข
python3 -m venv venv
source venv/bin/activate
# ๅฎ่ฃ
ไพ่ต
pip install -r requirements.txt
```
### 2. ้
็ฝฎ API Key
```bash
# ่ทๅๆบ่ฐฑ AI API Key: https://open.bigmodel.cn/
export ZHIPU_API_KEY="your-api-key-here"
```
### 3. ๅฏ็จ Hook
```bash
# ๆนๆณ 1: ไฝฟ็จๅฏ็จ่ๆฌ
bash enable.sh
# ๆนๆณ 2: OpenClaw ๅฝไปค
openclaw hooks enable memory-system
```
### 4. ๆต่ฏ
```bash
# ๆฅ็็จๆท็ปๅ
python3 skill.py profile
# ๆทปๅ ่ฎฐๅฟ
python3 skill.py add --content "ๆๅๆฌข็ฎๆด" --type preference
# ๆฃ็ดข่ฎฐๅฟ
python3 skill.py search --query "้กน็ฎ"
```
## ๐ ๆๆกฃ
- [ๅฎ่ฃ
ๆๅ](docs/INSTALL.md)
- [ไฝฟ็จๆๅ](docs/USAGE.md)
- [API ๅ่](docs/API.md)
- [Hook ้ๆ](docs/HOOK.md)
- [ๅธธ่ง้ฎ้ข](docs/FAQ.md)
## ๐ฏ ่ฎฐๅฟ็ฑปๅ
| ็ฑปๅ | ่ฏดๆ | ่งฆๅ่ฏ | ไพๅญ |
|------|------|--------|------|
| **preference** | ๅๅฅฝใไน ๆฏ | ๆๅๆฌข/ๆๅๅฅฝ/ๆไน ๆฏ | "ๆๅๆฌข็ฎๆด็ๆฑๆฅ้ฃๆ ผ" |
| **fact** | ไบๅฎใ่ๆฏ | ๆๆฏ/ๆ่ด่ดฃ/ๆๆ
้ฟ | "ๆ่ด่ดฃ POC ้กน็ฎ" |
| **task** | ไปปๅกใๅพ
ๅ | ๆ้่ฆ/ๅซๅฟไบ/ๆๅคฉ่ฆ | "ๆฏๅจๅๆไบค OKR ๅจๆฅ" |
| **general** | ๅ
ถไป | - | ๅฏน่ฏๅๅฒใไธดๆถไฟกๆฏ |
## ๐ง ๅฝไปค่กไฝฟ็จ
```bash
# ๆฅ็็จๆท็ปๅ
python3 skill.py profile
# ๆฃ็ดข่ฎฐๅฟ
python3 skill.py search --query "้กน็ฎ" --k 5
# ๆทปๅ ่ฎฐๅฟ
python3 skill.py add --content "ๆๅๆฌข Markdown" --type preference
# ่ชๅจๆฝๅ๏ผไปๆถๆฏไธญ่ฏๅซ่ฎฐๅฟ๏ผ
python3 skill.py auto --message "ๆ่ด่ดฃ POC ้กน็ฎ๏ผๅๆฌข็ฎๆด็ไปฃ็ "
# ๆฅ็็ป่ฎกไฟกๆฏ
python3 skill.py stats
# ๆธ
็่ฟๆ่ฎฐๅฟ
python3 skill.py cleanup
```
## ๐ป Python API
```python
from skills.memory.openclaw_integration import OpenClawMemoryIntegration
# ๅๅงๅ
mem = OpenClawMemoryIntegration(user_id="ou_xxx")
# ็ๆ system prompt๏ผๅ
ๅซ่ฎฐๅฟ๏ผ
prompt = mem.get_session_system_prompt("ไฝ ๆฏๅฐ็พๅผ")
# ๆฃ็ดข่ฎฐๅฟ
results = mem.search_memory("้กน็ฎ", k=5)
for r in results:
print(f"{r['type']}: {r['content']}")
# ๆทปๅ ่ฎฐๅฟ
mem.add_memory("ๆๅๆฌข็ฎๆด", type="preference", importance=0.8)
# ่ทๅ็จๆท็ปๅ
profile = mem.get_user_profile()
print(f"ๅๅฅฝ๏ผ{profile['preferences']}")
print(f"ไบๅฎ๏ผ{profile['facts']}")
print(f"ไปปๅก๏ผ{profile['tasks']}")
```
## ๐๏ธ ๆถๆ
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ OpenClaw Agent โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Memory Hook (handler.js) โ โ
โ โ - ๆฆๆช agent:bootstrap ไบไปถ โ โ
โ โ - ่ฐ็จ Python ่ๆฌ โ โ
โ โ - ๆณจๅ
ฅ USER_MEMORY.md โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Python ่ฎฐๅฟๆจกๅ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ openclaw_integration.py โ โ
โ โ - OpenClaw ้ๆๆฅๅฃ โ โ
โ โ - ็ๆ system prompt โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ lancedb_memory.py โ โ
โ โ - LanceDB ่ฎฐๅฟ็ฎก็ โ โ
โ โ - ๅ้ๆฃ็ดข โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ auto_memory.py โ โ
โ โ - ่ชๅจ่ฎฐๅฟๆฝๅ โ โ
โ โ - ๆจกๅผๅน้
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LanceDB ๅ้ๆฐๆฎๅบ โ
โ memory_lancedb/ โ
โ โ
โ - ๅ้ๅญๅจ๏ผๆบ่ฐฑ AI Embedding๏ผ โ
โ - ่ฏญไนๆฃ็ดข โ
โ - ๅค็จๆท้็ฆป โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## ๐ ๆๆฌ
**ๆบ่ฐฑ AI Embedding**:
- ๅ
่ดน้ขๅบฆ๏ผ100 ไธ tokens๏ผๆณจๅๅฐฑ้๏ผ
- ไปทๆ ผ๏ผยฅ0.0005/1K tokens
- ่ฎฐๅฟ็ณป็ป็จ้๏ผ~50 tokens/ๆก
- **100 ไธ tokens โ 20,000 ๆก่ฎฐๅฟ**
**LanceDB**:
- ๆฌๅฐ้จ็ฝฒ๏ผๅฎๅ
จๅ
่ดน
- ๅ
ๅญๅ ็จ๏ผ~200MB
- ็ฃ็ๅ ็จ๏ผ~100MB๏ผๆฏ 1000 ๆก่ฎฐๅฟ๏ผ
## ๐ ้็งไธๅฎๅ
จ
- โ
**ๆฌๅฐๅญๅจ**: ๆๆ่ฎฐๅฟๆฐๆฎๅญๅจๅจๆฌๅฐ
- โ
**API ๅ ๅฏ**: ไฝฟ็จ HTTPS ่ฐ็จๆบ่ฐฑ AI API
- โ
**ๅค็จๆท้็ฆป**: ไธๅ็จๆท็ๆฐๆฎๅฎๅ
จ้็ฆป
- โ
**ๆ ๆฐๆฎไธไผ **: ่ฎฐๅฟๆฐๆฎไธไผไธไผ ๅฐไปปไฝๆๅกๅจ
## ๐ ๏ธ ๅผๅ
### ้กน็ฎ็ปๆ
```
claw_lance/
โโโ README.md # ้กน็ฎ่ฏดๆ
โโโ requirements.txt # Python ไพ่ต
โโโ enable.sh # ๅฏ็จ่ๆฌ
โโโ skill.py # ๅฝไปค่กๅ
ฅๅฃ
โโโ hooks/
โ โโโ memory-system/
โ โโโ HOOK.md # Hook ๅ
ๆฐๆฎ
โ โโโ handler.js # Hook ๅค็ๅจ
โโโ skills/
โ โโโ memory/
โ โโโ lancedb_memory.py # LanceDB ๆ ธๅฟ
โ โโโ openclaw_integration.py # OpenClaw ้ๆ
โ โโโ auto_memory.py # ่ชๅจ่ฎฐๅฟๆฝๅ
โ โโโ session_start.py # Session ๅฏๅจ่ๆฌ
โโโ docs/ # ๆๆกฃ็ฎๅฝ
โ โโโ INSTALL.md
โ โโโ USAGE.md
โ โโโ API.md
โ โโโ HOOK.md
โ โโโ FAQ.md
โโโ tests/ # ๆต่ฏ็ฎๅฝ
โโโ test_memory.py
```
### ่ฟ่กๆต่ฏ
```bash
# ๅฎ่ฃ
ๆต่ฏไพ่ต
pip install pytest
# ่ฟ่กๆต่ฏ
pytest tests/
```
## ๐ค ่ดก็ฎ
ๆฌข่ฟๆไบค Issue ๅ Pull Request๏ผ
1. Fork ๆฌไปๅบ
2. ๅๅปบ็นๆงๅๆฏ (`git checkout -b feature/AmazingFeature`)
3. ๆไบคๆดๆน (`git commit -m 'Add some AmazingFeature'`)
4. ๆจ้ๅฐๅๆฏ (`git push origin feature/AmazingFeature`)
5. ๅผๅฏ Pull Request
## ๐ ๆดๆฐๆฅๅฟ
### v1.0.0 (2026-03-31)
- โจ ๅๅง็ๆฌๅๅธ
- ๐ ่ฏญไนๆฃ็ดขๅ่ฝ
- ๐ง ่ชๅจ่ฎฐๅฟๆฝๅ
- ๐ OpenClaw Hook ้ๆ
- ๐ ๅฎๆดๆๆกฃ
## ๐ ่ฎธๅฏ่ฏ
ๆฌ้กน็ฎ้็จ MIT ่ฎธๅฏ่ฏ - ๆฅ็ [LICENSE](LICENSE) ๆไปถไบ่งฃ่ฏฆๆ
ใ
## ๐ ่ด่ฐข
- [LanceDB](https://lancedb.com/) - ๅ้ๆฐๆฎๅบ
- [ๆบ่ฐฑ AI](https://open.bigmodel.cn/) - Embedding ๆๅก
- [OpenClaw](https://openclaw.ai/) - Agent ๆกๆถ
## ๐ฎ ่็ณปๆนๅผ
- GitHub Issues: [ๆ้ฎ](https://github.com/asbinbin/claw_lance_memory/issues)
- ้กน็ฎไธป้กต๏ผhttps://github.com/asbinbin/claw_lance_memory
---
**Made with โค๏ธ by ๅฐ็พๅผ โ**Related Skills
filesystem
Advanced filesystem operations for listing files, searching content, batch processing, and directory analysis. Supports recursive search, file type filtering, size analysis, and batch operations like copy/move/delete. Use when you need to: list directory contents, search for files by name or content, analyze directory structures, perform batch file operations, or analyze file sizes and distribution.
openclaw-youtube
YouTube SERP Scout for agents. Search top-ranking videos, channels, and trends for content research and competitor tracking.
openclaw-search
Intelligent search for agents. Multi-source retrieval with confidence scoring - web, academic, and Tavily in one unified API.
openclaw-media-gen
Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.
Productivity Operating System
You are a personal productivity architect. Your job: help the user design, execute, and optimize their daily system so they consistently ship high-impact work while protecting energy and avoiding burnout.
Presentation Mastery โ Complete Slide Design & Delivery System
You are a Presentation Architect. You help build presentations that persuade, inform, and move people to action. You cover the full lifecycle: audience analysis โ narrative structure โ slide design โ delivery coaching โ post-presentation follow-up.
OpenClaw Mastery โ The Complete Agent Engineering & Operations System
> Built by AfrexAI โ the team that runs 9+ production agents 24/7 on OpenClaw.
n8n Workflow Mastery โ Complete Automation Engineering System
You are an expert n8n workflow architect. You design, build, debug, optimize, and scale n8n automations following production-grade methodology. Every workflow you create is complete, functional, and follows the patterns in this guide.
ML & AI Engineering System
Complete methodology for building, deploying, and operating production ML/AI systems โ from experiment to scale.
MCP Engineering โ Complete Model Context Protocol System
Build, integrate, secure, and scale MCP servers and clients. From first server to production multi-tool architecture.
Legacy System Modernization Engine
Complete methodology for assessing, planning, and executing legacy system modernization โ from monolith decomposition to cloud migration. Works for any tech stack, any scale.
Knowledge Management System
> Turn tribal knowledge into searchable, maintained organizational intelligence. Stop losing expertise when people leave.