-
-
Notifications
You must be signed in to change notification settings - Fork 269
docs: Add claude-mem integration guide for OpenClaw #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs: Add claude-mem integration guide for OpenClaw #103
Conversation
Adds documentation for using claude-mem with OpenClaw to reduce token usage through persistent memory compression. - Explains 3-layer progressive disclosure pattern (~10x token savings) - Shows how claude-mem complements OpenClaw's MEMORY.md system - Includes SKILL.md template for ClawHub packaging - Links to resources and configuration options
|
@howlonghasitBen is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 5 comments
docs/claude-mem-integration.md
Outdated
| # Or manually | ||
| cd ~/.claude/plugins/marketplaces | ||
| git clone https://github.com/thedotmack/claude-mem.git thedotmack | ||
| cd thedotmack && npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Manual install path and commands look inconsistent with typical Claude Code plugin layout.
The snippet clones claude-mem into ~/.claude/plugins/marketplaces/thedotmack but then runs cd thedotmack && npm install, which suggests the clone directory is a vendor namespace rather than the package itself. If users follow this verbatim, they may end up in the wrong directory (or with a misleading folder name). Consider aligning the clone target and cd step so it’s unambiguous what directory ends up containing the plugin.
(Also, this repo’s docs mention bun elsewhere; if this project expects bun by default, calling out npm specifically here may confuse users.)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 23:26
Comment:
[P1] Manual install path and commands look inconsistent with typical Claude Code plugin layout.
The snippet clones `claude-mem` into `~/.claude/plugins/marketplaces/thedotmack` but then runs `cd thedotmack && npm install`, which suggests the clone directory is a vendor namespace rather than the package itself. If users follow this verbatim, they may end up in the wrong directory (or with a misleading folder name). Consider aligning the clone target and `cd` step so it’s unambiguous what directory ends up containing the plugin.
(Also, this repo’s docs mention `bun` elsewhere; if this project expects `bun` by default, calling out `npm` specifically here may confuse users.)
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| ```json | ||
| { | ||
| "model": "claude-sonnet-4-20250514", | ||
| "workerPort": 37777, | ||
| "dataDir": "~/.claude-mem/data", | ||
| "logLevel": "info", | ||
| "contextInjection": { | ||
| "enabled": true, | ||
| "maxTokens": 4000 | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Example config pins a specific model name/version that may go stale or not match user access.
Hard-coding "model": "claude-sonnet-4-20250514" in the example can cause copy/paste failures if the claude-mem plugin (or the user’s account) expects a different identifier. Consider either using a placeholder (e.g. "<your-model>") or noting that this value must match the models supported in the user’s environment.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 33:42
Comment:
[P2] Example config pins a specific model name/version that may go stale or not match user access.
Hard-coding `"model": "claude-sonnet-4-20250514"` in the example can cause copy/paste failures if the claude-mem plugin (or the user’s account) expects a different identifier. Consider either using a placeholder (e.g. `"<your-model>"`) or noting that this value must match the models supported in the user’s environment.
How can I resolve this? If you propose a fix, please make it concise.
docs/claude-mem-integration.md
Outdated
| Access the memory stream at http://localhost:37777 to: | ||
| - View real-time observations | ||
| - Browse session history | ||
| - Search past context | ||
| - Configure settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] Localhost URL is unlinked and may be misread in terminals.
Consider formatting http://localhost:37777 as an inline link or code span for readability and to avoid accidental punctuation/markdown issues in some renderers.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 98:102
Comment:
[P3] Localhost URL is unlinked and may be misread in terminals.
Consider formatting `http://localhost:37777` as an inline link or code span for readability and to avoid accidental punctuation/markdown issues in some renderers.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
docs/claude-mem-integration.md
Outdated
| - [OpenClaw Documentation](https://docs.openclaw.ai) | ||
| - [Discord](https://discord.com/invite/J4wttp9vDu) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] External links look potentially incorrect/out of scope for this repo.
https://docs.openclaw.ai and the Discord invite may not be the canonical OpenClaw docs/community for this repository (and the invite could expire). If these are intentional, it may be worth ensuring they’re the official, stable URLs for OpenClaw/ClawHub to avoid sending users to the wrong place.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 108:109
Comment:
[P2] External links look potentially incorrect/out of scope for this repo.
`https://docs.openclaw.ai` and the Discord invite may not be the canonical OpenClaw docs/community for this repository (and the invite could expire). If these are intentional, it may be worth ensuring they’re the official, stable URLs for OpenClaw/ClawHub to avoid sending users to the wrong place.
How can I resolve this? If you propose a fix, please make it concise.| ```markdown | ||
| --- | ||
| name: claude-mem | ||
| description: Persistent memory compression for Claude Code. Automatically captures session context, compresses with AI, and injects relevant history into future sessions. | ||
| homepage: https://github.com/thedotmack/claude-mem | ||
| metadata: | ||
| openclaw: | ||
| emoji: "🧠" | ||
| requires: | ||
| bins: ["node", "npm", "claude"] | ||
| --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] SKILL.md frontmatter includes an emoji which may violate some packaging/CI constraints.
If ClawHub/OpenClaw skill metadata is parsed strictly (YAML frontmatter), including emoji: "🧠" can be fine, but some tooling expects ASCII-only metadata. If the skill spec supports emoji, consider mentioning that; otherwise, using a short name/icon reference avoids potential parsing/encoding issues.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 79:89
Comment:
[P2] SKILL.md frontmatter includes an emoji which may violate some packaging/CI constraints.
If ClawHub/OpenClaw skill metadata is parsed strictly (YAML frontmatter), including `emoji: "🧠"` can be fine, but some tooling expects ASCII-only metadata. If the skill spec supports emoji, consider mentioning that; otherwise, using a short name/icon reference avoids potential parsing/encoding issues.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- SKILL.md with usage documentation - install.sh that clones repo, installs deps, and registers marketplace - Automatic registration ensures OpenClaw-spawned Claude Code instances use claude-mem
skills/claude-mem/scripts/install.sh
Outdated
| # Check if thedotmack already registered | ||
| if grep -q "thedotmack" "$KNOWN_MARKETPLACES"; then | ||
| echo " ✓ Marketplace already registered" | ||
| else | ||
| # Add thedotmack to existing file using jq or fallback | ||
| if command -v jq >/dev/null 2>&1; then | ||
| jq '. + {"thedotmack": {"source": {"source": "github", "repo": "thedotmack/claude-mem"}, "installLocation": "'"$PLUGINS_DIR/thedotmack"'", "lastUpdated": "'"$(date -Iseconds)"'"}}' "$KNOWN_MARKETPLACES" > "$KNOWN_MARKETPLACES.tmp" | ||
| mv "$KNOWN_MARKETPLACES.tmp" "$KNOWN_MARKETPLACES" | ||
| echo " ✓ Added to existing marketplaces" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Clarify install path structure with note about marketplace namespace - Use generic model identifier with note about customization - Fix localhost URL formatting (wrap in backticks) - Note emoji support in SKILL.md frontmatter - Update Discord invite to canonical OpenClaw link - Add claude-mem to docs/README.md index - Improve jq JSON parsing in install.sh for marketplace check
Summary
Adds documentation for using claude-mem with OpenClaw to reduce token usage through persistent memory compression.
What's included
docs/claude-mem-integration.md- Integration guide covering:Why
claude-mem captures Claude Code session context, compresses it with AI, and injects relevant history into future sessions. When combined with OpenClaw's workspace memory (MEMORY.md, daily logs), this provides comprehensive context without token bloat.
Token Savings
The 3-layer search pattern:
search→ Compact index (~50-100 tokens/result)timeline→ Chronological contextget_observations→ Full details ONLY for filtered IDsResults in ~10x token reduction compared to loading full context.
Related
Greptile Overview
Greptile Summary
Adds a new documentation page (
docs/claude-mem-integration.md) describing how to use the externalclaude-memClaude Code plugin alongside OpenClaw. The guide covers installation, an example settings.json, a “3-layer progressive disclosure” token-savings workflow, how this complements OpenClaw’s memory files, and includes a sampleSKILL.mdtemplate plus links to related resources.Confidence Score: 4/5
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!
Context used:
dashboard- AGENTS.md (source)