Claude-Mem OpenClaw Plugin — Setup Guide

Records agent observations and injects cross-session memory context into OpenClaw gateway agents.

115k|10.0k|Updated Aug 31, 2025
Ready to run
npx skills add https://github.com/thedotmack/claude-mem --skill claude-mem-openclaw-plugin-setup-guide-thedotmack
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: Claude-Mem OpenClaw Plugin — Setup Guide
Source: https://github.com/thedotmack/claude-mem/tree/main/openclaw
Command: npx skills add https://github.com/thedotmack/claude-mem --skill claude-mem-openclaw-plugin-setup-guide-thedotmack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bun, uv, and includes scripts (resource) and references (resource) components.

What problem does it solve? OpenClaw agents lose all context between sessions, forcing you to re-explain the codebase, previous decisions, and completed work every time. Claude-Mem solves this by automatically capturing observations from tool usage, summarizing them, and injecting relevant context back into each agent's system prompt—giving agents persistent memory without manual intervention. ## Core Features & Use Cases - Automatic Observation Recording: Captures every tool call (Read, Write, Bash, etc.) as timestamped observations with AI-generated summaries. - System Prompt Context Injection: Delivers a timeline of recent observations to agents before each prompt, providing cross-session awareness. - Real-Time Observation Feed: Streams observations to Telegram, Discord, Slack, Signal, WhatsApp, or LINE channels so you watch agents learn in real time. - Use Case: Your gateway runs a coding agent that implements features across multiple sessions. Without Claude-Mem, session 2 starts with no memory of session 1's architectural decisions. With Claude-Mem, the agent automatically receives a summary of what was built, why, and what remained, enabling coherent multi-session development. ## Quick Start Install the plugin using the automated installer: curl -fsSL https://install.cmem.ai/openclaw.sh | bash, then configure your AI provider and optional observation feed channel in the OpenClaw config file.

Frequently Asked Questions about Claude-Mem OpenClaw Plugin — Setup Guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Claude-Mem inject memory into agent prompts?▼

The plugin intercepts the before_prompt_build hook, fetches recent observations from the worker service via GET /api/context/inject, and returns the timeline as appendSystemContext. This context is cached for 60 seconds per project to reduce latency. Context is delivered to the agent's system prompt, not written to MEMORY.md, keeping agent-curated memory separate.

What tool calls does Claude-Mem capture?▼

Claude-Mem records Read, Write, Edit, Bash, and any custom tool calls as observations. Tools prefixed with memory_ are skipped to avoid recursive recording. Tool responses are truncated to 1000 characters. Failed calls include their error text in the observation.

How do I enable real-time observation streaming to Telegram or Discord?▼

Set observationFeed.enabled to true in your plugin config, specify channel (telegram, discord, slack, signal, whatsapp, or line), and provide the target chat or channel ID. The plugin connects to the worker's SSE stream and forwards new_observation events to your chosen channel with auto-reconnection and exponential backoff.

What happens if the Claude-Mem worker is unreachable?▼

A circuit breaker detects unreachable worker after 3 failures and disables requests for 30 seconds. Agents continue to function normally—context injection is skipped silently, and observations are not recorded. Once the worker reconnects, the circuit automatically closes and recording resumes.

Can I exclude specific agents from context injection?▼

Yes. Add agent IDs to syncMemoryFileExclude in the plugin config. Observations from excluded agents are still recorded in the database; only system prompt injection is skipped. This is useful for agents that curate their own memory.

Does Claude-Mem work when the gateway runs in Docker?▼

Yes. Set workerHost to host.docker.internal in the plugin config so the gateway can reach the worker running on the Docker host. The worker itself always runs on port 37777 (or a custom port specified in config).