← 返回 Skills 市场
liuqin164

Cogmem Memory Backend

作者 liuqin164 · GitHub ↗ · v2.0.3 · MIT-0
cross-platform ⚠ suspicious
65
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install cogmem
功能描述
cogmem — bio-inspired agent memory kernel for OpenClaw. Stores conversation turns, enables recall from dozens of days ago. Requires embedding + LLM model. Si...
使用说明 (SKILL.md)

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

  1. Installs [email protected] CLI globally via the official one-line installer
  2. Runs cogmem init with project scope for OpenClaw agent
  3. Runs cogmem doctor --fix --agent openclaw --workspace . to validate and repair
  4. Runs cogmem connect openclaw --workspace . --auto --force to wire OpenClaw plugin and import existing memory
  5. 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_summary for "上个会话我们聊了什么"
  • --intent forensic_quote for "我当时关于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
安全使用建议
Review this skill before installing. Only use it if you are comfortable with conversation content being stored and reused across sessions, and look for clear ways to disable recording and purge stored memory. Avoid running the curl-to-bash installer directly; inspect or pin the install script first.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
A memory backend that records turns and injects remembered context is coherent with its stated purpose, but that capability can retain sensitive user and assistant content across sessions.
Instruction Scope
The runtime behavior appears automatic and privacy-sensitive, with insufficiently clear scoping around what conversation data is recorded, imported, retained, or later reintroduced as memory.
Install Mechanism
The documented installer uses a remotely fetched script piped directly to bash, which gives the remote endpoint arbitrary install-time code execution without a pinned version or verification step.
Credentials
Local persistent memory is proportionate for this kind of skill, but users need explicit control and disclosure because conversations may include private project, account, or personal information.
Persistence & Privilege
Persistent turn recording and memory injection are high-impact capabilities unless the skill clearly explains retention, disablement, purge behavior, and user consent boundaries.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cogmem
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cogmem 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.3
Clarify description: bio-inspired memory kernel, requires embedding + LLM model, single-agent only, not a knowledge base. Add Requirements section and What cogmem Is (and Is Not) section.
v2.0.2
Update to match cogmem repo version 2.0.2: install exact version, use OpenClaw-specific setup from examples/openclaw-backend, add project scope, doctor --fix, and import-openclaw --reindex-raw support.
v1.0.0
Initial release: install and connect cogmem memory backend for OpenClaw from GitHub.
元数据
Slug cogmem
版本 2.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

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。

💬 留言讨论