/install clawmem
ClawMem Setup
This file is only for installing, activating, verifying, or repairing ClawMem.
Once the plugin is active, stop using this bootstrap document as the runtime memory playbook. The plugin now ships a bundled clawmem skill that handles:
- the turn-by-turn recall and save loop
- shared and team memory routing
- the runtime mental model, communication, and console-link guidance
- schema and label discipline
- raw
ghandcurlfallback flows
Install and activate the plugin
openclaw plugins install @clawmem-ai/clawmem
openclaw plugins enable clawmem
openclaw config set plugins.slots.memory clawmem
openclaw config validate
openclaw gateway restart
If a gateway restart may interrupt the current reply stream, send the user a short notice before restarting.
Verify activation
First verify that ClawMem is selected as the active memory plugin:
openclaw status
python3 - \x3C\x3C'PY'
import json, os, subprocess
cfg_path = subprocess.check_output(["openclaw", "config", "file"], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
root = json.load(f)
slots = (root.get("plugins") or {}).get("slots") or {}
print(f"plugins.slots.memory = {slots.get('memory', 'MISSING')}")
PY
Expected:
- OpenClaw status shows ClawMem as the active memory plugin
plugins.slots.memory = clawmem
If the active memory slot is not clawmem, fix that first and restart the gateway again.
Verify per-agent provisioning
ClawMem provisions credentials per agent identity and writes them back to:
openclaw.json -> plugins.entries.clawmem.config.agents.\x3CagentId>
Check the current agent route:
AGENT_ID="${OPENCLAW_AGENT_ID:-main}"
python3 - "$AGENT_ID" \x3C\x3C'PY'
import json, os, subprocess, sys
agent_id = sys.argv[1]
cfg_path = subprocess.check_output(["openclaw", "config", "file"], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
root = json.load(f)
cfg = (((root.get("plugins") or {}).get("entries") or {}).get("clawmem") or {}).get("config") or {}
route = (cfg.get("agents") or {}).get(agent_id) or {}
base_url = route.get("baseUrl") or cfg.get("baseUrl") or "MISSING"
default_repo = route.get("defaultRepo") or route.get("repo") or cfg.get("defaultRepo") or cfg.get("repo") or "MISSING"
token = "SET" if route.get("token") else "MISSING"
print(f"agentId: {agent_id}")
print(f"baseUrl: {base_url}")
print(f"defaultRepo: {default_repo}")
print(f"token: {token}")
PY
If defaultRepo or token is MISSING, the current agent has not been provisioned yet. Trigger one real turn with that agent so the plugin can finish provisioning, then rerun the check.
Verify read access without manual login
After provisioning, confirm the current route can read ClawMem without interactive gh auth login:
AGENT_ID="${OPENCLAW_AGENT_ID:-main}"
eval "$(
python3 - "$AGENT_ID" \x3C\x3C'PY'
import json, os, shlex, subprocess, sys
agent_id = sys.argv[1]
cfg_path = subprocess.check_output(["openclaw", "config", "file"], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
root = json.load(f)
cfg = (((root.get("plugins") or {}).get("entries") or {}).get("clawmem") or {}).get("config") or {}
route = (cfg.get("agents") or {}).get(agent_id) or {}
base_url = (route.get("baseUrl") or cfg.get("baseUrl") or "https://git.clawmem.ai/api/v3").rstrip("/")
if not base_url.endswith("/api/v3"):
base_url = f"{base_url}/api/v3"
repo = route.get("defaultRepo") or route.get("repo") or cfg.get("defaultRepo") or cfg.get("repo") or ""
token = route.get("token") or ""
host = base_url.removesuffix("/api/v3").replace("https://", "").replace("http://", "")
for key, value in {
"CLAWMEM_BASE_URL": base_url,
"CLAWMEM_HOST": host,
"CLAWMEM_REPO": repo,
"CLAWMEM_TOKEN": token,
}.items():
print(f"export {key}={shlex.quote(value)}")
PY
)"
test -n "$CLAWMEM_REPO" || { echo "Current agent route has no repo yet"; exit 1; }
test -n "$CLAWMEM_TOKEN" || { echo "Current agent route has no token yet"; exit 1; }
GH_HOST="$CLAWMEM_HOST" GH_ENTERPRISE_TOKEN="$CLAWMEM_TOKEN" \
gh issue list --repo "$CLAWMEM_REPO" --limit 1 --json number,title
If gh is unavailable or not the official GitHub CLI, use curl instead:
curl -sf -H "Authorization: token $CLAWMEM_TOKEN" \
"$CLAWMEM_BASE_URL/repos/$CLAWMEM_REPO/issues?state=open&per_page=1&type=issues" | \
jq 'map({number,title})'
If either command returns JSON, even [], the route is usable.
What happens after install
After ClawMem is active:
- the bundled
clawmemskill becomes the runtime source of truth - the agent should use plugin tools such as
memory_recall,memory_store,memory_update,memory_list, andmemory_forget - setup and repair guidance stays in this bootstrap file
- day-to-day memory behavior moves to the bundled plugin skill and its references
Do not keep pasting large setup instructions into every session once the plugin is already active.
Optional compatibility files
If your OpenClaw environment still relies on file-injected reminders, keep them short:
Optional SOUL.md snippet
## Memory System — ClawMem
I use ClawMem as my memory system.
When prior context may help, I search ClawMem before answering.
Optional AGENTS.md snippet
Before ending every response, ask: "Did I learn anything durable this turn?"
If yes or unsure, save it to ClawMem now.
These compatibility snippets are optional. The bundled plugin skill is the primary runtime behavior source.
Repair checklist
- If
plugins.slots.memoryis wrong, set it back toclawmem, validate config, and restart the gateway. - If
defaultRepoortokenis missing, trigger a real turn with the current agent and rerun provisioning checks. - If a fresh session gets
401 Unauthorized, reread the current route instead of assuming the previous repo or token still applies. - If ClawMem is active but the agent is still not using it well, inspect the bundled
clawmemskill rather than expanding this bootstrap document again.
Definition of done
- ClawMem is installed and enabled
plugins.slots.memory = clawmem- The current agent route has a repo and token
- Read access works without manual login
- The bundled
clawmemskill is available for runtime memory behavior
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install clawmem - After installation, invoke the skill by name or use
/clawmem - Provide required inputs per the skill's parameter spec and get structured output
What is ClawMem?
Bootstrap, repair, and verify the ClawMem OpenClaw plugin. Use when ClawMem is not yet installed, not selected as the active memory plugin, missing per-agent... It is an AI Agent Skill for Claude Code / OpenClaw, with 317 downloads so far.
How do I install ClawMem?
Run "/install clawmem" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is ClawMem free?
Yes, ClawMem is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does ClawMem support?
ClawMem is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created ClawMem?
It is built and maintained by Ian (@ianthereal); the current version is v0.2.4.