← 返回
未分类 中文

OpenClaw Deploy Guide

Interactive deployment guide for OpenClaw local capabilities. Walks through installing the Memory Stack (qmd + LosslessClaw), vid2md, WeChat plugin, and main...
交互式部署指南,帮助在本地使用 OpenClaw。逐步指导安装 Memory Stack(qmd + LosslessClaw)、vid2md、微信插件以及主程序……
ottoprua ottoprua 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 266
下载
💾 0
安装
1
版本
#latest

概述

OpenClaw Capabilities Deployment Guide

> Interactive protocol. This skill checks prerequisites, installs each component, verifies success, and pauses for your confirmation before moving to the next phase. You can stop at any phase and resume later.


Before Starting

Run session_status to confirm the current context, then ask the user:

> "Which components do you want to deploy? I'll check prerequisites for all of them and then walk through each one.

>

> Available components:

> - [A] Memory Stack — qmd (semantic search) + LosslessClaw (context compression)

> - [B] Memory Manager Skill — agent memory protocol (clawhub install)

> - [C] vid2md — video → structured Markdown converter

> - [D] WeChat Plugin — WeChat group chat integration

> - [E] Cron Jobs — automated memory maintenance

>

> Reply with the letters you want (e.g. A B E), or all to deploy everything."

Wait for confirmation before proceeding.


Phase 0 — Prerequisites Check

Run these checks for all selected components. Report status in a table before proceeding.

# Core tools
which git && git --version
which python3 && python3 --version
which brew && brew --version
which ffmpeg && ffmpeg -version 2>&1 | head -1
which ollama && ollama --version

# OpenClaw
openclaw --version

# Node / bun (for qmd)
which node && node --version
which bun && bun --version
which npm && npm --version

Report as a table:

ToolStatusVersion
-----------------------
git✅/❌...
python3✅/❌...
brew✅/❌...
ffmpeg✅/❌...
ollama✅/❌...
openclaw✅/❌...
bun/node✅/❌...

If any required tool is missing, tell the user what to install and wait for confirmation before continuing:

  • brew: https://brew.sh
  • ffmpeg: brew install ffmpeg
  • ollama: https://ollama.com
  • bun: curl -fsSL https://bun.sh/install | bash

Phase A — Memory Stack

A1: Install qmd

# Check if already installed
which qmd && qmd --version

If not installed:

bun install -g @tobilu/qmd
# or: npm install -g @tobilu/qmd

Verify:

qmd --version
qmd status

A2: Create memory collections

Ask the user for their workspace path:

> "What is your OpenClaw workspace path? (default: ~/.openclaw/workspace)"

Wait for answer, then substitute below:

# Check existing collections
qmd collection list

Only add collections that don't already exist:

# Memory collection
qmd collection add memory-root <WORKSPACE>/memory --pattern "**/*.md"

# Blackboard collection
qmd collection add blackboard <WORKSPACE>/blackboard --pattern "**/*.md"

# Initial index build
qmd update
qmd status

Verify by running a test search:

qmd vsearch "project status" -c blackboard 2>/dev/null | head -5

A3: Configure openclaw.json

Check if qmd is already configured:

cat ~/.openclaw/openclaw.json | python3 -c "
import sys, json; d=json.load(sys.stdin)
print('already configured' if d.get('memory',{}).get('backend') == 'qmd' else 'not configured')
"

If not configured, show the user this config block to add to openclaw.json:

// Add to ~/.openclaw/openclaw.json
{
  "memory": {
    "backend": "qmd",
    "qmd": {
      "command": "<path-from: which qmd>",
      "searchMode": "vsearch",
      "includeDefaultMemory": true,
      "update": {
        "interval": "5m",
        "onBoot": true,
        "waitForBootSync": false
      },
      "limits": {
        "maxResults": 10,
        "maxSnippetChars": 500
      },
      "scope": { "default": "allow" }
    }
  }
}

Get the qmd path:

which qmd

Then tell the user:

> "Add the above block to ~/.openclaw/openclaw.json. Use the path for the command field. Tell me when done."

Wait for confirmation.

A4: Install LosslessClaw

Check if already installed:

cat ~/.openclaw/openclaw.json | python3 -c "
import sys, json; d=json.load(sys.stdin)
installed = d.get('plugins',{}).get('installs',{}).get('lossless-claw')
print('installed:', installed.get('version') if installed else 'not found')
"

If not installed:

openclaw plugins install @martian-engineering/lossless-claw

Show the user this config block to add under plugins.entries:

{
  "plugins": {
    "allow": ["lossless-claw"],
    "entries": {
      "lossless-claw": {
        "enabled": true,
        "config": {
          "summaryProvider": "anthropic",
          "summaryModel": "claude-haiku-4-5",
          "freshTailCount": 32,
          "contextThreshold": 0.75,
          "ignoreSessionPatterns": ["agent:*:cron:**"],
          "incrementalMaxDepth": 10
        }
      }
    }
  }
}

Ask: "Which model should be used for summarization? (default: claude-haiku-4-5 — cheap and fast; alternatives: google/gemini-3-flash-preview, openai/gpt-4o-mini)"

Wait for answer, substitute into config, then:

openclaw gateway restart

✅ Phase A complete. Confirm with user before Phase B.


Phase B — Memory Manager Skill

B1: Install via ClawHub

# Check if already installed
ls ~/.openclaw/workspace/skills/memory-manager/SKILL.md 2>/dev/null && echo "already installed"

If not installed:

cd ~/.openclaw/workspace
clawhub install agent-memory-protocol

B2: Verify SKILL.md is accessible

head -5 ~/.openclaw/workspace/skills/memory-manager/SKILL.md

B3: Initialize memory directory structure

Check if memory structure exists:

ls ~/.openclaw/workspace/memory/ 2>/dev/null | head -10

If MEMORY.md or memory/ doesn't exist, create the skeleton:

mkdir -p ~/.openclaw/workspace/memory/user/preferences
mkdir -p ~/.openclaw/workspace/memory/user/entities
mkdir -p ~/.openclaw/workspace/memory/user/events
mkdir -p ~/.openclaw/workspace/memory/agent/cases
mkdir -p ~/.openclaw/workspace/memory/agent/patterns
mkdir -p ~/.openclaw/workspace/memory/archive

# Create L0 index stub if missing
if [ ! -f ~/.openclaw/workspace/MEMORY.md ]; then
cat > ~/.openclaw/workspace/MEMORY.md << 'EOF'
# Memory Index (L0)
> Full contents in memory/INDEX.md; this file holds high-frequency entry points only.

## User
- Profile → memory/user/profile.md
- Preferences → memory/user/preferences/

## Agent
- Cases → memory/agent/cases/
- Patterns → memory/agent/patterns/
EOF
fi

✅ Phase B complete. Confirm with user before Phase C.


Phase C — vid2md

C1: Check / clone repository

Ask: "Where should vid2md be installed? (default: ~/Projects/vid2md)"

Wait for answer, substitute as .

# Check if already exists
ls <VID2MD_DIR>/vid2md.py 2>/dev/null && echo "already exists"

If not exists:

mkdir -p "$(dirname <VID2MD_DIR>)"
git clone https://github.com/OttoPrua/vid2md.git <VID2MD_DIR>

C2: Install Python dependencies

cd <VID2MD_DIR>
pip3 install -r requirements.txt

For Apple Silicon Macs, also install:

pip3 install mlx-whisper

For Linux / CUDA:

pip3 install faster-whisper

C3: Download transcription models

Ask: "Will you primarily process Chinese or English videos? (zh/en/both)"

If zh or both:

# FunASR model (downloads on first run, ~300 MB)
MODELSCOPE_CACHE=/tmp/ms_models python3 -c "
from funasr import AutoModel
AutoModel(model='paraformer-zh', model_revision='v2.0.4')
print('FunASR model ready')
"

If en or both (Apple Silicon):

python3 -c "import mlx_whisper; print('mlx-whisper ready')"

C4: Configure wechat-ocr (optional, macOS only)

Ask: "Do you have wechat-ocr available? (y/n — skip if unsure, falls back to macOS Vision)"

If yes, ask for the path and set:

export WECHAT_OCR_BIN=/path/to/wechat-ocr
# Add to ~/.zshrc or ~/.bashrc:
echo 'export WECHAT_OCR_BIN=/path/to/wechat-ocr' >> ~/.zshrc

C5: Download VLM for frame descriptions (optional)

Ask: "Install AI frame descriptions? Requires Ollama + ~5 GB. (y/n)"

If yes:

ollama pull qwen2.5vl:7b

C6: Test run

cd <VID2MD_DIR>
python3 vid2md.py --help

Run a quick smoke test on a short public video:

python3 vid2md.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
  --lang en --no-ocr --no-desc --interval 60

Check output exists:

ls output/*/tutorial.md 2>/dev/null && echo "✅ vid2md working"

✅ Phase C complete. Confirm with user before Phase D.


Phase D — WeChat Plugin

> ⚠️ macOS only. Requires WeChat desktop app installed and logged in.

D1: Prerequisites

# Check WeChat is installed
ls /Applications/WeChat.app 2>/dev/null && echo "WeChat found"

# Check Peekaboo
which peekaboo || brew install peekaboo

# Check accessibility permission
osascript -e 'tell application "System Events" to return name of first process whose frontmost is true' 2>/dev/null \
  && echo "accessibility: OK" || echo "accessibility: NEEDS PERMISSION"

If accessibility not granted:

> "Please grant Terminal (or whichever app runs OpenClaw) accessibility permission in:

> System Settings → Privacy & Security → Accessibility"

D2: Clone and install

Ask: "Where should the WeChat plugin be installed? (default: ~/.openclaw/workspace/plugins/openclaw-wechat-plugin)"

PLUGIN_DIR=~/.openclaw/workspace/plugins/openclaw-wechat-plugin

git clone https://github.com/OttoPrua/openclaw-wechat-bot.git "$PLUGIN_DIR"
cd "$PLUGIN_DIR"
npm install

D3: Configure openclaw.json

Ask the user for:

  • Agent ID to use (e.g. main, or a custom agent like rossi)
  • Allowed group names (comma-separated)

Show config block:

{
  "plugins": {
    "allow": ["wechat"],
    "load": {
      "paths": ["~/.openclaw/workspace/plugins/openclaw-wechat-plugin"]
    },
    "entries": {
      "wechat": {
        "enabled": true
      }
    }
  },
  "channels": {
    "wechat": {
      "enabled": true,
      "groupOnly": true,
      "botName": "<your-bot-name>",
      "botTrigger": "&bot",
      "agent": "<agent-id>",
      "allowedGroups": ["<group-name>"],
      "rateLimitPerMinute": 20,
      "dailyTokenBudget": 50000
    }
  }
}

Tell user: "Fill in your bot name, agent ID, and allowed group names, then add to openclaw.json. Tell me when done."

Wait for confirmation.

D4: Configure WeChat

1. Open WeChat on macOS
2. Settings → General → confirm send shortcut is Enter
3. System Settings → Notifications → WeChat → Allow Notifications → Style: Persistent
4. Keep WeChat running in background (not foreground) when testing

D5: Restart and test

openclaw gateway restart

> "To test: go to one of your allowed WeChat groups and send:

> &bot hello

> The bot should reply within ~10 seconds."

✅ Phase D complete. Confirm with user before Phase E.


Phase E — Maintenance Cron Jobs

E1: Check existing jobs

openclaw cron list

E2: Ask which jobs to add

> "Which cron jobs do you want to add? (skip any already listed above)

>

> - [1] Dream Cycle — Weekly memory consolidation (Sunday 08:00)

> - [2] Daily Progress Sync — Sync project progress to Blackboard daily (04:00)

> - [3] Monthly Cleanup — Archive old session logs (1st of month, 03:00)"

Wait for answer. Ask: "What timezone? (e.g. Asia/Shanghai, America/New_York, Europe/London)"

E3: Add selected jobs

For job [1] Dream Cycle:

openclaw cron add \
  --name "Dream Cycle (Memory Consolidation)" \
  --cron "0 8 * * 0" \
  --tz "<TIMEZONE>" \
  --session isolated \
  --message "Run memory consolidation: scan memory/ root for dated session log files, refine each into a ≤30-line structured summary, move originals to memory/archive/YYYY-MM/, deduplicate patterns/." \
  --announce

For job [2] Daily Progress Sync:

openclaw cron add \
  --name "Daily Progress Sync" \
  --cron "0 4 * * *" \
  --tz "<TIMEZONE>" \
  --session isolated \
  --message "Read blackboard/REGISTRY.md and yesterday's calendar events. Update Blackboard project cards with any progress changes." \
  --announce

For job [3] Monthly Cleanup:

openclaw cron add \
  --name "Monthly Session Cleanup" \
  --cron "0 3 1 * *" \
  --tz "<TIMEZONE>" \
  --session isolated \
  --message "Archive memory/ root session log files (YYYY-MM-DD.md format) older than 7 days to memory/archive/YYYY-MM/. Create the archive folder if it does not exist." \
  --announce

E4: Verify

openclaw cron list

Show a summary table of all registered jobs.

✅ Phase E complete.


Final Verification

After all selected phases are complete:

# Memory stack
qmd status
qmd vsearch "test" 2>/dev/null | head -3

# OpenClaw gateway
openclaw gateway status

# Cron jobs
openclaw cron list

# vid2md (if installed)
python3 <VID2MD_DIR>/vid2md.py --help 2>/dev/null | head -3

Report final status table:

ComponentStatus
-------------------
qmd index✅/❌
LosslessClaw✅/❌
Memory Manager skill✅/❌
vid2md✅/❌
WeChat plugin✅/❌
Cron jobsN registered

References

RepoLink
------------
Memory Architecturehttps://github.com/OttoPrua/openclaw-memory-manager
vid2mdhttps://github.com/OttoPrua/vid2md
WeChat Pluginhttps://github.com/OttoPrua/openclaw-wechat-bot
Memory Manager Skillhttps://clawhub.ai/OttoPrua/agent-memory-protocol
OpenClawhttps://github.com/openclaw/openclaw

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 21:07 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 80 📥 182,941
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 686 📥 330,816
ai-agent

Agent Memory Protocol

ottoprua
智能体内存管理协议,对任何内存读取、写入或更新操作激活。定义六类写入规范、L0同步规则以及去重策略。
★ 0 📥 370