Bulletproof Memory for Openclaw

A Write-Ahead Log protocol that gives AI agents persistent memory that survives session restarts and context compaction.

leowing
v1.0.0
Mar 3, 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 bulletproof-memory-1-0-0

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 bulletproof-memory-1-0-0 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 Bulletproof Memory?

Bulletproof Memory is a technical framework designed to solve the problem of context drift and memory loss in AI agents. By implementing a Write-Ahead Log (WAL) protocol, this skill ensures that critical details are recorded in a SESSION-STATE.md file before the agent responds to the user. This approach moves the responsibility of remembering from the agent's unreliable internal memory to an automated rule triggered by user input.

As part of the Openclaw Skills ecosystem, this methodology creates a "hot RAM" for agents. It prevents information from vanishing during chat history compaction or when a session is restarted, ensuring the agent always knows the current task, key decisions, and active file paths without needing to be reminded by the user.

Bulletproof Memory Use Cases

  • Preventing context loss during long conversations where message history is truncated or compacted.
  • Maintaining state across multiple sessions or after a system restart.
  • Capturing real-time user corrections and decisions immediately to prevent future hallucinations.
  • Facilitating complex multi-file development tasks where the agent must track specific active file paths.
  • Providing a handoff mechanism for agents to resume work after a break without asking where were we?

How Bulletproof Memory Works

  1. The user provides a concrete detail, decision, or correction in the chat.
  2. The WAL protocol triggers immediately upon detecting this new input as the primary driver.
  3. The agent updates the SESSION-STATE.md file with the new context before generating its response.
  4. When a new session starts or context is lost, the agent follows the Recovery Protocol to read SESSION-STATE.md first.
  5. The agent monitors its own context window percentage and performs Memory Flushes to save state before history is dropped.

Bulletproof Memory Setup

Create a file named SESSION-STATE.md in your project root with the following structure:

# SESSION-STATE.md — Active Working Memory
## Current Task
[Description]
## Immediate Context
[Details]
## Key Files
[Paths]
## Last Updated
[Timestamp]

Then, update your agent's system instructions in AGENTS.md to include the WAL Protocol rules and the Recovery Protocol as part of your Openclaw Skills configuration. Use the following logic:

### WRITE-AHEAD LOG (WAL) PROTOCOL
Trigger: If the user provides a concrete detail, you MUST update SESSION-STATE.md BEFORE responding.

Bulletproof Memory Data Schema & Taxonomy

The skill relies on a structured markdown file called SESSION-STATE.md which acts as the agent's transactional log.

Field Description
Current Task The high-level objective currently being pursued by the agent.
Immediate Context Specific decisions, user corrections, and situational data from the current session.
Key Files Absolute or relative paths to files relevant to the active task for quick retrieval.
Last Updated A timestamp of the last state change to ensure temporal accuracy.

Additionally, the system utilizes daily notes for archival context during the recovery phase of the Openclaw Skills workflow.

Bulletproof Memory Advanced Features

  • Compaction Recovery Protocol: Automatically triggers context restoration when the agent detects truncated history or summary tags.
  • Memory Flush Protocol: Dynamic behavior changes based on context window usage, initiating emergency flushes at 85% capacity.
  • Session Startup Sequence: Forced priority reading of identity and state files before any user interaction occurs.
  • Stateful Operator Law: Redefines chat history as a temporary buffer and SESSION-STATE.md as the primary source of truth.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*