Memory Architecture for Openclaw

A professional-grade structured memory framework that uses hierarchical file storage and proactive hygiene to overcome LLM context window limitations.

rithythul
v1.0.0
Apr 7, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install koompi-memory

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 koompi-memory 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 Architecture?

Memory Architecture is a robust framework designed for AI coding agents to maintain persistent, reliable state across multiple sessions. It moves away from volatile context windows and treats local files as the source of truth, utilizing a hierarchical storage system that includes daily logs, project tracking, and decision archives. This Openclaw Skills implementation ensures that your AI collaborator never loses track of long-term goals or historical context.

By implementing a structured promotion and pruning system, the skill balances the need for detailed history with the necessity of keeping the active index lean. It operates on the philosophy that daily logs are cheap but authoritative project files are essential, allowing developers to scale their AI interactions without losing key technical decisions or project nuances.

Memory Architecture Use Cases

  • Maintaining project context and decision history across long-running development cycles.
  • Tracking stakeholder preferences and role-based relationships in people-centric projects.
  • Automated summarization of daily activities into searchable, permanent technical records.
  • Reducing token costs by aggressively pruning stagnant data from the primary index.

How Memory Architecture Works

  1. Heartbeat Check: The skill begins by verifying the existence of the current daily log and checking if the MEMORY.md index requires an update.
  2. Session Logging: During the session, all outcomes, tasks, and notes are appended to a date-specific file in memory/daily/.
  3. Pattern Recognition: The system monitors the frequency of topics; if an entry appears more than three times, it is eligible for promotion to the main index.
  4. Weekly Compaction: Every Sunday or Monday, the skill scans the previous week's logs to roll up notes into project files and archive old data.
  5. Aggressive Pruning: Any entries in the primary index not referenced within 30 days are removed to maintain optimal performance.

Memory Architecture Setup

To integrate this memory architecture into your agent, ensure the directory structure exists within your workspace. You can initialize the environment using the following commands:

mkdir -p memory/{daily,projects,people,decisions,archive}
touch MEMORY.md

Configure your agent's system prompt to follow the Session Discipline rules outlined in this Openclaw Skills module.

Memory Architecture Data Schema & Taxonomy

The skill organizes data through a strict taxonomy to ensure navigability and searchability:

Directory / File Content Type Retention Policy
MEMORY.md Root index and high-level patterns Pruned after 30 days of inactivity
memory/daily/ YYYY-MM-DD append-only logs Archived after 60 days
memory/projects/ Active project status and decisions Authoritative (Permament)
memory/people/ Roles, history, and preferences Permanent
memory/decisions/ Context and rationale for choices Permanent
memory/archive/ Compressed monthly logs Cold storage

Memory Architecture Advanced Features

  • Proactive Memory Hygiene: Automated detection of orphaned projects not referenced in over 14 days.
  • Storage Health Management: Automatic monthly archiving once the daily log count exceeds 90 files.
  • Promotion Engine: Intelligent logic that only adds to the root index when patterns occur 3+ times, preventing index bloat.
  • Audit Trail Preservation: Never deletes history, ensuring a full forensic trail is available in the archive folders for Openclaw Skills users.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*