← 返回 Skills 市场
harrey401

Brain CMS

作者 Harreynish Gowtham · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
637
总下载
1
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install brain-cms
功能描述
Neuroscience-based multi-layer memory system for OpenClaw agents that improves context efficiency using semantic schemas, vector stores, and sleep cycle cons...
使用说明 (SKILL.md)

Brain CMS 🧠

A neuroscience-inspired memory architecture for OpenClaw agents. Replaces flat file injection with sparse, semantic, frequency-gated memory loading.

What This Installs

memory/
├── INDEX.md          ← Hippocampus: topic router + cross-links
├── ANCHORS.md        ← Permanent high-significance event store
└── schemas/          ← Domain-specific semantic schemas (you create these)

memory_brain/
├── index_memory.py   ← Embeds schemas into LanceDB vector store
├── query_memory.py   ← Semantic similarity search
├── nrem.py           ← NREM sleep cycle (compression + anchor promotion)
├── rem.py            ← REM sleep cycle (LLM consolidation via Ollama)
└── vectorstore/      ← LanceDB database (auto-created)

Setup (one-time)

# 1. Run the installer
python3 ~/.openclaw/workspace/skills/brain-cms/install.py

# 2. Index your schemas
cd ~/.openclaw/workspace/memory_brain
.venv/bin/python3 index_memory.py

# 3. Test retrieval
.venv/bin/python3 query_memory.py "your topic here" --sources-only

How It Works

Boot sequence: Load MEMORY.md (lean core) + today's daily log. Nothing else.

When a topic appears: Read memory/INDEX.md → load only the relevant schemas (spreading activation). Check memory/ANCHORS.md for high-significance events.

For ambiguous topics: Run semantic search:

memory_brain/.venv/bin/python3 memory_brain/query_memory.py "message text" --sources-only

Auto-schema creation: When a new significant project or domain appears:

  1. Create memory/\x3Ctopic>.md
  2. Add to INDEX.md with triggers + priority + cross-links
  3. Re-index: memory_brain/.venv/bin/python3 memory_brain/index_memory.py

Sleep cycles:

# NREM — run on shutdown (~30s, no LLM)
cd ~/.openclaw/workspace/memory_brain && .venv/bin/python3 nrem.py

# REM — run weekly (2-5 min, uses local llama3.2:3b, free)
cd ~/.openclaw/workspace/memory_brain && .venv/bin/python3 rem.py

Memory Layers (CMS)

Layer Files When loaded Purpose
Working MEMORY.md + today log Every session Core context
Episodic memory/YYYY-MM-DD.md Session boot Recent events
Semantic memory/*.md schemas On trigger Domain knowledge
Anchors memory/ANCHORS.md On CRITICAL topics Permanent ground truth
Vector memory_brain/vectorstore/ On demand Semantic search

Tagging Anchors

In any daily log, tag high-significance events:

[ANCHOR] Major demo success — full pipeline working end-to-end

NREM auto-promotes these to ANCHORS.md on next shutdown.

Token Savings

Typical MEMORY.md: 150-300 lines injected every session. With Brain CMS: ~50-line core + schemas loaded only when relevant. Estimated savings: 40-60% reduction in context tokens per session.

Requirements

  • Python 3.10+
  • Ollama (for embeddings + REM consolidation)
  • 500MB+ storage for vector store and models
  • lancedb, numpy, pyarrow, requests (auto-installed)
安全使用建议
This skill appears to implement what it claims: a local, neuroscience-inspired memory system. Before installing, consider these practical steps: 1) Review the included install.py and the four brain_scripts (they're bundled in the skill) to confirm you understand the file changes. 2) Backup ~/.openclaw/workspace (or at least AGENTS.md and any existing memory/ directory) — the installer will create/copy files and append to AGENTS.md. 3) Ensure you want to run local Ollama: the code calls http://localhost:11434 for embeddings and generation and SKILL.md recommends pulling the nomic-embed-text and llama3.2:3b models; those model downloads happen via Ollama and pip package installs happen from PyPI. 4) If you do not run Ollama locally, embeddings/generation will fail but no secrets are leaked. 5) The installer uses shell commands (venv creation and pip install) and subprocess.run(shell=True); run only if you trust the source or after manually inspecting the scripts. The only notable metadata inconsistency is that registry 'Requirements' showed none while SKILL.md declares required binaries (python3, ollama) — prefer the SKILL.md requirements when preparing your environment.
功能分析
Type: OpenClaw Skill Name: brain-cms Version: 1.0.0 The skill is classified as suspicious primarily due to the use of `subprocess.run(..., shell=True)` in `install.py`. While the commands executed are hardcoded and appear benign (creating a Python virtual environment and installing dependencies), the `shell=True` argument introduces a shell injection vulnerability. If an attacker could manipulate environment variables (e.g., PATH) or control the interpretation of the command string, it could lead to arbitrary code execution. All other scripts and the SKILL.md instructions appear to align with the stated purpose of a memory system, making network calls only to a local Ollama instance and operating within the expected OpenClaw workspace.
能力评估
Purpose & Capability
Overall coherent: the code, installer, and SKILL.md all implement a local multi-layer memory system that indexes .md schema files, runs semantic search, and performs NREM/REM consolidation using local Ollama and a LanceDB vectorstore. One minor inconsistency: the registry-level 'Requirements' block shown to the scanner lists no required binaries, whereas the SKILL.md metadata requires 'python3' and 'ollama' — the latter is necessary for embeddings/LLM work and is consistent with the scripts.
Instruction Scope
Instructions and scripts stay within the claimed scope: they read/write files under ~/.openclaw/workspace (memory/, memory_brain/), create INDEX.md and ANCHORS.md, index schemas, run semantic queries, compress logs, and append REM updates to schema files. They do modify AGENTS.md (append CMS instructions) and write to workspace files — expected for this installer but worth noting because it changes workspace state.
Install Mechanism
No high-risk remote downloads or obscure URLs. The installer creates a venv and pip-installs lancedb, numpy, pyarrow, requests (PyPI), and SKILL.md suggests using 'ollama pull' to fetch models (standard Ollama behavior). All installs are local and traceable; the installer uses subprocess.run(shell=True) for convenience, which is normal for local installers but means you should inspect the script before running.
Credentials
No environment variables or external credentials are requested. Runtime network usage is limited to a local Ollama HTTP endpoint (http://localhost:11434) for embeddings and generation, and to standard package downloads (pip/ollama). The scripts do not attempt to exfiltrate data to remote endpoints.
Persistence & Privilege
The skill is not force-included (always:false) and runs only when invoked. It persists files under ~/.openclaw/workspace (creates memory/ and memory_brain/), copies scripts there, and appends to AGENTS.md — normal for an installer but it does alter workspace files and should be allowed only if you accept those changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install brain-cms
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /brain-cms 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release — neuroscience-inspired CMS for OpenClaw
元数据
Slug brain-cms
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Brain CMS 是什么?

Neuroscience-based multi-layer memory system for OpenClaw agents that improves context efficiency using semantic schemas, vector stores, and sleep cycle cons... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 637 次。

如何安装 Brain CMS?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install brain-cms」即可一键安装,无需额外配置。

Brain CMS 是免费的吗?

是的,Brain CMS 完全免费(开源免费),可自由下载、安装和使用。

Brain CMS 支持哪些平台?

Brain CMS 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Brain CMS?

由 Harreynish Gowtham(@harrey401)开发并维护,当前版本 v1.0.0。

💬 留言讨论