memory-guardian for Openclaw

A sophisticated memory lifecycle management system for AI agents featuring Bayesian decay and automated quality gates.

5rbdmak7f-alt
v1.0.0
Apr 15, 2026
1
721
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install memory-guardian-agent

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install memory-guardian-agent using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is memory-guardian?

The memory-guardian skill is a robust framework designed to manage the lifecycle of an AI agent's workspace memory. By utilizing a dual-layer Bayesian decay model and a four-state quality gate, it ensures that your agent's knowledge base remains relevant, compact, and high-quality. This Openclaw Skills utility prevents memory bloat and maintains the integrity of references across storage files and associated directories, allowing for smarter and more context-aware agent interactions through precise lifecycle control.

memory-guardian Use Cases

  • Maintaining long-term workspace memory for coding agents using Openclaw Skills.
  • Automatically pruning stale or low-importance information through Bayesian decay.
  • Diagnosing and fixing memory bloat in large-scale agent projects.
  • Managing complex case lifecycles from ingestion to retirement or archival.
  • Ensuring consistent memory quality across multi-agent workflows.

How memory-guardian Works

  1. The system performs a status check using memory_status to verify the integrity of references and meta-information.
  2. New information is ingested via memory_ingest, where importance and tags are assigned.
  3. A dual-layer signal loop tracks memory access via logs and daily notes to inform the decay engine.
  4. Scheduled maintenance runs via run_batch to sync file changes and apply Bayesian decay to outdated memories.
  5. The quality gate monitors metrics like retirement rates and case signals to ensure workspace health.
  6. Compaction processes are triggered when file sizes exceed defined thresholds to keep the storage optimized.

memory-guardian Setup

To install the memory-guardian Openclaw Skills package, ensure your MG_WORKSPACE environment variable is set. You can run the initial setup and verify the installation with the following commands:

# Check the current status and verify file integrity
python3 scripts/memory_guardian.py status --workspace /path/to/workspace

# Manually trigger a maintenance batch
python3 scripts/memory_guardian.py run

Ensure a cron task is created to handle daily maintenance via the run_batch tool.

memory-guardian Data Schema & Taxonomy

Component Description
MEMORY.md The primary compressed storage for active memories and case summaries.
memory/ Directory containing detailed memory files and historical data.
meta.json Central metadata store tracking decay, scores, and quality gate states.
access_log.jsonl Append-only log of memory access events for signal processing.
MG_WORKSPACE Environment variable defining the root of the managed memory system.

memory-guardian Advanced Features

  • Dual-layer Bayesian decay engine for sophisticated information pruning.
  • Four-state quality gate to manage case lifecycles including active, frozen, retired, and ignored states.
  • Automated compaction logic that triggers based on MEMORY.md file size thresholds.
  • L3 confirmation and manual review hooks for high-stakes memory retirement and audit.
  • Quiet degradation support where health checks auto-adjust based on signal freshness.
  • Integration with cron for fully automated Openclaw Skills maintenance loops.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*