Cognitive Memory System for Openclaw

An intelligent multi-store memory system for AI agents featuring human-like encoding, reflection cycles, and decay-based forgetting.

linbei2007
v1.0.0
Mar 17, 2026
0
920
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install cognitive-memory-temp

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 cognitive-memory-temp 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 Cognitive Memory System?

The Cognitive Memory System is a sophisticated architectural framework designed to move beyond basic flat-file memory for autonomous agents. It implements a layered cognitive stack including episodic, semantic, procedural, and core memory stores, allowing AI agents to retain context, learn from historical interactions, and evolve their internal identity over time. By integrating this system into your Openclaw Skills workflow, you empower agents to handle complex, long-term tasks with human-like recall and philosophical self-reflection.

This architecture ensures that the most relevant information remains in the context window while less important data is archived through a mathematical decay model. It provides a robust foundation for building sophisticated agents that don't just process commands, but grow through experience.

Cognitive Memory System Use Cases

  • Persistent personalization across multiple agent sessions based on user preferences.
  • Knowledge graph construction and entity relationship tracking from ongoing conversations.
  • Automated reflection and self-improvement cycles for long-running autonomous agents.
  • Multi-agent coordination requiring shared memory access with controlled write permissions.
  • Establishing a permanent audit trail for agent decisions and knowledge mutations.

How Cognitive Memory System Works

  1. The Trigger Engine monitors natural language inputs for keywords like remember or forget to route information to the appropriate memory store.
  2. Data is categorized into specialized stores: Core (always loaded), Episodic (event logs), Semantic (knowledge graph), or Procedural (learned workflows).
  3. A Decay Model automatically calculates relevance scores based on access frequency and time, deprioritizing stale information.
  4. Reflection Cycles periodically consolidate episodic logs into semantic knowledge, updating the agent self-image and soul files.
  5. The Multi-Agent Layer manages shared read access and a gated write model where sub-agents propose memories for the primary agent to review.
  6. The Audit System tracks every file mutation using Git commits and structured logs for full transparency.

Cognitive Memory System Setup

To get started with this system for Openclaw Skills, run the initialization script to prepare your workspace:

bash scripts/init_memory.sh /path/to/workspace

Next, update your global configuration file (e.g., ~/.clawdbot/clawdbot.json) to enable the memory provider:

{
  "memorySearch": {
    "enabled": true,
    "provider": "voyage",
    "sources": ["memory", "sessions"],
    "indexMode": "hot",
    "minScore": 0.3,
    "maxResults": 20
  }
}

Finally, append the agent instruction block located in assets/templates/agents-memory-block.md to your project's AGENTS.md file.

Cognitive Memory System Data Schema & Taxonomy

The system organizes data using a hierarchical file structure to balance context window limits with deep retrieval:

Component File Path Description
Core Memory MEMORY.md Critical facts (~3K tokens) always present in the context window.
Identity IDENTITY.md Defines facts, self-image, and logs self-awareness entries.
Soul SOUL.md Encapsulates core values, principles, and behavioral boundaries.
Episodes memory/episodes/ Chronological logs of interactions organized by date.
Knowledge Graph memory/graph/ Stores entities and relationships as distinct Markdown files.
Meta Tracking memory/meta/ Contains decay scores, reflection archives, and reward logs.

Cognitive Memory System Advanced Features

  • Philosophical Internal Monologue: Agents engage in third-person self-examination to deepen understanding of the user and themselves.
  • Token-Based Evolution: A reward system where users grant token budgets for agents to perform deeper reflection cycles.
  • Decay-Based Forgetting: Mathematical relevance scoring that naturally archives dormant memories to save context space.
  • Gated Multi-Agent Memory: A robust proposal system allowing sub-agents to contribute to the long-term memory without corrupting core data.
  • Self-Image Consolidation: Periodic analysis of self-awareness logs to rewrite and compact the agent's internal identity.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*