Install
openclaw skills install memory-guardian-agentAgent workspace memory lifecycle management via 10 MCP tools + batch maintenance. Manages MEMORY.md, memory/ directory, meta.json, quality gate, Bayesian decay, case lifecycle, and compaction. Use when: (1) Installing or configuring memory-guardian, (2) Running scheduled or on-demand memory maintenance, (3) Diagnosing memory bloat, quality anomalies, or case invalidation, (4) Writing, querying, or archiving memories, (5) Reviewing or retiring judgment cases, (6) Checking quality gate state or L3 confirmations. Triggers on: memory_status, memory_decay, memory_ingest, memory_compact, quality_check, case_query, case_review, run_batch, memory_sync, meta.json, MEMORY.md, memory-guardian.
openclaw skills install memory-guardian-agentWorkspace memory lifecycle system. Dual-layer Bayesian decay + four-state quality gate + case lifecycle + compaction.
memory_status firstMG_WORKSPACEmg_schema/meta_defaults.pyworkspace defaults from MG_WORKSPACE env var; only non-default params listed.
Query
memory_status() — System overview (memory count / gate state / case summary / references integrity)memory_query(type="active", min_score=0.3) — Search memories (keyword/memory_type filter)Write
memory_ingest(content="...", importance="auto", tags=[]) — Create new memorymemory_decay(lambda=0.01, dry_run=false) — Run five-track Bayesian decayAudit
quality_check(layer="all") — Quality gate (retire_rate / similar_case_signal / stale_cases)case_query(filter="frozen") — Query cases (active/frozen/retired/stale/ignored)case_review(case_id, action="retire", origin_type="agent_initiated") — Case operations (active/frozen/retired/unfreeze/ignore)Batch
run_batch(skip_compact=true, dry_run=false, timeout=300) — Full maintenance (includes sync + signal merge)memory_sync(dry_run=true) — Sync file changes → meta.json (auto-run in run_batch)memory_compact(dry_run=true, aggressive=false) — Compact MEMORY.mdmemory_status → confirm references.complete: truerun_batch(skip_compact=true) runs automatically. Includes:
D1: Memory bloat → memory_compact(dry_run=true) → apply if needed → see compaction.md
D2: Quality anomaly → quality_check(layer="all") → see error_recovery.md
D3: Case invalidation → case_query(filter="stale") → case_review(action="retire"|"active"|"unfreeze") → see case-management.md
Dual-layer access signals feed the decay engine:
access_log.jsonl — agent appends after memory_getAgent must append to access_log.jsonl after each memory_get call. See signal-loop.md for integration code.
Load on demand per scenario:
When MCP unavailable, CLI path relative to skill dir:
python3 scripts/memory_guardian.py <command> [--workspace <path>]
Commands: status, ingest, bootstrap, snapshot, run, violations, migrate