
A coding assistant that — preferences, tools, project context, and coding style — without sending anything to the cloud.
概览
A coding assistant that — preferences, tools, project context, and coding style — without sending anything to the cloud. 1. Mem0 searches Qdrant for the top-5 relevant memories 2. Memories are injected into the system prompt 3. qwen3:8b generates a response (aware of your style + project) 4. Smart filter asks: "is this worth remembering long-term?" 5. High-value facts are persisted in Qdrant for future sessions The smart filter prevents memory bloat by only storing what actually matters: After cloning, update the command path in skills/local-ai-assistant/SKILL.md to point to your actual run.sh location:
README
以下为原文 README 节选,完整内容请查看原文。
Local AI Coding Assistant
qwen3:8b (Ollama) + Mem0 OSS + Qdrant — fully local, no API keys
A coding assistant that remembers you across sessions — preferences, tools, project context, and coding style — without sending anything to the cloud.
Architecture
┌────────────────────────────────────────────────────────┐
│ LocalAssistant (main.py) │
├──────────────────────┬─────────────────────────────────┤
│ SmartMemoryManager │ Ollama qwen3:8b │
│ (memory_manager.py) │ chat inference │
│ │ │
│ ┌────────────────┐ │ ┌─────────────────────────┐ │
│ │ Mem0 OSS │──│─▶│ System prompt with │ │
│ │ + Qdrant │ │ │ injected memories │ │
│ │ (local) │ │ └─────────────────────────┘ │
│ └────────────────┘ │ │
│ Smart filter: │ │
│ only stores │ │
│ high-value facts │ │
└──────────────────────┴─────────────────────────────────┘
Per-message flow:
- Mem0 searches Qdrant for the top-5 relevant memories
- Memories are injected into the system prompt
- qwen3:8b generates a response (aware of your style + project)
- Smart filter asks: “is this worth remembering long-term?”
- High-value facts are persisted in Qdrant for future sessions
Prerequisites
| Requirement | Notes |
|---|---|
| Ollama | Running locally |
| Docker | For Qdrant |
| Python 3.11+ | |
| OpenClaw | For skill invocation |
Setup (one time)
1. Pull Ollama models:
ollama pull qwen3:8b
ollama pull nomic-embed-text
2. Start Qdrant:
docker run -d --name qdrant-local \
-p 6333:6333 \
-v $(pwd)/qdrant_storage:/qdrant/storage \
qdrant/qdrant
3. Install Python deps:
pip install -r requirements.txt
Running
Web UI (recommended):
bash run_web.sh
# → Open http://127.0.0.1:8765
CLI:
bash run.sh "Write a Python function to validate an email address"
bash run.sh "I prefer TypeScript and always use zod for validation"
Via OpenClaw skill:
/local-ai-assistant Write a function to debounce API calls
Smart Memory Layer
The smart filter prevents memory bloat by only storing what actually matters:
| Message | Stored? | Why |
|---|---|---|
| “I prefer TypeScript over JavaScript” | ✅ | Language preference |
| “I use pytest, never unittest” | ✅ | Tool preference |
| “My project is called Nebula — FastAPI service” | ✅ | Project context |
“What does enumerate() do?” |
❌ | Transient question |
| “Thanks!” | ❌ | No lasting context |
Files
local-ai-assistant/
├── SKILL.md OpenClaw skill definition
├── requirements.txt Python dependencies
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add aashidutt/openclaw_mem0_ollama