/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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cogmem - 安装完成后,直接呼叫该 Skill 的名称或使用
/cogmem触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 65 次。
如何安装 Cogmem Memory Backend?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cogmem」即可一键安装,无需额外配置。
Cogmem Memory Backend 是免费的吗?
是的,Cogmem Memory Backend 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Cogmem Memory Backend 支持哪些平台?
Cogmem Memory Backend 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cogmem Memory Backend?
由 liuqin164(@liuqin164)开发并维护,当前版本 v2.0.3。