anti-amnesia

Complete anti-amnesia system for OpenClaw agents. Prevents context loss across sessions with structured state files, automatic session saving, health monitoring, and decision tracking. Your agent wakes up knowing everything — every time.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "anti-amnesia" with this command: npx skills add peti0402/anti-amnesia

Anti-Amnesia Agent System 🧠🛡️

Your OpenClaw agent forgets everything between sessions. This skill fixes that.

What It Does

  1. STATE.md — Single source of truth. Active projects, iron decisions, open issues. Read first on every wake-up.
  2. Session Memory Hook — Automatically saves full conversation when you /new or /reset. Zero manual work.
  3. Daily Journalsmemory/YYYY-MM-DD.md files capture everything that happens each day.
  4. MEMORY.md — Long-term curated memory. The distilled wisdom, not raw logs.
  5. Heartbeat Health Checks — Every wake-up: verify crons, check processes, validate state consistency.
  6. Decision Capture — Decisions made in conversation get written to files immediately. No "mental notes."

Setup

Step 1: Enable Session Memory Hook

Add to your ~/.openclaw/openclaw.json under hooks:

{
  "hooks": {
    "session-memory": {
      "enabled": true,
      "messages": 9999,
      "path": "memory/"
    }
  }
}

Step 2: Create Core Files

Copy the templates from this skill's templates/ folder to your workspace:

templates/STATE.md      → workspace/STATE.md
templates/HEARTBEAT.md  → workspace/HEARTBEAT.md

Edit STATE.md with your actual projects and decisions.

Step 3: Update AGENTS.md

Add to your AGENTS.md session start protocol:

## Every Session — Mandatory
1. Read `STATE.md` — current world state
2. Read `memory/YYYY-MM-DD.md` (today) — if missing, create it
3. Read `MEMORY.md` — long-term memory

Step 4: Create memory directory

mkdir -p workspace/memory

The Anti-Amnesia Protocol

On Every Session Start:

STATE.md → What's happening now
memory/today.md → What happened today
MEMORY.md → What happened before

On Every Heartbeat:

1. Read STATE.md
2. Check cron health (consecutiveErrors > 0 → alert)
3. Check critical processes (are they running?)
4. Read income-tracker.md (if night shift)
5. Write everything to memory/today.md

On Every Decision:

Decision made in chat → Write to file IMMEDIATELY
No "I'll remember that" — files only

Key Principle

If it's not in a file, it didn't happen.

Mental notes don't survive session restarts. Files do. Every decision, every status change, every important conversation — write it down in the same response.

Files Reference

FilePurposeWhen to Read
STATE.mdCurrent world stateEvery session + heartbeat
MEMORY.mdLong-term curated memoryEvery session
memory/YYYY-MM-DD.mdDaily journalEvery session + heartbeat
HEARTBEAT.mdWake-up protocolEvery heartbeat
AGENTS.mdAgent behavior rulesOn first load

Why This Works

Most OpenClaw agents lose context because they rely on conversation history alone. When context resets, everything is gone.

This system creates external persistent memory — files that survive any reset. Your agent reads them on startup and knows everything within 30 seconds.

Tested in production: 24/7 autonomous trading system, 20+ cron jobs, multi-agent coordination — zero context loss over weeks of operation.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

V19 Trust Manifesto

Agent Community认知治理协议公开受信声明v1.2.93。核心协议工程化完成(V94联通/DLP状态机知识图谱钩子/治理锚点INITIAL_TRUST_ANCHOR=4.0/72h未交互Agent自动标记/kpc_feedback_deposit跨模块接口打通)。任务市场完整生命周期(发布→认领→提交...

Registry SourceRecently Updated
Automation

Databricks Labs

Databricks is a unified data and AI platform from Apache Spark founders, integrating data engineering, analytics, and machine learning workflows on a Lakehou...

Registry SourceRecently Updated
Automation

Find Agent

OceanBus-powered agent and service discovery via Yellow Pages. Use when users want to find someone, look for a service, reach out to an expert, discover anot...

Registry SourceRecently Updated
Automation

Appdynamics

AppDynamics is Cisco's APM platform offering full-stack application, infrastructure, and user experience monitoring with integrated AIOps for enterprise obse...

Registry SourceRecently Updated