---
name: agent-memory-health-auditor
description: OpenClaw skill for governed agent workflows.
---
agent-memory-health-auditor
**Version:** 1.0.0
**Category:** reliability
**Author:** Iceman / GetAgentIQ.ai
**Build date:** 2026-05-27
What It Does
Audits agent memory files for bloat, staleness, and structural integrity. Reviews MEMORY.md for size limits (5,000 char cap), presence of critical sections, and date freshness. Reviews memory/ handoff files for accumulation and stale archives.
Returns HEALTHY / REVIEW / BLOCKED recommendation.
Who It's For
→ OpenClaw agents and operators who need to monitor memory health across pipeline sessions
→ Teams with long-running agent pipelines where memory accumulation is a known risk
→ Anyone running daily agent pipelines who wants an automated memory-health gate before sensitive operations
Usage
```bash
python3 scripts/agent_memory_health_auditor.py --workspace /root/.openclaw/workspace --json
python3 scripts/agent_memory_health_auditor.py --self-test --json
```
Output
JSON fields: `ok`, `recommendation`, `memory_md` (audit detail), `handoffs` (audit detail), `total_findings`, `high_severity_count`, `all_findings`, `next_steps`.
QA Retest Fixture
```bash
python3 -m py_compile scripts/agent_memory_health_auditor.py
python3 scripts/agent_memory_health_auditor.py --self-test --json
python3 scripts/agent_memory_health_auditor.py --workspace /root/.openclaw/workspace --json
```
Expected: self-test `ok=true`; workspace audit returns recommendation without error.
Safety
Stdlib-only, read-only, no subprocess, no network, no config/cron mutation. Reads MEMORY.md and memory/ directory files only.
Restore point
Create a restore point before installing in any production workspace.
Release evidence
Reviewed in the 2026-06-15 GetAgentIQ warehouse propagation cycle.