Skip to main content
The memoclaw-hooks package integrates MemoClaw directly into OpenClaw’s lifecycle. Your agent automatically recalls relevant memories on session start, stores important context when sessions end, and consolidates memories in the background. No code changes. No prompt engineering. Just install and restart.

Installation

1

Install the CLI

2

Install the hook pack

3

Set your private key

Add MEMOCLAW_PRIVATE_KEY to your environment. If you don’t have a wallet yet, run memoclaw init to generate one.
Or add it to your OpenClaw config:
4

Restart your gateway

Verify the hook is loaded:

What happens automatically

Once installed, the hook fires on five OpenClaw lifecycle events:

What recall looks like

When your agent starts a session, it sees something like:
These are injected as system context — the agent doesn’t need to do anything special.

Configuration

All config is via environment variables. No config files needed.

Multi-agent memory

Use MEMOCLAW_NAMESPACE to control memory isolation between agents.
Same wallet, different namespaces = isolated recall. Same wallet, same namespace = shared memory.

Using with the skill

The hook handles the automatic lifecycle (session start/end, compaction, heartbeats). For manual memory operations — like storing specific facts or recalling on demand — install the MemoClaw skill alongside the hook:
The skill gives your agent memoclaw store, memoclaw recall, and other CLI commands it can call mid-conversation.

Pricing

  • 100 free calls per wallet — no payment setup needed
  • After that: $0.005–$0.01 per call via x402 (USDC on Base)
  • The hook typically makes 2–4 API calls per session lifecycle
  • At normal usage, that’s a few cents per day

Source