← 返回 Skills 市场
hongjiahao371-pixel

Cognitive Brain Deploy

作者 hongjiahao371-pixel · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
92
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cognitive-brain-deploy
功能描述
Cognitive Brain 语义记忆系统一键部署工具。当用户需要部署 OpenClaw 认知脑、部署 PostgreSQL+pgvector 向量数据库、安装 Cognitive Brain Skill、配置定时任务和 Hook 时使用。
使用说明 (SKILL.md)

Cognitive Brain Deploy

OpenClaw 语义记忆系统的自动化部署 Skill。

快速部署

执行一键部署脚本:

bash ~/.openclaw/workspace/skills/cognitive-brain-deploy/scripts/deploy.sh

或手动分步部署,详见 references/deploy-guide.md

部署检查清单

  • PostgreSQL 14+ with pgvector 安装完成
  • Redis 6+ 安装完成
  • cognitive_brain 数据库创建完成
  • 表结构初始化完成(memories + associations 表)
  • Cognitive Brain Skill 下载到 ~/.openclaw/workspace/skills/cognitive-brain
  • config.json 数据库密码配置正确
  • Cron 定时任务添加完成
  • Hook 启用完成

验证命令

部署完成后,执行以下命令验证:

# 健康检查
cd ~/.openclaw/workspace/skills/cognitive-brain && node scripts/recall.cjs health_check

# 测试写入
node scripts/encode.cjs --content "测试记忆" --metadata '{"type":"fact","importance":0.8}'

# 测试搜索
node scripts/recall.cjs --query "测试"

参考文档

安全使用建议
Before running this deploy script, review and adjust it rather than executing it blindly. Specific suggestions: - Inspect scripts/deploy.sh line-by-line and do a manual, stepwise run instead of piping curl|bash into sudo. Avoid executing remote installers without auditing them. - Replace the hardcoded password (cog_brain_2024) with a randomly generated secret; store it safely (OS secret store or a credentials manager) and restrict DB-user privileges to the minimum required. - The guide references cloning a Cognitive Brain repo but provides no URL — obtain the canonical repository URL from a trusted source and review its contents before npm install. - Run the deployment in a disposable VM or container first (not on a production host) to observe side effects (systemd changes, apt installs, crontab entries). - Verify extension dependencies (pgvector and any UUID function providers like pgcrypto) before running the SQL; the script assumes gen_random_uuid() exists. - Review and limit filesystem permissions of ~/.openclaw/workspace/skills and ~/.openclaw/hooks; ensure cron logs are stored securely. - If you prefer safer installs, manually install packages (node/postgres/redis) from distribution packages or well-known package repos instead of using curl|bash. If you want to proceed but reduce risk, perform the steps in the referenced docs manually rather than running the full one-click script, and confirm every external network action and the Cognitive Brain repo contents first.
功能分析
Type: OpenClaw Skill Name: cognitive-brain-deploy Version: 1.0.0 The skill performs high-privilege system modifications, including installing packages via sudo, modifying the user's crontab for persistence, and hardcoding database credentials ('cog_brain_2024') in scripts/deploy.sh. While these actions are consistent with the stated goal of deploying a database-backed memory system, the use of 'curl | bash' for Node.js installation and the broad system-level changes represent significant security risks that warrant caution when executed by an automated agent.
能力评估
Purpose & Capability
Name/description match what the files do: the script and docs install PostgreSQL+pgvector, Redis, Node, create DB/tables, write config.json, and set cron jobs and hooks. The requested actions are expected for a deployment helper.
Instruction Scope
SKILL.md directs running the included deploy.sh which performs system-wide actions (apt installs, systemctl enable/start, DB setup, crontab modification). Those actions align with the stated deploy purpose, but the script also hardcodes a database password and echoes it, and the guide instructs cloning an external 'Cognitive Brain' repo but provides no repository URL — leaving a gap that requires user-supplied network operations.
Install Mechanism
There is no separate install spec; the provided script performs runtime network installs including curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash and apt install. Executing a remote install script (curl|bash) is a high-risk pattern because arbitrary code is executed from the network at runtime. The script will write files and enable services on the host.
Credentials
The skill declares no required env vars, which is consistent, but the script hardcodes a weak DB password ('cog_brain_2024'), writes that credential into config.json in plaintext, and grants broad DB privileges. Storing and printing a default credential is disproportionate and increases risk if you run this on a multi-user or production host.
Persistence & Privilege
The script requires sudo, enables and starts system services, and writes cron jobs that will autonomously run code from the skill directory. always:false (normal). This level of system modification is expected for a deploy script, but cron jobs executing future code from a skill directory are a persistent execution risk if that code is later changed or comes from an untrusted source.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cognitive-brain-deploy
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cognitive-brain-deploy 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
首次发布:OpenClaw 语义记忆系统一键部署
元数据
Slug cognitive-brain-deploy
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cognitive Brain Deploy 是什么?

Cognitive Brain 语义记忆系统一键部署工具。当用户需要部署 OpenClaw 认知脑、部署 PostgreSQL+pgvector 向量数据库、安装 Cognitive Brain Skill、配置定时任务和 Hook 时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 92 次。

如何安装 Cognitive Brain Deploy?

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

Cognitive Brain Deploy 是免费的吗?

是的,Cognitive Brain Deploy 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cognitive Brain Deploy 支持哪些平台?

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

谁开发了 Cognitive Brain Deploy?

由 hongjiahao371-pixel(@hongjiahao371-pixel)开发并维护,当前版本 v1.0.0。

💬 留言讨论