openclaw-admin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
!openclaw status --all 2>&1 | head -20
!openclaw status --all 2>&1 | head -20

OpenClaw Admin — Configure, Fix, Tune

OpenClaw 管理员指南 — 配置、修复、调优

You are an OpenClaw administrator. Apply configuration changes with discipline: verify → apply → verify → restart → test. Never skip verification — confident users make typos too.
你是一名OpenClaw管理员。请严谨地进行配置变更:验证 → 应用 → 验证 → 重启 → 测试。绝不要跳过验证环节——即便是自信的用户也会打错字。

When to Use This Skill

何时使用本技能

  • Config changes (
    openclaw config set
    )
  • Security fixes flagged by
    openclaw-doctor
    or
    openclaw security audit
  • Performance tuning (models, concurrency, pruning, memory)
  • Troubleshooting stopped messages, channel errors, API issues
  • openclaw doctor --fix
    for automated repairs
  • 配置变更(
    openclaw config set
  • openclaw-doctor
    openclaw security audit
    检测到的安全修复需求
  • 性能调优(模型、并发、剪枝、内存)
  • 排查消息中断、通道错误、API问题
  • 使用
    openclaw doctor --fix
    进行自动修复

Diagnostic Triage

诊断排查流程

Always start here before changing anything:
bash
openclaw status --all              # health snapshot
openclaw gateway status            # service running?
openclaw channels status --probe   # channel health
Then target:
  • Config →
    openclaw doctor
  • Channels →
    openclaw channels status --probe
  • Sessions →
    openclaw sessions --active 120
  • Memory →
    openclaw memory status --deep
  • Logs →
    openclaw logs --follow
Common error patterns:
ErrorLikely CauseFix
permissionDenied
Full Disk Access (macOS)System Settings → Privacy
Cannot find module
Missing dependency
npm install -g <pkg>
Address already in use
Port conflict
openclaw gateway status --force
No API key found
Missing credentials
openclaw models status --probe
在进行任何变更前,请先执行以下步骤:
bash
openclaw status --all              # 健康状态快照
openclaw gateway status            # 服务是否运行?
openclaw channels status --probe   # 通道健康检查
然后针对性排查:
  • 配置 →
    openclaw doctor
  • 通道 →
    openclaw channels status --probe
  • 会话 →
    openclaw sessions --active 120
  • 内存 →
    openclaw memory status --deep
  • 日志 →
    openclaw logs --follow
常见错误模式:
错误可能原因修复方案
permissionDenied
macOS完全磁盘权限问题系统设置 → 隐私与安全性
Cannot find module
依赖缺失
npm install -g <pkg>
Address already in use
端口冲突
openclaw gateway status --force
No API key found
凭证缺失
openclaw models status --probe

Change Discipline

变更规范

Every config change follows this workflow:
1. openclaw config get <path>          # verify current value
2. openclaw config set <path> <value>  # apply change
3. openclaw config get <path>          # verify it applied
4. openclaw gateway restart            # if restart required (see references/restart-matrix.md)
5. openclaw status --all               # test it works
每一项配置变更都需遵循以下流程:
1. openclaw config get <path>          # 验证当前值
2. openclaw config set <path> <value>  # 应用变更
3. openclaw config get <path>          # 验证变更已生效
4. openclaw gateway restart            # 若需要重启(参考references/restart-matrix.md)
5. openclaw status --all               # 测试功能正常

Batching vs Isolation

批量变更 vs 单独变更

Batch (apply multiple → verify all → restart → test):
  • Interdependent settings (memory flush + reserve tokens + compaction)
  • Low-risk settings (timeouts, concurrency)
  • User explicitly requests batch
Isolate (apply one → verify → test → next):
  • First time enabling a feature
  • High-impact changes (channels, auth, models)
  • Debugging why a change doesn't work
Default: When in doubt, isolate.
Example batch grouping:
Group 1 — Memory system (interdependent):
  memoryFlush, reserveTokensFloor, memorySearch
  → Apply all → Verify all → Restart → Test

Group 2 — Context optimization (interdependent):
  pruning mode, TTL, keepLastAssistants
  → Apply all → Verify all → Test (no restart needed)

Group 3 — Performance (independent):
  heartbeat, concurrency, logging
  → Apply all → Verify all → Restart → Test
批量变更(应用多项 → 全部验证 → 重启 → 测试):
  • 相互依赖的设置(内存刷新 + 预留令牌 + 压缩)
  • 低风险设置(超时时间、并发数)
  • 用户明确要求批量操作
单独变更(应用一项 → 验证 → 测试 → 下一项):
  • 首次启用某功能
  • 高影响变更(通道、认证、模型)
  • 调试变更无效的原因
默认规则: 不确定时,优先单独变更。
批量分组示例:
分组1 — 内存系统(相互依赖):
  memoryFlush, reserveTokensFloor, memorySearch
  → 全部应用 → 全部验证 → 重启 → 测试

分组2 — 上下文优化(相互依赖):
  pruning mode, TTL, keepLastAssistants
  → 全部应用 → 全部验证 → 测试(无需重启)

分组3 — 性能设置(独立):
  heartbeat, concurrency, logging
  → 全部应用 → 全部验证 → 重启 → 测试

Common Admin Tasks

常见管理员任务

Enable Memory System

启用内存系统

bash
openclaw config set agents.defaults.compaction.memoryFlush.enabled true
openclaw config set agents.defaults.compaction.memoryFlush.softThresholdTokens 6000
openclaw config set agents.defaults.compaction.reserveTokensFloor 24000
openclaw config get agents.defaults.compaction
bash
openclaw config set agents.defaults.compaction.memoryFlush.enabled true
openclaw config set agents.defaults.compaction.memoryFlush.softThresholdTokens 6000
openclaw config set agents.defaults.compaction.reserveTokensFloor 24000
openclaw config get agents.defaults.compaction

Optional: local vector search

可选:本地向量搜索

openclaw config set agents.defaults.memorySearch.provider "local" openclaw config set agents.defaults.memorySearch.local.modelPath "hf:ggml-org/embeddinggemma-300M-GGUF/embeddinggemma-300M-Q8_0.gguf"
undefined
openclaw config set agents.defaults.memorySearch.provider "local" openclaw config set agents.defaults.memorySearch.local.modelPath "hf:ggml-org/embeddinggemma-300M-GGUF/embeddinggemma-300M-Q8_0.gguf"
undefined

Enable Context Pruning

启用上下文剪枝

bash
openclaw config set agents.defaults.contextPruning.mode "adaptive"
openclaw config set agents.defaults.contextPruning.keepLastAssistants 5
openclaw config get agents.defaults.contextPruning
bash
openclaw config set agents.defaults.contextPruning.mode "adaptive"
openclaw config set agents.defaults.contextPruning.keepLastAssistants 5
openclaw config get agents.defaults.contextPruning

Security Hardening

安全加固

bash
openclaw security audit --deep          # find issues
openclaw security audit --fix           # auto-fix what it can
chmod 600 ~/.openclaw/openclaw.json     # if flagged
chmod 600 ~/.openclaw/auth-profiles.json
chmod 700 ~/.openclaw/credentials/ 2>/dev/null
chmod 700 ~/.openclaw/state/ 2>/dev/null
bash
openclaw security audit --deep          # 查找问题
openclaw security audit --fix           # 自动修复可处理的问题
chmod 600 ~/.openclaw/openclaw.json     # 若被标记为问题
chmod 600 ~/.openclaw/auth-profiles.json
chmod 700 ~/.openclaw/credentials/ 2>/dev/null
chmod 700 ~/.openclaw/state/ 2>/dev/null

Automated Repairs

自动修复

bash
openclaw doctor          # diagnose + suggest
openclaw doctor --fix    # apply safe auto-fixes
bash
openclaw doctor          # 诊断并给出建议
openclaw doctor --fix    # 应用安全的自动修复

Optimization Quick Reference

优化速查表

GoalSettingValue
Reduce API costs
contextPruning.mode
adaptive
subagents.model
anthropic/claude-haiku-3-5
Keep cache warm
heartbeat.interval
Less than pruning TTL
Preserve context
memoryFlush.softThresholdTokens
6000
reserveTokensFloor
24000
Faster responses
maxConcurrent
4
(default)
subagents.maxConcurrent
8
目标设置项推荐值
降低API成本
contextPruning.mode
adaptive
subagents.model
anthropic/claude-haiku-3-5
保持缓存温热
heartbeat.interval
小于剪枝TTL
保留上下文
memoryFlush.softThresholdTokens
6000
reserveTokensFloor
24000
更快响应速度
maxConcurrent
4
(默认值)
subagents.maxConcurrent
8

Authority & Time Pressure

权限与时间压力

When a user says "just apply it" — still verify. Verification catches typos, not intent.
When a user says "ASAP" — batch smartly, verify each batch. 3-4 minutes with discipline beats 2 minutes + 20-minute debug session.
当用户说“直接应用”时——仍需验证。验证能捕获打字错误,而非否定用户意图。
当用户说“尽快处理”时——合理批量操作,验证每一批变更。严谨操作的3-4分钟,胜过匆忙操作的2分钟加上20分钟的调试时间。

Red Flags — Stop and Verify

危险信号 — 停止并验证

If you catch yourself thinking:
  • "User is confident, skip verification"
  • "Simple change, no need to test"
  • "Gateway auto-applies, no restart needed"
  • "They'll notice if it doesn't work"
Verify anyway. Test the change.
如果你产生以下想法:
  • “用户很自信,跳过验证吧”
  • “简单变更,无需测试”
  • “网关会自动应用,无需重启”
  • “如果有问题他们会发现的”
无论如何都要验证。测试变更效果。

References

参考资料

  • references/config-paths.md
    — Full config dot-path catalog
  • references/restart-matrix.md
    — Which changes need restart
  • references/config-paths.md
    — 完整配置点路径目录
  • references/restart-matrix.md
    — 哪些变更需要重启

Related Skills

相关技能

  • openclaw-doctor
    — Run a read-only 10-domain audit to identify issues before fixing
  • openclaw-maintain
    — Daemon ops, updates, log rotation, cron management
  • openclaw-extend
    — Add plugins, channels, nodes, webhooks
  • openclaw-doctor
    — 运行只读的10域审计,在修复前识别问题
  • openclaw-maintain
    — 守护进程运维、更新、日志轮转、定时任务管理
  • openclaw-extend
    — 添加插件、通道、节点、Webhook

Bottom Line

核心原则

Configuration is code. Test changes like code changes. Verify → Apply → Verify → Restart → Test. Skip nothing.
配置即代码。像测试代码变更一样测试配置变更。 验证 → 应用 → 验证 → 重启 → 测试。绝不跳过任何步骤。