/install cogmem
cogmem Memory Backend for OpenClaw
Installs and connects the exact version of cogmem from GitHub — agent-native memory kernel — to the current OpenClaw workspace.
This skill follows the official OpenClaw backend documentation from the repository.
What This Does
- Installs
[email protected]CLI globally via the official one-line installer - Runs
cogmem initwith project scope for OpenClaw agent - Runs
cogmem doctor --fix --agent openclaw --workspace .to validate and repair - Runs
cogmem connect openclaw --workspace . --auto --forceto wire OpenClaw plugin and import existing memory - Sets up automatic memory injection and turn recording
⚠️ Requirements
Two models are required:
- Embedding model — for semantic recall (e.g. Ollama
qwen3-embedding:0.6b, dimension 1024) - LLM model — for Dream Curator / memory synthesis (e.g. Ollama
qwen2.5:7b)
Without both configured, cogmem doctor will warn and recall quality will be degraded.
What cogmem Is (and Is Not)
✅ It stores: conversation turns, user preferences, agent observations, task events
❌ It is not: a knowledge base, a note-taking app, a vector RAG wrapper, an Obsidian replacement, a shared memory system
Bio-inspired architecture: raw evidence is preserved; active memory is selective. Enables recall from dozens of days ago with source anchors. Each agent has its own isolated memory database.
Install
From the OpenClaw workspace root (~/.openclaw/workspace):
# Install exact version matching the repo
curl -fsSL https://raw.githubusercontent.com/liuqin164/cogmem/main/install.sh | bash
cogmem init --yes --agent openclaw --scope project
cogmem doctor --fix --agent openclaw --workspace .
cogmem connect openclaw --workspace . --auto --force
Local Quantized Embeddings (Recommended)
For semantic recall, configure a local embedding provider. Recommended with Ollama:
ollama pull qwen3-embedding:0.6b
Edit ~/.cogmem/config.toml (or project .cogmem/config.toml):
[core]
db_path = "memory.db"
vector_backend = "sqlite-vec"
vector_dimension = 1024
[embedding]
provider = "openai_compatible"
base_url = "http://localhost:11434/v1"
model = "qwen3-embedding:0.6b"
timeout_ms = 30000
[memory_model]
provider = "openai_compatible"
base_url = "http://localhost:11434/v1"
model = "qwen2.5:7b"
api_key = ""
timeout_ms = 60000
Run cogmem doctor --fix --agent openclaw --workspace . after editing.
Import Existing OpenClaw Memory
Preview first, then migrate:
cogmem import-openclaw --workspace . --project openclaw --dry-run
cogmem import-openclaw --workspace . --project openclaw
For older imports needing raw ledger anchors:
cogmem import-openclaw --workspace . --project openclaw --config .cogmem/config.toml --reindex-raw --json
Update
cogmem update --yes
cogmem doctor --fix --agent openclaw --workspace .
Runtime
After installation, OpenClaw will automatically:
- Inject relevant memories before each prompt via governed recall
- Record each turn (user + assistant) to raw ledger
- Run Dream Curator in background to propose long-term memories
- Use CPU governance to promote evidence-backed summaries
Agent-Facing Recall
You can manually query memories:
cogmem memory recall --query "what did we discuss about memory black boxes?" --project openclaw --agent openclaw --json
Special intents:
--intent previous_session_summaryfor "上个会话我们聊了什么"--intent forensic_quotefor "我当时关于X的原话是什么"
View source context:
cogmem memory show --event \x3Cevent-id> --before 2 --after 2 --json
Post-Install Verification
cogmem doctor --agent openclaw --workspace .
cogmem memory status --project openclaw --json
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install cogmem - After installation, invoke the skill by name or use
/cogmem - Provide required inputs per the skill's parameter spec and get structured output
What is Cogmem Memory Backend?
cogmem — bio-inspired agent memory kernel for OpenClaw. Stores conversation turns, enables recall from dozens of days ago. Requires embedding + LLM model. Si... It is an AI Agent Skill for Claude Code / OpenClaw, with 65 downloads so far.
How do I install Cogmem Memory Backend?
Run "/install cogmem" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Cogmem Memory Backend free?
Yes, Cogmem Memory Backend is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Cogmem Memory Backend support?
Cogmem Memory Backend is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Cogmem Memory Backend?
It is built and maintained by liuqin164 (@liuqin164); the current version is v2.0.3.