A sophisticated four-tier memory architecture designed to manage AI persona, task context, and long-term knowledge without overwhelming context windows.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install four-layer-memory
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install four-layer-memory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Four-Layer Memory is a specialized framework for AI agents to manage information across distinct temporal and functional layers. By categorizing data into Identity, Working Memory, Short-Term Logs, and Long-Term Storage, it ensures that an agent maintains a consistent persona and retains critical knowledge while keeping the active context window lean and relevant.
This architecture is a cornerstone for developers building persistent agents within Openclaw Skills. It solves the common 'context bloat' problem by providing a clear hierarchy for where information should live, ensuring that daily interactions are logged and significant insights are promoted to long-term storage, while transient task data is cleared appropriately.
To initialize and manage the memory architecture within your Openclaw Skills environment, use the provided utility scripts:
# Bootstrap the directory structure and initial memory files
python3 scripts/personal_ai_memory.py bootstrap
# Check the current status and health of the memory layers
python3 scripts/personal_ai_memory.py status
# Cleanup and archive short-term logs older than 14 days
python3 scripts/personal_ai_memory.py archive --keep-days 14
The skill organizes data into a strictly partitioned directory structure to ensure modularity and ease of access for Openclaw Skills agents:
| Layer | Directory Path | Data Type |
|---|---|---|
| Identity | identity/ |
Personality anchors, core preferences |
| Working | working-memory/ |
Current task state, active context |
| Short-Term | short-term-logs/ |
Daily conversation logs, session history |
| Long-Term | long-term-memory/ |
Verified facts, distilled experiences |
| Archive | archive/ |
Historical logs moved out of active context |
Loading
An automated validation and repair tool that executes project checks, diagnoses failures, and performs surgical code fixes.

A professional-grade engineering specification for Vue 3 and TypeScript projects, ensuring scalable architecture and enterprise coding standards.

Lossless Claw is a local memory distillation tool that transforms raw conversation logs into structured, long-term knowledge while preserving traceability.

An end-to-end patent intelligence tool for technical mining, competitive layout planning, and high-quality invention disclosure drafting.

An automated security auditor for frontend codebases that detects vulnerabilities like XSS, CSRF, and sensitive data exposure.

A local file-based archiving system designed to structure AI memory, logs, and knowledge into a searchable four-layer directory.








































