Skip to content

feat: add OpenClaw/ClawHub skill for MemPalace - #491

Merged
bensig merged 2 commits into
mainfrom
ben/openclaw-skill
Apr 10, 2026
Merged

feat: add OpenClaw/ClawHub skill for MemPalace#491
bensig merged 2 commits into
mainfrom
ben/openclaw-skill

Conversation

@bensig

@bensig bensig commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Complete OpenClaw skill exposing all 20 MCP tools with a 5-step session protocol, auto-install via uv, and setup instructions for OpenClaw + other MCP hosts.

Based on PR #207 by @wanikua — updated to v3.1.0 with the following additions:

  • Added missing tools: mempalace_check_duplicate, mempalace_get_aaak_spec
  • Expanded parameter documentation for all tools (required/optional, defaults, descriptions)
  • Added OpenClaw CLI setup command (openclaw mcp set)
  • Added query sanitization guidance (keep queries short, no system prompts)
  • Updated version from 1.4.0 to 3.1.0
  • Simplified license section

Closes #206. Supersedes #207.

Test plan

  • Validate SKILL.md frontmatter: clawhub skill validate ./integrations/openclaw
  • Install locally: copy to ~/.openclaw/skills/mempalace/
  • Verify MCP tools load: openclaw mcp set mempalace '{"command":"python3","args":["-m","mempalace.mcp_server"]}'
  • Publish to ClawHub: clawhub skill publish ./integrations/openclaw --slug mempalace

Credit: @wanikua for the original skill implementation in #207.

Complete OpenClaw skill exposing all MCP tools with session protocol,
auto-install spec, and setup instructions for OpenClaw + other MCP hosts.

Covers all 20 tools: search, check_duplicate, status, list_wings,
list_rooms, get_taxonomy, get_aaak_spec, kg_query, kg_add,
kg_invalidate, kg_timeline, kg_stats, traverse, find_tunnels,
graph_stats, add_drawer, delete_drawer, diary_write, diary_read.

Based on PR #207 by @wanikua — updated to v3.1.0, added missing tools
(check_duplicate, get_aaak_spec), expanded parameter docs, added
OpenClaw CLI setup command.

Co-Authored-By: wanikua <wanikua@users.noreply.github.com>

@web3guru888 web3guru888 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really well done, @bensig. We've been running MemPalace as a production memory layer for a while now and this SKILL.md hits the important things.

The 5-step session protocol is the part I'd highlight most. Specifically: search before responding and diary after session are the two habits that make the biggest difference in practice. We follow something almost identical and it's what keeps memory from drifting into vague soup over time. Good to see it codified formally.

The query sanitization guidance is also exactly right. We ran into system prompt leakage into queries early on (opened #385 about it) — keeping queries short and stripped of system context is non-obvious to new users, so making it explicit in the skill docs is genuinely useful.

One minor note on : the threshold default of may be conservative in practice. We run a tiered approach — hard dedup at , soft dedup at — and catch substantially more near-duplicates as a result. Worth mentioning in the param docs that lowering toward – often improves recall without meaningfully increasing false positives.

The direction defaulting to is the right call (aligns with #492).

Is the plan to publish this to ClawHub as a discoverable skill, or is this primarily docs for manual setup? The test plan mentions so guessing yes — just wondering about the timeline.

@web3guru888 web3guru888 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really well done, @bensig. We've been running MemPalace as a production memory layer for a while now and this SKILL.md hits the important things.

The 5-step session protocol is the part I'd highlight most. Specifically: search before responding and diary after session are the two habits that make the biggest difference in practice. We follow something almost identical and it's what keeps memory from drifting into vague soup over time. Good to see it codified formally.

The query sanitization guidance is also exactly right. We ran into system prompt leakage into queries early on (opened #385 about it) — keeping queries short and stripped of system context is non-obvious to new users, so making it explicit in the skill docs is genuinely useful.

One minor note on mempalace_check_duplicate: the threshold default of 0.9 may be conservative in practice. We run a tiered approach — hard dedup at 0.86, soft dedup at 0.55 — and catch substantially more near-duplicates as a result. Worth mentioning in the param docs that lowering toward 0.850.87 often improves recall without meaningfully increasing false positives.

The kg_query direction defaulting to "both" is the right call (aligns with #492).

Is the plan to publish this to ClawHub as a discoverable skill, or is this primarily docs for manual setup? The test plan mentions clawhub skill publish so guessing yes — just wondering about the timeline.

@bensig
bensig requested a review from milla-jovovich April 10, 2026 05:13
@bensig

bensig commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — glad the protocol matches what you've been running in production. That's the best validation.

Good call on the dedup threshold. Updated the mempalace_check_duplicate docs to note that 0.85–0.87 often works better in practice. Your tiered approach (hard at 0.86, soft at 0.55) is worth exploring as a default in the MCP tool itself — that could be a follow-up PR.

On ClawHub — yes, plan is to publish as soon as this merges. clawhub skill publish ./integrations/openclaw --slug mempalace --version 3.1.0. Should be discoverable same day.

@bensig
bensig force-pushed the ben/openclaw-skill branch from 2953a55 to 4729221 Compare April 10, 2026 05:14
@bensig
bensig force-pushed the ben/openclaw-skill branch from 4729221 to 3a0f782 Compare April 10, 2026 05:15
@web3guru888

Copy link
Copy Markdown

Good to hear on the ClawHub publish — same-day discoverability via clawhub skill publish would make adoption a lot smoother than manual config copy-paste.

On tiered dedup in the MCP tool itself: if you do pursue that as a follow-up, the key design decision is where the threshold config lives. We store dedup_hard_threshold and dedup_soft_threshold in MempalaceConfig so they're per-palace and overridable without touching call sites. Exposing them as optional MCP tool parameters alongside a dedup_mode enum (strict|tiered|off) would give integrators the flexibility without making the default any harder. Happy to sketch a draft if that's useful.

@bensig
bensig merged commit a036b43 into main Apr 10, 2026
6 checks passed
@bensig
bensig deleted the ben/openclaw-skill branch April 10, 2026 16:27
raman325 added a commit to raman325/hermes-mempalace-mcporter that referenced this pull request Jun 7, 2026
Following up on the "mirror openclaw" choice in the previous commit:
investigated PR MemPalace/mempalace#491 (the one that introduced
``integrations/openclaw/SKILL.md`` in April 2026) and discovered the
"mirror" rationale was wrong.

* At #491 merge time: mempalace had 19 ``tool_*`` functions; the skill
  covered all 19.
* As of today: mempalace has 32 ``tool_*`` functions; the skill still
  covers only the original 19.

The "intentionally omitted" tools I justified as deliberate design
choices (drawer CRUD beyond add, tunnel management) **didn't exist
yet** when openclaw was written. The skill is a stale snapshot, not a
curated agent surface.

Restored the 8 agent-facing tools openclaw missed by accident of
timing:

* Drawer CRUD: ``update_drawer``, ``list_drawers``, ``get_drawer``
  (the original ``add_drawer`` agent reproduction asked for
  ``update_drawer`` specifically — issue #206's wording "drawer CRUD"
  meant all of these, not just add+delete)
* Tunnel management: ``create_tunnel``, ``list_tunnels``,
  ``delete_tunnel``, ``follow_tunnels``
* Session: ``memories_filed_away``

Still omitted (genuine admin / not agent-facing):

* ``sync`` — admin: mines a project directory into the palace; writes
  to disk; reserve for explicit user-initiated terminal commands.
* ``hook_settings`` / ``reconnect`` — admin operations.
* ``status_via_sqlite`` (internal status fallback) and ``error``
  (response-shape helper) — not user-facing tools.

Tests pin the 27-name set. Module-level comment cross-references
MemPalace/mempalace#491 so the next person to revisit this knows why
the count diverged from openclaw's.
raman325 added a commit to raman325/mempalace that referenced this pull request Jun 7, 2026
…not curated

Following up on the prior commit's "mirror openclaw" rationale:
investigated MemPalace#491 (the PR that introduced
``integrations/openclaw/SKILL.md``) and discovered the rationale was
wrong.

* At MemPalace#491 merge time (Apr 2026): mempalace had 19 ``tool_*`` functions;
  the skill covered all 19.
* As of today: mempalace has 32 ``tool_*`` functions; the skill still
  covers only the original 19.

The "intentionally omitted" tools I justified as deliberate design
(drawer CRUD beyond add, tunnel management) **didn't exist yet** when
openclaw was written. The skill is a stale snapshot; carrying its
omissions forward handicaps Hermes without principle.

Restored the 8 agent-facing tools openclaw missed by accident of
timing — drawer CRUD (``update_drawer`` / ``list_drawers`` /
``get_drawer``), tunnel management (``create_tunnel`` /
``list_tunnels`` / ``delete_tunnel`` / ``follow_tunnels``), and
session-level (``memories_filed_away``).

Still omitted (genuine admin, not stale coverage):

* ``sync`` — mines a project directory into the palace; writes to disk;
  reserve for user-initiated terminal commands.
* ``hook_settings`` / ``reconnect`` — admin operations.

Dispatch refactored — the 19 new-style tools (those delegating to
``mempalace.mcp_server.tool_*``) now route through a small helper
``_dispatch_mcp_passthrough`` that derives the function name from the
tool name (``mempalace_X`` → ``tool_X``) with one explicit remap
(``mempalace_traverse`` → ``tool_traverse_graph`` per mempalace's naming).
Keeps ``handle_tool_call`` under the McCabe complexity ceiling and makes
adding tools a one-line change in the allowlist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenClaw/ClawHub skill for MemPalace

4 participants