/install duru-memory
Duru Memory
Use this skill to run a high-traceability memory system based on plain Markdown files.
This skill is complementary to OpenClaw's built-in memory stack:
duru-memorymanages the Markdown files, conventions, and maintenance workflow- built-in
memory_searchandmemory_getare the primary recall/read tools during normal assistant operation memory-coreindexes and retrieves from the same Markdown treeactive-memoryis an optional pre-reply recall layer for eligible interactive sessions, not a guaranteed default for every deployment
Treat the Markdown files as the source of truth, and OpenClaw's built-in memory stack as the main retrieval and recall layer.
Core workflow
- Load
memory/CORE/hard-rules.mdandmemory/CORE/current-state.md. - Load recent daily logs from
memory/daily/(default: last 2 days). - Before answering context-dependent questions, prefer built-in
memory_searchfirst. - Use
scripts/memory-search.sh "\x3Cquery>"when you want explicit file-level control, debugging, maintenance, or a second opinion against built-in recall. - Update
current-state.mdwhen project/task state changes. - Append a state diff entry in
state-changelog.mdfor every meaningful state update. - At session close, run
scripts/session-close.sh.
Directory contract
memory/
CORE/
hard-rules.md
current-state.md
state-changelog.md
daily/
projects/
people/
concepts/
handoff/
archive/raw/
INDEX.md
Memory admission rules
Record only high-value memory:
- decisions
- commitments
- deadlines
- preferences
- blockers
- postmortem conclusions
Add attributes when possible:
status: active | superseded | invalidpolarity: positive | negativeconfidence: high | medium | lowavoid_reason: ...(required for negative/pitfall entries)
Avoid logging casual chat unless it impacts future execution.
Retrieval policy (built-in first, local deterministic second, optional semantic third)
For normal assistant recall, built-in memory_search is the default path. It integrates with memory-core, can include indexed session transcripts, and follows the configured OpenClaw memory backend.
Use this skill's local retrieval scripts when you want explicit file-level control, debugging, maintenance, reproducible inspections, or a second opinion against built-in recall.
Local deterministic retrieval uses weighted matching:
- exact keyword / phrase in headings
- tags and fields (
decision,todo,blocker,preference) - recency boost for recent daily logs
- path boost for likely directories (
projects,people,CORE)
Optional local semantic retrieval is an experimental supplement, not the primary OpenClaw memory path. When local Ollama embedding is available, it can be added as a second pass after deterministic retrieval (default embedding model in config.yaml: qwen3-embedding:0.6b). This local semantic layer can coexist with built-in retrieval, but it does not replace OpenClaw's built-in memory_search contract.
This skill's semantic mode uses a local SQLite + sqlite-vec path with incremental indexing:
- DB path:
memory/.semantic-index.db - Vector extension:
sqlite-vec(loaded via APSW) - Incremental policy: file mtime/size/hash detection + chunk-level embedding cache
- Consistency keys: fixed
model, embeddingdimension, andpipeline_version - Threshold:
SEMANTIC_MIN_SCORE(default0.48) - Fusion rerank mode:
FUSION_MODE=rrf|linear(defaultrrf) - RRF parameter:
RRF_K(default60) - Keyword boost in RRF mode:
KEYWORD_BOOST(default0.006) - Linear fallback weights:
FUSION_SEM_WEIGHT+FUSION_KEY_WEIGHT(defaults0.65/0.35) - Daily warmup:
session-start.shrunsmemory-semantic-search.py --build-onlyonce per day - Negative memory handling: entries with
polarity=negativeorstatus in {invalid,superseded}are excluded from positive ranking and surfaced in a dedicated⚠ Avoided Pitfallswarning block
Failure and degraded mode guidance
Do not assume semantic retrieval is available.
If built-in vector search, sqlite-vec, Ollama embeddings, or the skill's local semantic service is unavailable, fall back to built-in memory_search in its degraded lexical mode or to this skill's deterministic local retrieval. In degraded mode:
- prefer exact facts from
MEMORY.md,memory/CORE/current-state.md, and recent daily logs - treat semantic hits as optional enrichment, not a dependency
- explicitly report uncertainty when no strong hit exists
- avoid presenting local semantic indexing behavior as part of OpenClaw's guaranteed built-in memory contract
Coexistence guidance
Recommended division of labor:
- Write and maintain long-term notes in
MEMORY.mdandmemory/*.md - Keep
memory/CORE/current-state.mdas the execution truth for active work - Let OpenClaw
memory-coreindex the same tree - Treat built-in
memory_searchandmemory_getas the default runtime recall path - Consider
active-memoryoptional and deployment-dependent, especially if pre-reply recall causes latency or timeout issues - Use local scripts for maintenance, audits, tagging, and deterministic investigations
Avoid creating separate parallel memory trees for built-in memory and Markdown memory. One shared Markdown tree is the cleanest setup.
Scripts
scripts/session-start.sh: startup checklist + quick context load hintsscripts/memory-search.sh: hybrid retrieval entry (keyword first, semantic optional)config.yaml: centralized model/runtime tuning (ollama.base_url,models.*,semantic.*,fusion.*)scripts/memory-semantic-search.py: semantic recall via Ollama/api/embeddingsscripts/memory-auto-tag.py: local-model auto-tagger (model fromconfig.yaml, defaultgemma4:e4b) for incremental memory changes (--mode tag|review,--files,--force)scripts/memory-write-tag.sh: write/append helper that immediately tags the target filescripts/memory-compact.py: weekly compaction (daily -> summaries, mark stale, re-sync vectors)scripts/memory-forget.py: monthly forgetting (archive old stale daily logs, keep negative pitfalls)scripts/session-close.sh: runs auto-tagger in--mode reviewfirst, then daily log append + state freshness checkscripts/auto-commit.sh: optional git safety-net commit
References
references/templates.md: canonical templates for state/daily/project/handoff files
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install duru-memory - After installation, invoke the skill by name or use
/duru-memory - Provide required inputs per the skill's parameter spec and get structured output
What is Duru Memory?
Markdown-based memory continuity system for agents using local Markdown files as the primary memory source. Use when building or operating local Markdown mem... It is an AI Agent Skill for Claude Code / OpenClaw, with 66 downloads so far.
How do I install Duru Memory?
Run "/install duru-memory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Duru Memory free?
Yes, Duru Memory is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Duru Memory support?
Duru Memory is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Duru Memory?
It is built and maintained by Duru (@durugy); the current version is v0.1.0.