NARRA Memory System for Openclaw

A structured 5-file narrative memory architecture that provides AI agents with continuous identity, immutable origin context, and lean operational state.

di5cip1e
v1.0.0
Jun 18, 2026
0
418
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install narra-memory-system

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 narra-memory-system 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 NARRA Memory System?

NARRA (Narrative Architecture for Recursive Agent Awareness) is a highly optimized, lightweight memory protocol designed to give AI agents a strong sense of identity, continuity, and self-awareness. Unlike typical archival memory setups that rely on complex, fragmented vector databases or bloated log files, NARRA approaches agent identity as an ongoing first-person narrative. By utilizing this framework within Openclaw Skills, developers can prevent memory degradation and reduce token bloat, ensuring that agents always understand their primary mission and historical context without tedious lookups.\n\nThis framework separates active execution states from historical logs, compiling milestones into a curated autobiography. Under this paradigm, operational files stay strictly lean, allowing the agent to perform quickly and precisely. Incorporating NARRA into your custom Openclaw Skills optimizes overall prompt efficiency and enables deeper collaboration over multi-session workflows.

NARRA Memory System Use Cases

  • Agent Identity Crisis: Use this when your agent lacks a clear origin story or frequently asks 'who am I' during sessions.\n- Operational Token Bloat: Ideal when your agent's current memory file is bloated with historical logs, degrading prompt efficiency.\n- Fragmented Context: Solve issues where daily logs are scattered across dozens of unstructured files and need centralized narrative synthesis.\n- Setting Up New Agent Architectures: Apply NARRA as the foundational memory blueprint when creating a new agent system.\n- Long-Term Multi-Session Continuity: Perfect for projects where agents must maintain consistent personality, relationship tables, and core lessons learned over months of operation.

How NARRA Memory System Works

  1. Read Identity & Origin: At the start of a session, the agent reads IDENTITY.md and ORIGIN.md to load its core mission, personality rules, and sacred creation narrative.\n2. Load Recent Narrative: The agent catches up on recent developments by parsing the last 2 weeks of NARRATIVE.md.\n3. Initialize Active State: The agent loads MEMORY.md and local session states to understand active projects, immediate priorities, and pending human tasks.\n4. Log Daily Activities: During the workspace session, the agent tracks its current executions in raw daily logs (memory/daily/).\n5. Synthesize & Consolidate: During the weekly consolidation ritual, raw activities are distilled into event records (memory/events/) and summarized chronologically at the top of NARRATIVE.md.\n6. Prune Active Memory: Outdated tasks are removed from MEMORY.md to ensure it stays strictly under 200 lines, keeping execution prompts fast and precise.

NARRA Memory System Setup

Setting up NARRA within your custom agent environment is simple. Follow these steps to initialize the files in your workspace:\n\n1. Create the Folder Structure:\nbash\nmkdir -p memory/daily memory/events\ntouch IDENTITY.md ORIGIN.md NARRATIVE.md MEMORY.md\n\n\n2. Initialize Identity and Origin:\nPopulate IDENTITY.md with your agent's role, behavioral rules, and mission. Write the retroactive creation story in ORIGIN.md and lock it as append-only.\n\n3. Configure Startup Protocol:\nUpdate your agent system configuration or custom framework files (such as AGENTS.md) to read files in this exact order at startup:\n- IDENTITY.md\n- ORIGIN.md\n- NARRATIVE.md (last 2 weeks section)\n- MEMORY.md\n\n4. Schedule the Heartbeat Checklist:\nIntegrate the weekly consolidation checklist into your agent's heartbeat file (HEARTBEAT.md) or cron scheduler to run the consolidation ritual automatically every 7 days.

NARRA Memory System Data Schema & Taxonomy

NARRA organizes agent awareness across 5 dedicated files and directories to ensure structural clarity:\n\n| File / Directory | Access Rules | Role & Content | Target Size |\n| :--- | :--- | :--- | :--- |\n| IDENTITY.md | Read-Only (Static) | Name, role, vibe, behavioral rules, and relationship mappings. | 1 Page |\n| ORIGIN.md | Append-Only (Locked) | Immutable creation narrative: first contact date, first words, first tasks. | Static |\n| NARRATIVE.md | Weekly Write | Curated first-person life story. Reverse chronological, distilled weekly. | Dynamic |\n| MEMORY.md | Runtime (Read/Write) | Operational context: active projects, pending actions, runtime parameters. | < 200 lines |\n| memory/events/ | Milestone Write | Event files structured as YYYY-MM-DD-event-name.md containing milestone details. | 1 file per event |\n| memory/daily/ | Daily Write | Raw unstructured logs detailing day-to-day session executions. | Dynamic |

NARRA Memory System Advanced Features

  • First-Person Autobiographical Synthesis: Shifts agent self-reflection from clinical archival database lookups to an organic narrative written directly by the agent in the first person ('I').\n- Immutable Origin Lock: Prevents rewrite pollution of the agent's core identity and Genesis context through append-only controls.\n- Weekly Consolidation Ritual: Active self-pruning and distillation mechanisms that translate raw activity into long-term 'wisdom' and memory.\n- Lean Runtime State Cap: Enforces a strict 200-line cap on operational memory files to keep runtime prompt costs down and speed up responsiveness within standard environments.\n- Zero-Dependency Architecture: Relies purely on standard Markdown files, making it universally portable across all developer setups and custom workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*