Firm Hebbian Memory for Openclaw

An adaptive memory system for AI agents that uses Hebbian learning principles to reinforce or atrophy work patterns based on real-world usage.

romainsantoli-web
v1.0.0
Mar 1, 2026
0
1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install firm-hebbian-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 firm-hebbian-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 Firm Hebbian Memory?

Firm Hebbian Memory is a sophisticated architectural layer designed to make AI agent configurations, specifically those following the Claude.md standard, self-evolving and dynamic. By utilizing Openclaw Skills, this system implements mechanisms inspired by synaptic plasticity, where frequently used patterns (co-activation) are strengthened while obsolete instructions naturally atrophy over time. It effectively bridges the gap between episodic session logs and a consolidated core knowledge base.

The system operates across a four-layer architecture, ranging from immutable core rules to episodic indexes. This ensures that the agent's behavior remains consistent with human intent while benefiting from the efficiency of automated pattern recognition. It transforms raw session data into a structured, weighted memory graph that evolves with the user's workflow.

Firm Hebbian Memory Use Cases

  • Automating the evolution of system prompts based on recurring developer workflows.
  • Identifying and removing obsolete coding standards or project rules through natural decay.
  • Implementing secure, PII-stripped session logging for long-term project memory.
  • Detecting semantic drift in AI behavior compared to a baseline configuration using Openclaw Skills.

How Firm Hebbian Memory Works

  1. Ingestion: The system harvests JSONL session logs through the harvest tool, stripping PII and sensitive data automatically.
  2. Episodic Indexing: Sessions are stored in a local SQLite database and indexed via vectors for semantic retrieval.
  3. Pattern Analysis: The analyze tool identifies co-activation patterns using Jaccard similarity and clustering algorithms.
  4. Weight Update: Hebbian weights are calculated for various rules, applying a learning rate for reinforcement and a decay rate for unused patterns.
  5. Consolidation: Rules that cross specific weight thresholds are promoted from episodic memory to consolidated patterns, with a final human-in-the-loop review for core updates.

Firm Hebbian Memory Setup

To integrate this system into your workflow, first ensure your environment meets the requirements for Openclaw Skills. Then, configure the post-session hook:

# Create the hook directory
mkdir -p ~/.openclaw/hooks/

# Set up the post-session harvest script
cat <<EOF > ~/.openclaw/hooks/post-session.sh
#!/bin/bash
SESSION_LOG="\$(ls -t ~/.openclaw/sessions/*.jsonl | head -1)"
curl -s -X POST http://localhost:8012/mcp \\
  -H "Content-Type: application/json" \\
  -d "{\"method\": \"tools/call\", \"params\": {\"name\": \"openclaw_hebbian_harvest\", \"arguments\": {\"session_jsonl_path\": \"\$SESSION_LOG\"}}}"
EOF

chmod +x ~/.openclaw/hooks/post-session.sh

Firm Hebbian Memory Data Schema & Taxonomy

The memory system organizes data into four distinct layers to ensure stability and auditability:

Layer Name Description
Layer 1 CORE Immutable rules modified only by humans.
Layer 2 CONSOLIDATED Auto-updated patterns based on Hebbian weights.
Layer 3 EPISODIC Vectorized session pointers and raw logs.
Layer 4 META System-level instructions for the memory engine.

Weights are managed between 0.0 (deletion) and 0.95 (maximum strength). Any transition to Layer 1 requires a manual Git commit and human approval.

Firm Hebbian Memory Advanced Features

  • Multi-pattern PII stripping covering emails, IPs, API keys, and AWS credentials.
  • Semantic drift detection that alerts users if agent behavior diverges more than 30% from the baseline.
  • Dry-run mode for weight updates to preview memory changes before they are applied to the active configuration.
  • Git-backed reversibility where every memory consolidation creates an atomic commit for easy rollback.
  • Configurable decay parameters to control how quickly unused instructions are forgotten within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*