clawmem 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +8 -0
- package/CLAUDE.md +8 -0
- package/README.md +43 -31
- package/SKILL.md +7 -0
- package/package.json +1 -1
- package/src/clawmem.ts +1 -1
package/AGENTS.md
CHANGED
|
@@ -625,6 +625,14 @@ Symptom: embed --force with new model produces 3 docs stuck as "Unembedded" but
|
|
|
625
625
|
Symptom: CLI reindex/update falls back to node-llama-cpp Vulkan (not GPU server)
|
|
626
626
|
→ GPU env vars only in systemd drop-in, not in wrapper script. CLI invocations missed them.
|
|
627
627
|
→ Fixed 2026-02-12: bin/clawmem wrapper exports CLAWMEM_EMBED_URL/LLM_URL/RERANK_URL defaults.
|
|
628
|
+
|
|
629
|
+
Symptom: "UserPromptSubmit hook error" on context-surfacing hook (intermittent)
|
|
630
|
+
→ SQLite contention between the watcher and the hook. The watcher processes filesystem events
|
|
631
|
+
(including non-.md files like session .jsonl transcripts) and holds brief write locks. If the
|
|
632
|
+
hook fires during a lock, it can exceed its timeout. More likely during active conversations
|
|
633
|
+
when the watcher is processing rapid transcript changes.
|
|
634
|
+
→ Fix: Bump the hook timeout from 5s to 8s in ~/.claude/settings.json. If persistent, restart
|
|
635
|
+
the watcher to clear memory bloat: `systemctl --user restart clawmem-watcher.service`.
|
|
628
636
|
```
|
|
629
637
|
|
|
630
638
|
## CLI Reference
|
package/CLAUDE.md
CHANGED
|
@@ -625,6 +625,14 @@ Symptom: embed --force with new model produces 3 docs stuck as "Unembedded" but
|
|
|
625
625
|
Symptom: CLI reindex/update falls back to node-llama-cpp Vulkan (not GPU server)
|
|
626
626
|
→ GPU env vars only in systemd drop-in, not in wrapper script. CLI invocations missed them.
|
|
627
627
|
→ Fixed 2026-02-12: bin/clawmem wrapper exports CLAWMEM_EMBED_URL/LLM_URL/RERANK_URL defaults.
|
|
628
|
+
|
|
629
|
+
Symptom: "UserPromptSubmit hook error" on context-surfacing hook (intermittent)
|
|
630
|
+
→ SQLite contention between the watcher and the hook. The watcher processes filesystem events
|
|
631
|
+
(including non-.md files like session .jsonl transcripts) and holds brief write locks. If the
|
|
632
|
+
hook fires during a lock, it can exceed its timeout. More likely during active conversations
|
|
633
|
+
when the watcher is processing rapid transcript changes.
|
|
634
|
+
→ Fix: Bump the hook timeout from 5s to 8s in ~/.claude/settings.json. If persistent, restart
|
|
635
|
+
the watcher to clear memory bloat: `systemctl --user restart clawmem-watcher.service`.
|
|
628
636
|
```
|
|
629
637
|
|
|
630
638
|
## CLI Reference
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ClawMem — Context engine for Claude Code and
|
|
1
|
+
# ClawMem — Context engine for Claude Code and OpenClaw agents
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="docs/clawmem_hero.jpg" alt="ClawMem" width="100%">
|
|
@@ -64,16 +64,16 @@ Runs fully local with no API keys and no cloud services. Integrates via Claude C
|
|
|
64
64
|
- [Bun](https://bun.sh) v1.0+
|
|
65
65
|
- SQLite with FTS5 support (included with Bun)
|
|
66
66
|
|
|
67
|
-
### Install
|
|
67
|
+
### Install from npm (recommended)
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
|
|
70
|
+
npm install -g clawmem
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
If you use Bun as your package manager:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
|
|
76
|
+
bun add -g clawmem
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
### Install from source
|
|
@@ -84,20 +84,42 @@ cd ~/clawmem && bun install
|
|
|
84
84
|
ln -sf ~/clawmem/bin/clawmem ~/.bun/bin/clawmem
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
###
|
|
87
|
+
### Setup roadmap
|
|
88
|
+
|
|
89
|
+
After installing, here's the full journey from zero to working memory:
|
|
90
|
+
|
|
91
|
+
| Step | What | How | Details |
|
|
92
|
+
|------|------|-----|---------|
|
|
93
|
+
| **1. Bootstrap** | Create a vault, index your first collection, embed, install hooks and MCP | `clawmem bootstrap ~/notes --name notes` | One command does it all. Or run each step manually (see below). |
|
|
94
|
+
| **2. Choose models** | Pick embedding + reranker models based on your hardware | 12GB+ VRAM → SOTA stack (zembed-1 + zerank-2). Less → QMD native combo. No GPU → cloud embedding or CPU fallback. | [GPU Services](#gpu-services) |
|
|
95
|
+
| **3. Download models** | Get the GGUF files for your chosen stack | `wget` from HuggingFace, or let `node-llama-cpp` auto-download the QMD native models on first use | [Embedding](#embedding), [LLM Server](#llm-server), [Reranker Server](#reranker-server) |
|
|
96
|
+
| **4. Start services** | Run GPU servers (if using dedicated GPU) and background services | `llama-server` for each model. systemd units for watcher + embed timer. | [systemd services](docs/guides/systemd-services.md) |
|
|
97
|
+
| **5. Decide what to index** | Add collections for your projects, notes, research, and domain docs | `clawmem collection add ~/project --name project` | The more relevant markdown you index, the better retrieval works. See [building a rich context field](docs/introduction.md#building-a-rich-context-field). |
|
|
98
|
+
| **6. Connect your agent** | Hook into Claude Code, OpenClaw, or any MCP client | `clawmem setup hooks && clawmem setup mcp` for Claude Code. `clawmem setup openclaw` for OpenClaw. | [Integration](#integration) |
|
|
99
|
+
| **7. Verify** | Confirm everything is working | `clawmem doctor` (full health check) or `clawmem status` (quick index stats) | [Verify Installation](#verify-installation) |
|
|
100
|
+
|
|
101
|
+
**Fastest path:** Step 1 alone gets you a working system with in-process CPU/GPU inference and default models — no manual model downloads or service configuration needed. Steps 2-4 are optional upgrades for better performance. Steps 5-6 are where you customize what gets indexed and how your agent connects.
|
|
88
102
|
|
|
89
|
-
|
|
103
|
+
### Quick start commands
|
|
90
104
|
|
|
91
105
|
```bash
|
|
92
|
-
#
|
|
93
|
-
|
|
106
|
+
# One command: init + index + embed + hooks + MCP
|
|
107
|
+
clawmem bootstrap ~/notes --name notes
|
|
94
108
|
|
|
95
109
|
# Or step by step:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
clawmem init
|
|
111
|
+
clawmem collection add ~/notes --name notes
|
|
112
|
+
clawmem update --embed
|
|
113
|
+
clawmem setup hooks
|
|
114
|
+
clawmem setup mcp
|
|
115
|
+
|
|
116
|
+
# Add more collections (the more you index, the richer retrieval gets)
|
|
117
|
+
clawmem collection add ~/projects/myapp --name myapp
|
|
118
|
+
clawmem collection add ~/research --name research
|
|
119
|
+
clawmem update --embed
|
|
120
|
+
|
|
121
|
+
# Verify
|
|
122
|
+
clawmem doctor
|
|
101
123
|
```
|
|
102
124
|
|
|
103
125
|
### Integration
|
|
@@ -453,7 +475,7 @@ ClawMem ships three instruction files and an optional maintenance agent:
|
|
|
453
475
|
|------|--------|---------|
|
|
454
476
|
| `CLAUDE.md` | Automatically (Claude Code, when working in this repo) | Complete operational reference — hooks, tools, query optimization, scoring, pipeline details, troubleshooting |
|
|
455
477
|
| `AGENTS.md` | Framework-dependent | Identical to CLAUDE.md — cross-framework compatibility (Cursor, Windsurf, Codex, etc.) |
|
|
456
|
-
| `SKILL.md` | On-demand
|
|
478
|
+
| `SKILL.md` | On-demand (agent reads when needed) | Same reference as CLAUDE.md, shipped with the package for cross-project use |
|
|
457
479
|
| `agents/clawmem-curator.md` | On-demand via `clawmem setup curator` | Maintenance agent — lifecycle triage, retrieval health checks, dedup sweeps, graph rebuilds |
|
|
458
480
|
|
|
459
481
|
**Working in the ClawMem repo:** No action needed — `CLAUDE.md` loads automatically.
|
|
@@ -464,16 +486,9 @@ ClawMem ships three instruction files and an optional maintenance agent:
|
|
|
464
486
|
|
|
465
487
|
Copy the contents of `CLAUDE.md` (or the relevant sections) into your project's own `CLAUDE.md` or `AGENTS.md`. Simple but requires manual updates when ClawMem changes.
|
|
466
488
|
|
|
467
|
-
### Option B:
|
|
468
|
-
|
|
469
|
-
Symlink ClawMem into Claude Code's skill directory for on-demand reference across all projects:
|
|
470
|
-
|
|
471
|
-
```bash
|
|
472
|
-
mkdir -p ~/.claude/skills
|
|
473
|
-
ln -sf ~/clawmem ~/.claude/skills/clawmem
|
|
474
|
-
```
|
|
489
|
+
### Option B: Add a trigger block (recommended)
|
|
475
490
|
|
|
476
|
-
|
|
491
|
+
Add this minimal trigger block to your global `~/.claude/CLAUDE.md`. It gives the agent routing rules always loaded, and tells it how to find the full reference (SKILL.md) shipped with your installation when deeper guidance is needed:
|
|
477
492
|
|
|
478
493
|
```markdown
|
|
479
494
|
## ClawMem
|
|
@@ -525,15 +540,12 @@ ALWAYS `compact=true` first → review → `multi_get` for full content.
|
|
|
525
540
|
- Do NOT forget memories to "clean up" — let confidence decay handle it
|
|
526
541
|
- Do NOT wait for curator to pin decisions — pin immediately when critical
|
|
527
542
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
- After bulk document creation or ingestion (graph building, embedding)
|
|
532
|
-
- Need lifecycle triage beyond basic status/sweep (run curator: "curate memory")
|
|
533
|
-
- Any operation beyond the basic tool routing above
|
|
543
|
+
For detailed operational guidance (query optimization, troubleshooting, collection setup, embedding workflow, graph building, curator), find and read the shipped SKILL.md:
|
|
544
|
+
Bash: CLAWMEM_ROOT=$(cd "$(dirname "$(which clawmem)")/.." && pwd) && echo "$CLAWMEM_ROOT/SKILL.md"
|
|
545
|
+
Then: Read the file at that path.
|
|
534
546
|
```
|
|
535
547
|
|
|
536
|
-
This gives your agent the 3-rule gate, tool routing, and proactive behaviors always loaded, with
|
|
548
|
+
This gives your agent the 3-rule gate, tool routing, and proactive behaviors always loaded. When it needs deeper guidance, it locates and reads the full SKILL.md reference shipped with your installation — no symlinks or skill registration required.
|
|
537
549
|
|
|
538
550
|
---
|
|
539
551
|
|
package/SKILL.md
CHANGED
|
@@ -630,6 +630,13 @@ Symptom: reindex --force crashes with UNIQUE constraint
|
|
|
630
630
|
Symptom: CLI reindex/update falls back to node-llama-cpp
|
|
631
631
|
-> GPU env vars only in systemd drop-in, not in wrapper script.
|
|
632
632
|
-> Fixed: bin/clawmem wrapper exports CLAWMEM_EMBED_URL/LLM_URL/RERANK_URL defaults.
|
|
633
|
+
|
|
634
|
+
Symptom: "UserPromptSubmit hook error" on context-surfacing hook (intermittent)
|
|
635
|
+
-> SQLite contention between watcher and hook. Watcher processes filesystem events (including
|
|
636
|
+
non-.md files like session .jsonl transcripts) and holds brief write locks. If the hook fires
|
|
637
|
+
during a lock, it can exceed its timeout. More likely during active conversations.
|
|
638
|
+
-> Fix: Bump hook timeout from 5s to 8s in ~/.claude/settings.json. If persistent, restart
|
|
639
|
+
the watcher: `systemctl --user restart clawmem-watcher.service`.
|
|
633
640
|
```
|
|
634
641
|
|
|
635
642
|
---
|
package/package.json
CHANGED
package/src/clawmem.ts
CHANGED