Marqs Memorie is a markdown-first memory plugin for OpenClaw.
It keeps markdown as the source of truth while making the full memory model explicit in v1.0.0:
- declarative memory for durable facts, preferences, and notes
- procedural memory for repeatable runbooks and recovery playbooks
- maintenance memory for additive sidecars and scripts that keep the system healthy over time
Typical files:
MEMORY.mdMEMORY_PREFERENCES.mdKNOWLEDGE_FACTS.mdmemory/YYYY-MM-DD.md
These remain the readable, repairable source of truth.
Append-only JSONL sidecars under memory/operations/:
memory/operations/tasks.jsonlmemory/operations/workflows.jsonlmemory/operations/procedure-candidates.jsonl
These support task dedup, reuse, resumability, and procedural candidate capture without mutating curated markdown files.
Maintenance sidecars also include:
memory/skill-update-suggestions.jsonlmemory/archive/indexes/archive-candidates.jsonl
Human-readable playbooks live under memory/procedures/ and are grouped per scene:
memory/procedures/deployment.mdmemory/procedures/debugging.mdmemory/procedures/research.md
These files are promoted from strong candidates while keeping markdown as the durable source of truth.
Append-only JSONL sidecars under memory/:
memory/registry.jsonlmemory/promotions.jsonlmemory/conflicts.jsonl
These record what got promoted, what was skipped as duplicate, and what was flagged as conflict.
The plugin ships with local markdown search plus scene-aware/project-aware ranking, with task-like prompts preferring procedural memory when useful.
This keeps retrieval replaceable while making it more task-relevant.
Additive raw historical material lives under memory/archive/:
memory/archive/conversations/sessions/memory/archive/chunks/memory/archive/indexes/memory/archive/entity_maps/
This layer is intentionally non-canonical. It exists for historical recall, not current truth.
Archive candidates can be extracted into a reviewable sidecar and then promoted through the same duplicate/conflict-aware discipline used elsewhere. Raw archive never becomes canonical automatically.
The archive classifier now distinguishes lightweight signals such as:
decisionfactpreferenceprocedure-signal
This improves candidate extraction while keeping promotion gated.
Session archive ingest is now also incremental:
- unchanged session log files are skipped
- already ingested archive content is deduped
- ingest state is stored in
memory/archive/indexes/session-ingest-state.json
marq_memory_searchmarq_memory_appendmarq_memory_explainmarq_task_checkmarq_task_writemarq_memory_promotemarq_procedure_recallmarq_scene_recallmarq_skill_update_suggestionsmarq_memory_archive_ingestmarq_memory_archive_searchmarq_memory_archive_extract_candidatesmarq_memory_archive_promotemarq_memory_recallmarq_memory_archive_session_ingest
marq_task_write now also captures procedure candidates once the same task succeeds repeatedly, and can attach lightweight recovery evidence when repeated failures are later resolved successfully.
npm run memory:flushnpm run memory:consolidatenpm run memory:promote-smartnpm run memory:quality-gatenpm run memory:reindexnpm run memory:review-proceduresnpm run memory:promote-proceduresnpm run memory:skill-update-suggestionsnpm run memory:archive-sessions
Smart promotion now:
- parses typed daily entries (
[mem],[fact],[obs]) - promotes durable
[mem]entries toMEMORY_PREFERENCES.md - promotes durable
[fact]entries toKNOWLEDGE_FACTS.md - skips exact and near-duplicate entries
- flags possible fact conflicts into
memory/conflicts.jsonl - records lifecycle traces in
memory/promotions.jsonlandmemory/registry.jsonl
Stable procedures can now generate additive skill-update suggestions into memory/skill-update-suggestions.jsonl.
This creates a lightweight bridge from proven procedural memory back into skill maintenance, without mutating existing markdown or procedure evidence.
marq_memory_recall now orchestrates retrieval with a clear trust order:
- canonical memory first
- archive second for historical/context-heavy questions
This keeps current truth and historical recall separate while still making both accessible from one tool.
marq_procedure_recall and the upgraded marq_scene_recall now:
- detect task-like / runbook-like prompts
- boost curated procedure markdown over generic declarative facts when appropriate
- surface recovery playbook sections when a procedure has repeated failure → recovery evidence
This stays additive on top of the existing local markdown search.
marq_scene_recall ranks results using:
- text match score
- inferred or explicit scene
- project match
- file-path hints from memory/docs structure
This stays additive on top of the existing local markdown search.
npm installThen configure the plugin in OpenClaw and point workspaceRoot to the right folder.
See examples/openclaw.config.example.json.
docs/OPERATIONS_MEMORY.mddocs/PROCEDURAL_MEMORY.mddocs/PROMOTION_RULES.mddocs/SCENE_RECALL.mddocs/CRON_JOBS.mddocs/ARCHITECTURE.mddocs/USAGE.md
npm test
npm pack --dry-runAt runtime the system behaves like this:
- write durable raw notes append-only into daily memory
- promote stable facts/preferences/procedures through inspectable gates
- search canonical memory first for current truth
- search archive second for historical reasoning and raw context
- keep recurring health, ingest, and promotion logic in scripts and sidecars
So the system is not a flat search index. It is a layered memory stack with different trust levels.
The current state was built in four steps:
- canonical markdown memory plus promotions and registry sidecars
- procedural memory and recovery-aware recall
- archival session memory with raw/chunked historical retrieval
- archive classifier, gated archive promotion, idempotent ingest, and incremental session capture
That gives OpenClaw both a stable memory core and a historical recall layer.
- stores what should count as current truth
- readable and repairable by hand
- includes facts, preferences, daily memory, and curated files
- stores task and workflow traces
- captures reuse signals
- supports resumability and candidate generation
- stores runbooks and repeatable recovery flows
- optimized for task-like recall
- decides what was promoted, skipped, or flagged
- records duplicates and conflicts
- protects canonical memory from silent drift
- ranks canonical memory for active use
- prefers procedures when the prompt is task-like
- orchestrates canon-first retrieval
- stores raw sessions and historical chunks
- optimized for why/when/context questions
- never automatically becomes canonical
- classifies archive material into likely durable signals
- extracts reviewable candidates
- promotes only through duplicate/conflict-aware gates
memory should be trustworthy before it becomes clever.
In practice that means:
- markdown stays durable
- sidecars stay additive
- promotion decisions stay inspectable
- retrieval can improve without rewriting storage
- raw archive can improve historical recall without becoming canonical truth