grix-connector 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +149 -0
- package/dist/adapter/acp/acp-adapter.js +13 -0
- package/dist/adapter/acp/index.js +1 -0
- package/dist/adapter/acp/usage-parser.js +1 -0
- package/dist/adapter/claude/activity-status-manager.js +1 -0
- package/dist/adapter/claude/channel-notification.js +1 -0
- package/dist/adapter/claude/claude-adapter.js +15 -0
- package/dist/adapter/claude/claude-bridge-server.js +1 -0
- package/dist/adapter/claude/claude-tools.js +1 -0
- package/dist/adapter/claude/claude-worker-client.js +1 -0
- package/dist/adapter/claude/index.js +1 -0
- package/dist/adapter/claude/interaction-protocol.js +1 -0
- package/dist/adapter/claude/mcp-http-launcher.js +2 -0
- package/dist/adapter/claude/model-list.js +1 -0
- package/dist/adapter/claude/protocol-contract.js +1 -0
- package/dist/adapter/claude/result-timeout.js +1 -0
- package/dist/adapter/claude/skill-scanner.js +2 -0
- package/dist/adapter/claude/usage-parser.js +3 -0
- package/dist/adapter/codewhale/codewhale-adapter.js +6 -0
- package/dist/adapter/codewhale/index.js +1 -0
- package/dist/adapter/codex/codex-bridge.js +10 -0
- package/dist/adapter/codex/codex-trust.js +8 -0
- package/dist/adapter/codex/index.js +1 -0
- package/dist/adapter/codex/usage-parser.js +1 -0
- package/dist/adapter/cursor/cursor-adapter.js +8 -0
- package/dist/adapter/cursor/index.js +1 -0
- package/dist/adapter/deepseek/deepseek-adapter.js +6 -0
- package/dist/adapter/deepseek/index.js +1 -0
- package/dist/adapter/index.js +1 -0
- package/dist/adapter/opencode/index.js +1 -0
- package/dist/adapter/opencode/opencode-adapter.js +8 -0
- package/dist/adapter/opencode/opencode-transport.js +5 -0
- package/dist/adapter/opencode/opencode-types.js +0 -0
- package/dist/adapter/openhuman/index.js +1 -0
- package/dist/adapter/openhuman/openhuman-adapter.js +7 -0
- package/dist/adapter/openhuman/openhuman-transport.js +1 -0
- package/dist/adapter/openhuman/openhuman-types.js +0 -0
- package/dist/adapter/pi/index.js +1 -0
- package/dist/adapter/pi/pi-adapter.js +10 -0
- package/dist/adapter/pi/pi-transport.js +4 -0
- package/dist/adapter/pi/pi-types.js +0 -0
- package/dist/adapter/pi/usage-parser.js +1 -0
- package/dist/adapter/qwen/index.js +1 -0
- package/dist/adapter/qwen/qwen-adapter.js +4 -0
- package/dist/adapter/types.js +1 -0
- package/dist/agent/index.js +1 -0
- package/dist/agent/process.js +2 -0
- package/dist/aibot/client.js +1 -0
- package/dist/aibot/index.js +1 -0
- package/dist/aibot/types.js +0 -0
- package/dist/bridge/adapter-pool.js +1 -0
- package/dist/bridge/bridge.js +10 -0
- package/dist/bridge/deferred-events.js +1 -0
- package/dist/bridge/event-queue.js +1 -0
- package/dist/bridge/index.js +1 -0
- package/dist/bridge/respawn-manager.js +1 -0
- package/dist/bridge/revoke-handler.js +1 -0
- package/dist/bridge/runtime-config.js +1 -0
- package/dist/bridge/send-controller.js +1 -0
- package/dist/bridge/session-controller.js +9 -0
- package/dist/bridge/tool-card-utils.js +1 -0
- package/dist/core/access/allowlist-gate.js +1 -0
- package/dist/core/access/allowlist-store.js +1 -0
- package/dist/core/access/index.js +1 -0
- package/dist/core/aibot/client.js +1 -0
- package/dist/core/aibot/connection-handle.js +1 -0
- package/dist/core/aibot/connection-manager.js +1 -0
- package/dist/core/aibot/event-lifecycle-types.js +0 -0
- package/dist/core/aibot/index.js +1 -0
- package/dist/core/aibot/types.js +0 -0
- package/dist/core/config/index.js +1 -0
- package/dist/core/config/paths.js +1 -0
- package/dist/core/context/channel-context-resolution.js +1 -0
- package/dist/core/context/channel-context-store.js +1 -0
- package/dist/core/context/index.js +1 -0
- package/dist/core/context/transcript-channel-context.js +1 -0
- package/dist/core/file-ops/handler.js +1 -0
- package/dist/core/file-ops/list-files.js +1 -0
- package/dist/core/file-ops/types.js +0 -0
- package/dist/core/files/create-folder.js +1 -0
- package/dist/core/files/index.js +1 -0
- package/dist/core/files/list-files.js +1 -0
- package/dist/core/files/list-handler.js +1 -0
- package/dist/core/files/types.js +0 -0
- package/dist/core/files/utils.js +1 -0
- package/dist/core/hooks/hook-signal-store.js +2 -0
- package/dist/core/hooks/index.js +1 -0
- package/dist/core/log/bridge-event-log.js +2 -0
- package/dist/core/log/conversation-log.js +3 -0
- package/dist/core/log/index.js +1 -0
- package/dist/core/log/logger.js +6 -0
- package/dist/core/log/packet-log.js +2 -0
- package/dist/core/log/rotation.js +2 -0
- package/dist/core/mcp/event-tool-executor.js +1 -0
- package/dist/core/mcp/index.js +1 -0
- package/dist/core/mcp/internal-api-server.js +1 -0
- package/dist/core/mcp/tool-schemas.js +1 -0
- package/dist/core/mcp/tools.js +1 -0
- package/dist/core/persistence/active-event-store.js +1 -0
- package/dist/core/persistence/agent-global-config-store.js +1 -0
- package/dist/core/persistence/elicitation-store.js +1 -0
- package/dist/core/persistence/event-results-store.js +1 -0
- package/dist/core/persistence/permission-store.js +1 -0
- package/dist/core/persistence/question-store.js +1 -0
- package/dist/core/persistence/session-binding-store.js +1 -0
- package/dist/core/protocol/agent-api-media.js +1 -0
- package/dist/core/protocol/attachment-file.js +1 -0
- package/dist/core/protocol/index.js +1 -0
- package/dist/core/protocol/interaction-parser.js +1 -0
- package/dist/core/protocol/message-metadata.js +2 -0
- package/dist/core/protocol/message-reference.js +2 -0
- package/dist/core/protocol/payload-parser.js +11 -0
- package/dist/core/protocol/protocol-descriptor.js +1 -0
- package/dist/core/protocol/protocol-text.js +1 -0
- package/dist/core/provider-quota/index.js +1 -0
- package/dist/core/provider-quota/kiro.js +1 -0
- package/dist/core/provider-quota/providers.js +1 -0
- package/dist/core/provider-quota/types.js +0 -0
- package/dist/core/runtime/health.js +1 -0
- package/dist/core/runtime/index.js +1 -0
- package/dist/core/runtime/pidfile.js +2 -0
- package/dist/core/runtime/spawn.js +1 -0
- package/dist/core/text-segmentation/index.js +1 -0
- package/dist/core/text-segmentation/safe-markdown-stream-segmenter.js +6 -0
- package/dist/core/transport/index.js +1 -0
- package/dist/core/transport/json-rpc.js +3 -0
- package/dist/core/upgrade/npm-upgrader.js +2 -0
- package/dist/core/upgrade/upgrade-checker.js +1 -0
- package/dist/core/util/client-version.js +1 -0
- package/dist/core/util/codex-output-policy.js +1 -0
- package/dist/core/util/event-buffer.js +1 -0
- package/dist/core/util/index.js +1 -0
- package/dist/core/util/json-file.js +2 -0
- package/dist/core/util/normalize-string.js +1 -0
- package/dist/core/util/quoted-message-stream.js +3 -0
- package/dist/grix.js +28 -0
- package/dist/index.js +1 -0
- package/dist/log.js +3 -0
- package/dist/main.js +31 -0
- package/dist/manager.js +1 -0
- package/dist/mcp/acp-mcp-server.js +5 -0
- package/dist/mcp/stdio/server.js +10 -0
- package/dist/mcp/stream-http/config.js +1 -0
- package/dist/mcp/stream-http/connection-binding.js +1 -0
- package/dist/mcp/stream-http/event-tool-executor.js +1 -0
- package/dist/mcp/stream-http/gateway.js +1 -0
- package/dist/mcp/stream-http/index.js +1 -0
- package/dist/mcp/stream-http/security.js +1 -0
- package/dist/mcp/stream-http/session-manager.js +1 -0
- package/dist/mcp/stream-http/tool-executor.js +1 -0
- package/dist/mcp/stream-http/tool-registry.js +1 -0
- package/dist/mcp/stream-http/tool-schemas.js +1 -0
- package/dist/protocol/acp-client.js +1 -0
- package/dist/protocol/event-mapper.js +5 -0
- package/dist/protocol/index.js +1 -0
- package/dist/runtime/daemon-lock.js +2 -0
- package/dist/runtime/service-state.js +2 -0
- package/dist/scripts/approve-plan-hook.js +2 -0
- package/dist/scripts/elicitation-hook.js +6 -0
- package/dist/scripts/lib/read-stdin.js +1 -0
- package/dist/scripts/lifecycle-hook.js +2 -0
- package/dist/scripts/notification-hook.js +4 -0
- package/dist/scripts/permission-hook.js +5 -0
- package/dist/scripts/status-line-forwarder.js +2 -0
- package/dist/scripts/user-prompt-submit-hook.js +2 -0
- package/dist/service/platform-adapter.js +45 -0
- package/dist/service/process-control.js +1 -0
- package/dist/service/service-install-store.js +1 -0
- package/dist/service/service-manager.js +1 -0
- package/dist/service/service-paths.js +1 -0
- package/dist/session/index.js +1 -0
- package/dist/session/manager.js +1 -0
- package/dist/transport/index.js +1 -0
- package/dist/transport/json-rpc.js +3 -0
- package/dist/types/events.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/protocol.js +0 -0
- package/dist/types/session-state.js +0 -0
- package/dist/types/usage.js +0 -0
- package/openclaw-plugin/index.js +11271 -0
- package/openclaw-plugin/skills/grix-admin/SKILL.md +202 -0
- package/openclaw-plugin/skills/grix-admin/references/api-contract.md +210 -0
- package/openclaw-plugin/skills/grix-egg/SKILL.md +81 -0
- package/openclaw-plugin/skills/grix-egg/references/api-contract.md +40 -0
- package/openclaw-plugin/skills/grix-group/SKILL.md +164 -0
- package/openclaw-plugin/skills/grix-group/references/api-contract.md +97 -0
- package/openclaw-plugin/skills/grix-query/SKILL.md +247 -0
- package/openclaw-plugin/skills/grix-register/SKILL.md +86 -0
- package/openclaw-plugin/skills/grix-register/references/api-contract.md +76 -0
- package/openclaw-plugin/skills/grix-register/references/grix-concepts.md +26 -0
- package/openclaw-plugin/skills/grix-register/references/handoff-contract.md +24 -0
- package/openclaw-plugin/skills/grix-register/references/openclaw-setup.md +6 -0
- package/openclaw-plugin/skills/grix-register/references/user-replies.md +25 -0
- package/openclaw-plugin/skills/grix-register/scripts/grix_auth.ts +599 -0
- package/openclaw-plugin/skills/grix-update/SKILL.md +310 -0
- package/openclaw-plugin/skills/grix-update/references/cron-setup.md +56 -0
- package/openclaw-plugin/skills/grix-update/references/update-contract.md +149 -0
- package/openclaw-plugin/skills/message-send/SKILL.md +197 -0
- package/openclaw-plugin/skills/message-unsend/SKILL.md +186 -0
- package/openclaw-plugin/skills/message-unsend/flowchart.mermaid +27 -0
- package/openclaw-plugin/skills/openclaw-memory-setup/SKILL.md +282 -0
- package/openclaw-plugin/skills/openclaw-memory-setup/references/case-study-macpro.md +52 -0
- package/openclaw-plugin/skills/openclaw-memory-setup/references/host-readiness.md +147 -0
- package/openclaw-plugin/skills/openclaw-memory-setup/scripts/bench_ollama_embeddings.ts +326 -0
- package/openclaw-plugin/skills/openclaw-memory-setup/scripts/set_openclaw_memory_model.ts +385 -0
- package/openclaw-plugin/skills/openclaw-memory-setup/scripts/survey_host_readiness.ts +294 -0
- package/openclaw.plugin.json +24 -0
- package/package.json +114 -0
- package/scripts/install-guardian.mjs +30 -0
- package/scripts/install-guardian.sh +30 -0
- package/scripts/upgrade-guardian.sh +98 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: message-unsend
|
|
3
|
+
description: 静默回撤/撤回已发送的消息。支持当前会话回撤和跨会话回撤。执行完成后必须直接结束,不得回复任何确认文本。触发词:撤回、回撤、删除消息、unsend、recall。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 消息回撤技能
|
|
7
|
+
|
|
8
|
+
这个技能用于通过 OpenClaw 的 `message` 工具回撤已发送的消息。
|
|
9
|
+
|
|
10
|
+
## 完成契约(最高优先级)
|
|
11
|
+
|
|
12
|
+
只要进入这个技能,最终输出必须满足下面 4 条:
|
|
13
|
+
|
|
14
|
+
1. **优先执行回撤动作**:能定位目标消息时,先撤回目标消息
|
|
15
|
+
2. **撤回指令消息**:当前这条“撤回/回撤”指令本身也要一起撤回
|
|
16
|
+
3. **绝不发送确认文本**:不要发送“已撤回”“撤回成功”“处理完成”等任何消息
|
|
17
|
+
4. **最终只允许 `NO_REPLY`**:技能结束时直接返回 `NO_REPLY`
|
|
18
|
+
|
|
19
|
+
## 权限控制(严格)
|
|
20
|
+
|
|
21
|
+
**只有当前 agent 的 owner,或当前上下文里已明确可视为 owner 的授权操作者要求撤回消息时,才能执行此技能。**
|
|
22
|
+
|
|
23
|
+
### 允许执行的情况
|
|
24
|
+
|
|
25
|
+
- owner 在私聊中说“撤回 / 回撤 / 删除消息”
|
|
26
|
+
- owner 在群聊中说“撤回 / 回撤 / 删除消息”
|
|
27
|
+
- owner 或明确授权操作者引用消息要求撤回
|
|
28
|
+
|
|
29
|
+
### 禁止执行的情况
|
|
30
|
+
|
|
31
|
+
- 第三方用户要求撤回
|
|
32
|
+
- 请求者身份不明确,无法判断是否为 owner / 授权操作者
|
|
33
|
+
|
|
34
|
+
### 对其他人撤回请求的处理
|
|
35
|
+
|
|
36
|
+
完全忽略,不回复,不执行,直接 `NO_REPLY`。
|
|
37
|
+
|
|
38
|
+
## 核心行为:完全静默 + 双重撤回
|
|
39
|
+
|
|
40
|
+
当 owner 或明确授权操作者发送撤回指令时,必须按顺序执行:
|
|
41
|
+
|
|
42
|
+
1. 撤回目标消息
|
|
43
|
+
2. 撤回指令消息
|
|
44
|
+
3. 立即返回 `NO_REPLY`
|
|
45
|
+
|
|
46
|
+
不要发送任何确认、错误解释或补充说明。
|
|
47
|
+
|
|
48
|
+
## 两种回撤模式
|
|
49
|
+
|
|
50
|
+
### 1. 当前会话回撤
|
|
51
|
+
|
|
52
|
+
如果目标消息就在当前 Grix 会话中,必须给出 `messageId`;`sessionId` / `to` / `topic` 可以省略。
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"action": "unsend",
|
|
57
|
+
"channel": "grix",
|
|
58
|
+
"accountId": "{accountId}",
|
|
59
|
+
"messageId": "18889990099"
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 2. 跨会话回撤
|
|
64
|
+
|
|
65
|
+
如果目标消息不在当前会话中,优先使用 `sessionId` 指向目标会话。`to` 和 `topic` 只是兼容别名,不要作为主写法。
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"action": "unsend",
|
|
70
|
+
"channel": "grix",
|
|
71
|
+
"accountId": "{accountId}",
|
|
72
|
+
"messageId": "18889990099",
|
|
73
|
+
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 参数规则
|
|
78
|
+
|
|
79
|
+
1. `messageId` 必填,且必须是数字字符串
|
|
80
|
+
2. 当前 Grix 会话里,可以省略 `sessionId` / `to` / `topic`
|
|
81
|
+
3. 跨会话时,优先传准确 `sessionId`
|
|
82
|
+
4. `to` / `topic` 只是兼容别名;如果使用 `topic`,传裸 `session_id` 即可
|
|
83
|
+
5. 不要硬编码 `accountId=default`,始终使用当前准确账号 ID
|
|
84
|
+
|
|
85
|
+
## 使用场景
|
|
86
|
+
|
|
87
|
+
- 用户在当前对话中说“把刚才那条撤回”
|
|
88
|
+
- 需要静默清理自己刚发错的消息
|
|
89
|
+
- 需要跨会话回撤某条已知消息
|
|
90
|
+
|
|
91
|
+
## 实际调用示例
|
|
92
|
+
|
|
93
|
+
### 示例 1:当前会话回撤
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"action": "unsend",
|
|
98
|
+
"channel": "grix",
|
|
99
|
+
"accountId": "{accountId}",
|
|
100
|
+
"messageId": "2033329436849868800"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 示例 2:跨会话回撤
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"action": "unsend",
|
|
109
|
+
"channel": "grix",
|
|
110
|
+
"accountId": "{accountId}",
|
|
111
|
+
"messageId": "2033474284277993472",
|
|
112
|
+
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## 重要说明
|
|
117
|
+
|
|
118
|
+
1. Grix 渠道可以回撤 agent 和用户发送的消息
|
|
119
|
+
2. 跨会话时必须先拿到准确目标会话,不要传用户 ID、agent ID 或旧的其他渠道会话格式
|
|
120
|
+
3. `messageId` 可以从 inbound context、之前发送结果或消息记录中获取
|
|
121
|
+
4. 当前指令消息如果能定位,会一起被静默回撤
|
|
122
|
+
|
|
123
|
+
## 错误处理
|
|
124
|
+
|
|
125
|
+
常见错误只做内部判断,不要转成对用户的回复:
|
|
126
|
+
|
|
127
|
+
- `messageId` 不存在:直接 `NO_REPLY`
|
|
128
|
+
- 无法解析目标会话:直接 `NO_REPLY`
|
|
129
|
+
- 权限不足:直接 `NO_REPLY`
|
|
130
|
+
- 消息已删除:直接 `NO_REPLY`
|
|
131
|
+
|
|
132
|
+
## Grix 实测结果(2026-03-16 更新)
|
|
133
|
+
|
|
134
|
+
**状态**:可用
|
|
135
|
+
|
|
136
|
+
### 示例:撤回 agent 发送的消息
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"action": "unsend",
|
|
141
|
+
"channel": "grix",
|
|
142
|
+
"accountId": "primary",
|
|
143
|
+
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950",
|
|
144
|
+
"messageId": "2033371385615093760"
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
返回:
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"ok": true,
|
|
153
|
+
"deleted": true,
|
|
154
|
+
"unsent": true,
|
|
155
|
+
"messageId": "2033371385615093760",
|
|
156
|
+
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 示例:撤回用户发送的消息
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"action": "unsend",
|
|
165
|
+
"channel": "grix",
|
|
166
|
+
"accountId": "primary",
|
|
167
|
+
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950",
|
|
168
|
+
"messageId": "2033474284277993472"
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
返回:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"ok": true,
|
|
177
|
+
"deleted": true,
|
|
178
|
+
"unsent": true,
|
|
179
|
+
"messageId": "2033474284277993472",
|
|
180
|
+
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## 收尾要求
|
|
185
|
+
|
|
186
|
+
只要执行了这个技能,最后一行必须是 `NO_REPLY`。不要留下任何确认文本。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
```mermaid
|
|
2
|
+
flowchart TD
|
|
3
|
+
Start([收到撤回请求]) --> CheckSender{请求者是当前 agent 的 owner / 已授权操作者?}
|
|
4
|
+
CheckSender -->|否或不明确| End1[直接 NO_REPLY]
|
|
5
|
+
CheckSender -->|是| ResolveTarget{能定位目标消息?}
|
|
6
|
+
|
|
7
|
+
ResolveTarget -->|否| End2[直接 NO_REPLY]
|
|
8
|
+
ResolveTarget -->|是| PrepareTarget[准备目标消息参数<br/>action=unsend<br/>channel=grix<br/>accountId=current<br/>sessionId=目标会话或省略(当前会话)<br/>messageId=目标消息]
|
|
9
|
+
|
|
10
|
+
PrepareTarget --> UnsendTarget[执行目标消息撤回]
|
|
11
|
+
UnsendTarget --> TargetResult{成功或已删除?}
|
|
12
|
+
TargetResult -->|否| End3[直接 NO_REPLY]
|
|
13
|
+
TargetResult -->|是| PrepareCommand[准备指令消息参数<br/>action=unsend<br/>channel=grix<br/>accountId=current<br/>sessionId=当前会话(必要时解析)<br/>messageId=当前指令消息]
|
|
14
|
+
|
|
15
|
+
PrepareCommand --> UnsendCommand[执行指令消息撤回]
|
|
16
|
+
UnsendCommand --> End4[返回 NO_REPLY]
|
|
17
|
+
|
|
18
|
+
style Start fill:#e1f5e1
|
|
19
|
+
style End1 fill:#ffe1e1
|
|
20
|
+
style End2 fill:#ffe1e1
|
|
21
|
+
style End3 fill:#ffe1e1
|
|
22
|
+
style End4 fill:#e1f5e1
|
|
23
|
+
style CheckSender fill:#fff4e1
|
|
24
|
+
style ResolveTarget fill:#fff4e1
|
|
25
|
+
style UnsendTarget fill:#e1f0ff
|
|
26
|
+
style UnsendCommand fill:#e1f0ff
|
|
27
|
+
```
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openclaw-memory-setup
|
|
3
|
+
description: Configure OpenClaw memory on the target machine from either user-provided provider settings or a measured local-model choice. Use when Codex needs to apply direct memory parameters such as `provider=openai` or `provider=ollama`, compare local Ollama embedding models by real machine speed, update one or more OpenClaw profiles, rebuild indexes after a model change, or verify that memory is healthy on resource-constrained hosts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# OpenClaw Memory Setup
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Use this skill to either apply user-supplied memory provider settings directly or take a machine from readiness check through Ollama and OpenClaw installation, then choose a local embedding model by measurement and apply it to OpenClaw profiles safely.
|
|
11
|
+
|
|
12
|
+
Read [host-readiness.md](references/host-readiness.md) before working on a fresh machine.
|
|
13
|
+
|
|
14
|
+
## Request Handling
|
|
15
|
+
|
|
16
|
+
Start by sorting the request into one of these paths:
|
|
17
|
+
|
|
18
|
+
- Direct config path:
|
|
19
|
+
- use when the user already gives the target profiles, target model, provider choice, machine facts, or existing install state
|
|
20
|
+
- do not force a full readiness survey first
|
|
21
|
+
- Guided config path:
|
|
22
|
+
- use when the user has partial information and needs a few missing parameters filled in
|
|
23
|
+
- Fresh machine path:
|
|
24
|
+
- use when the user has not installed the stack yet or cannot tell what exists
|
|
25
|
+
|
|
26
|
+
Ask only for the minimum missing inputs when the user already knows what they want. Do not make them re-prove that `ollama` exists if they already supplied enough concrete parameters to proceed safely.
|
|
27
|
+
|
|
28
|
+
## Completion Standard
|
|
29
|
+
|
|
30
|
+
- Confirm the machine is supported and identify what is missing.
|
|
31
|
+
- If the chosen path uses local Ollama memory, install or verify Ollama with the official method for that OS.
|
|
32
|
+
- If the target machine still lacks OpenClaw, install or verify it with the official Ollama integration path.
|
|
33
|
+
- If the chosen path uses local Ollama memory, pull or confirm the candidate models on the target machine.
|
|
34
|
+
- If the chosen path uses local Ollama memory, benchmark the candidates on the target machine with [bench_ollama_embeddings.ts](scripts/bench_ollama_embeddings.ts).
|
|
35
|
+
- Write the chosen model into each target `openclaw.json`.
|
|
36
|
+
- Validate the config, restart the profile, and rebuild memory.
|
|
37
|
+
- Confirm that `memory status` and `status` both look healthy for every target profile.
|
|
38
|
+
|
|
39
|
+
## Fast Rules
|
|
40
|
+
|
|
41
|
+
- Benchmark on the target machine. Do not benchmark locally and assume the same result remotely.
|
|
42
|
+
- If the user already provides enough concrete parameters to edit the config safely, skip the readiness survey and move straight to config update, validation, restart, and rebuild.
|
|
43
|
+
- If the user already provides a provider, model, and any required provider-specific settings, prefer direct configuration over local-model benchmarking.
|
|
44
|
+
- On a fresh machine or an unclear host, start with [survey_host_readiness.ts](scripts/survey_host_readiness.ts).
|
|
45
|
+
- If `ollama` is missing, install it first with the official download or install script for that OS.
|
|
46
|
+
- If OpenClaw itself or a usable OpenClaw management entrypoint is missing, install OpenClaw through `ollama launch openclaw` instead of inventing a custom path.
|
|
47
|
+
- Treat Windows as a special case: native Windows and WSL2 are both supported, but WSL2 remains the more stable and recommended path for the full CLI, Gateway, and tooling flow. If the machine already runs OpenClaw natively and the requested work stays within supported native CLI/Gateway paths, do not force a WSL migration.
|
|
48
|
+
- If the user has nothing set up and wants to save money, prefer local Ollama deployment instead of cloud-first suggestions.
|
|
49
|
+
- On resource-constrained hosts, start with `embeddinggemma:300m-qat-q8_0`, `nomic-embed-text:latest`, and `qwen3-embedding:0.6b`.
|
|
50
|
+
- Treat `qwen3-embedding:latest` as a last resort on slow hardware.
|
|
51
|
+
- If the same maintenance window also upgrades `grix`, upgrade `grix` first and rebuild memory once at the end.
|
|
52
|
+
- Update `agents.defaults.memorySearch.provider` and `agents.defaults.memorySearch.model` at the profile level unless one agent truly needs a different model.
|
|
53
|
+
- Restart the profile after a config change, then reindex memory.
|
|
54
|
+
- Treat `0/0 files` or `no memory files found` as normal for empty agents. Treat `config validate` failure, crashed services, or missing indexed files as actual failures.
|
|
55
|
+
- If reindex progress keeps moving, let it finish. Large session logs can take minutes on older machines.
|
|
56
|
+
|
|
57
|
+
## 1. Choose The Right Entry Path
|
|
58
|
+
|
|
59
|
+
### Direct config path
|
|
60
|
+
|
|
61
|
+
Use this path when the user already provides most of these:
|
|
62
|
+
|
|
63
|
+
- target profile names or config paths
|
|
64
|
+
- target provider such as `openai` or `ollama`
|
|
65
|
+
- target memory model
|
|
66
|
+
- whether the machine already has Ollama and OpenClaw
|
|
67
|
+
- whether the goal is just to switch memory settings
|
|
68
|
+
|
|
69
|
+
In this path:
|
|
70
|
+
|
|
71
|
+
- skip the readiness survey unless something important is still unclear
|
|
72
|
+
- skip installation checks that do not affect the requested change
|
|
73
|
+
- if the provider is not `ollama`, skip local model benchmarking unless the user explicitly asks for it
|
|
74
|
+
- update the config directly
|
|
75
|
+
- validate, restart, and rebuild
|
|
76
|
+
|
|
77
|
+
### Fresh machine path
|
|
78
|
+
|
|
79
|
+
Use this path when the user says they have nothing set up yet, or wants a cheap setup from scratch.
|
|
80
|
+
|
|
81
|
+
In this path:
|
|
82
|
+
|
|
83
|
+
- recommend local Ollama first if the user wants to save money
|
|
84
|
+
- survey the machine
|
|
85
|
+
- install missing pieces through the official path
|
|
86
|
+
- if the host is native Windows, prefer WSL for the full setup and heavier automation/tooling path, but do not falsely claim native Windows is unsupported when the requested steps already fit supported native CLI/Gateway flows
|
|
87
|
+
- then benchmark and configure memory
|
|
88
|
+
|
|
89
|
+
### Provider-specific shortcut
|
|
90
|
+
|
|
91
|
+
If the user directly gives provider settings such as `provider=openai`, API base, model, and target profiles:
|
|
92
|
+
|
|
93
|
+
- do not route them through local Ollama setup unless they ask for a local option
|
|
94
|
+
- write the memory settings directly
|
|
95
|
+
- validate, restart, and rebuild
|
|
96
|
+
|
|
97
|
+
## 2. Survey The Machine
|
|
98
|
+
|
|
99
|
+
Run [survey_host_readiness.ts](scripts/survey_host_readiness.ts):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
node scripts/survey_host_readiness.ts
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
This checks:
|
|
106
|
+
|
|
107
|
+
- OS, architecture, CPU count, and total RAM
|
|
108
|
+
- whether the current shell is macOS native, Linux native, WSL, or native Windows
|
|
109
|
+
- whether `ollama`, `openclaw`, a usable OpenClaw management entrypoint, `node`, and `npm` exist
|
|
110
|
+
- whether the local Ollama API is reachable
|
|
111
|
+
- a starting shortlist of memory models based on a conservative RAM heuristic
|
|
112
|
+
|
|
113
|
+
If the machine is clearly undersized for your original plan, downgrade the candidate list before pulling large models.
|
|
114
|
+
|
|
115
|
+
## 3. Install Missing Pieces
|
|
116
|
+
|
|
117
|
+
Follow [host-readiness.md](references/host-readiness.md) for the official path.
|
|
118
|
+
|
|
119
|
+
Use these rules:
|
|
120
|
+
|
|
121
|
+
- If `ollama` is missing:
|
|
122
|
+
- install Ollama first
|
|
123
|
+
- If `ollama` exists but OpenClaw or a usable OpenClaw management entrypoint is missing:
|
|
124
|
+
- run `ollama launch openclaw` for interactive setup
|
|
125
|
+
- or run `ollama launch openclaw --model <model> --yes` for headless setup
|
|
126
|
+
- If the machine is only being prepared and should not start the TUI:
|
|
127
|
+
- run `ollama launch openclaw --config`
|
|
128
|
+
|
|
129
|
+
If the user wants the cheapest practical setup from scratch:
|
|
130
|
+
|
|
131
|
+
- recommend local Ollama for memory embeddings
|
|
132
|
+
- start with smaller local embedding models
|
|
133
|
+
- avoid steering them toward cloud models unless they explicitly want stronger remote models or their hardware cannot carry the workload
|
|
134
|
+
|
|
135
|
+
Do not patch OpenClaw internals to skip the official setup flow.
|
|
136
|
+
|
|
137
|
+
Skip this whole installation step when the user is only asking to apply already-known remote provider settings and the machine already has OpenClaw.
|
|
138
|
+
|
|
139
|
+
## 4. Pick Candidate Models
|
|
140
|
+
|
|
141
|
+
On resource-constrained hosts, start with these candidates:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
ollama pull embeddinggemma:300m-qat-q8_0
|
|
145
|
+
ollama pull nomic-embed-text:latest
|
|
146
|
+
ollama pull qwen3-embedding:0.6b
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Only try `qwen3-embedding:latest` when the machine already handles the smaller models comfortably and a long rebuild window is acceptable.
|
|
150
|
+
|
|
151
|
+
Use the readiness script output as the first filter on other machines:
|
|
152
|
+
|
|
153
|
+
- low-memory hosts: start with the smallest shortlist it recommends
|
|
154
|
+
- mid-range hosts: start with `embeddinggemma`, `nomic-embed-text`, and `qwen3-embedding:0.6b`
|
|
155
|
+
- strong hosts: add larger candidates only if there is a real reason
|
|
156
|
+
|
|
157
|
+
## 5. Benchmark On The Target Machine
|
|
158
|
+
|
|
159
|
+
Use [bench_ollama_embeddings.ts](scripts/bench_ollama_embeddings.ts):
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
node scripts/bench_ollama_embeddings.ts \
|
|
163
|
+
embeddinggemma:300m-qat-q8_0 \
|
|
164
|
+
nomic-embed-text:latest \
|
|
165
|
+
qwen3-embedding:0.6b
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Use `--rounds 2` for a cleaner comparison. Use `--batch-size 2` for a quicker smoke test.
|
|
169
|
+
|
|
170
|
+
Prefer the fastest model that succeeds cleanly. On smaller or older hosts, these rough bands work well:
|
|
171
|
+
|
|
172
|
+
- Excellent: single <= 5s and batch-of-4 <= 15s
|
|
173
|
+
- Acceptable: single <= 20s and batch-of-4 <= 60s
|
|
174
|
+
- Poor: slower than that, or painful to repeat during rebuilds
|
|
175
|
+
|
|
176
|
+
## 6. Write The Chosen Provider Settings Into OpenClaw Config
|
|
177
|
+
|
|
178
|
+
Preview the change first:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
node scripts/set_openclaw_memory_model.ts \
|
|
182
|
+
--model embeddinggemma:300m-qat-q8_0 \
|
|
183
|
+
<profile-dir-1> \
|
|
184
|
+
<profile-dir-2>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Apply it only after the preview looks right:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
node scripts/set_openclaw_memory_model.ts \
|
|
191
|
+
--write \
|
|
192
|
+
--model embeddinggemma:300m-qat-q8_0 \
|
|
193
|
+
<profile-dir-1> \
|
|
194
|
+
<profile-dir-2>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The script creates a timestamped backup beside each `openclaw.json`.
|
|
198
|
+
Its preview output redacts common secret-like fields such as API keys, tokens, and authorization headers.
|
|
199
|
+
|
|
200
|
+
For a direct remote-provider setup, change the provider flag and supply the target model:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
node scripts/set_openclaw_memory_model.ts \
|
|
204
|
+
--write \
|
|
205
|
+
--provider openai \
|
|
206
|
+
--model text-embedding-3-small \
|
|
207
|
+
<profile-dir>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
If the provider needs extra keys, pass them in the same command with repeated `--set KEY=VALUE` flags. Keys are relative to `agents.defaults.memorySearch`, support dotted paths, and parse JSON values when possible.
|
|
211
|
+
When the provider changes, the script replaces the previous `memorySearch` object before writing the new provider settings so that stale fields do not leak across providers.
|
|
212
|
+
|
|
213
|
+
Examples:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
node scripts/set_openclaw_memory_model.ts \
|
|
217
|
+
--write \
|
|
218
|
+
--provider openai \
|
|
219
|
+
--model text-embedding-3-small \
|
|
220
|
+
--set apiKey=env:OPENAI_API_KEY \
|
|
221
|
+
--set baseURL=https://api.openai.com/v1 \
|
|
222
|
+
<profile-dir>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
node scripts/set_openclaw_memory_model.ts \
|
|
227
|
+
--write \
|
|
228
|
+
--provider custom \
|
|
229
|
+
--model my-embed-model \
|
|
230
|
+
--set 'headers.Authorization=Bearer token-value' \
|
|
231
|
+
--set timeoutSeconds=30 \
|
|
232
|
+
<profile-dir>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## 7. Validate, Restart, And Rebuild
|
|
236
|
+
|
|
237
|
+
Use the official `openclaw` CLI by default on unknown hosts. If a local wrapper exists on a specific machine, adapt locally, but keep the skill examples on the official CLI. The shell examples below are for macOS, Linux, or WSL.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
openclaw --profile <profile> config validate
|
|
241
|
+
openclaw --profile <profile> gateway restart
|
|
242
|
+
openclaw --profile <profile> memory index --force
|
|
243
|
+
openclaw --profile <profile> memory status
|
|
244
|
+
openclaw --profile <profile> status
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
For multiple profiles:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
for p in <profile-1> <profile-2>; do
|
|
251
|
+
openclaw --profile "$p" config validate || break
|
|
252
|
+
openclaw --profile "$p" gateway restart || break
|
|
253
|
+
openclaw --profile "$p" memory index --force || break
|
|
254
|
+
openclaw --profile "$p" memory status
|
|
255
|
+
openclaw --profile "$p" status
|
|
256
|
+
done
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
If a given machine exposes only a wrapper around `openclaw`, map the same five actions onto that wrapper locally: validate config, restart, rebuild memory, inspect memory status, and inspect runtime status.
|
|
260
|
+
|
|
261
|
+
Use `memory status --deep` when counts do not match what you expect.
|
|
262
|
+
|
|
263
|
+
## 8. Judge The Result Correctly
|
|
264
|
+
|
|
265
|
+
A rollout is done when:
|
|
266
|
+
|
|
267
|
+
- `config validate` passes
|
|
268
|
+
- the service is running
|
|
269
|
+
- the chosen model appears in `memory status`
|
|
270
|
+
- indexed counts match real memory and session files for agents that actually have content
|
|
271
|
+
- large agents finish eventually instead of bouncing forever
|
|
272
|
+
|
|
273
|
+
Not a failure by itself:
|
|
274
|
+
|
|
275
|
+
- empty agents showing `0/0 files`
|
|
276
|
+
- empty agents showing `no memory files found`
|
|
277
|
+
- one or two very large session logs taking much longer than the rest
|
|
278
|
+
|
|
279
|
+
## Reference
|
|
280
|
+
|
|
281
|
+
Read [host-readiness.md](references/host-readiness.md) for the generic install and readiness path.
|
|
282
|
+
Read [case-study-macpro.md](references/case-study-macpro.md) only as one measured example on an older machine.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# MacPro Case Study
|
|
2
|
+
|
|
3
|
+
Date of run: April 5, 2026
|
|
4
|
+
|
|
5
|
+
This page is one measured example on an older machine. Do not treat it as the default plan for all hosts.
|
|
6
|
+
|
|
7
|
+
Environment:
|
|
8
|
+
|
|
9
|
+
- old MacPro-class machine reached over SSH
|
|
10
|
+
- Ollama used for OpenClaw memory embeddings
|
|
11
|
+
- OpenClaw profiles stored under a shared profile directory on the host
|
|
12
|
+
|
|
13
|
+
## Model Results
|
|
14
|
+
|
|
15
|
+
| Model | Approx size | Single embed | Batch-of-4 embed | Main rebuild | Result |
|
|
16
|
+
| --- | --- | ---: | ---: | ---: | --- |
|
|
17
|
+
| `embeddinggemma:300m-qat-q8_0` | 338 MB | 3.11 s | 8.54 s | 59 s | Best overall choice on this machine |
|
|
18
|
+
| `qwen3-embedding:0.6b` | 639 MB | 16.53 s | 61.86 s | 421 s | Works, but much slower |
|
|
19
|
+
| `nomic-embed-text:latest` | 274 MB | 19.48 s | 76.69 s | not run end-to-end | Viable fallback, slower than `embeddinggemma` here |
|
|
20
|
+
| `qwen3-embedding:latest` | 4.7 GB | over 4 min for one request in testing | not practical | rebuild timed out in practice | Not suitable for this old machine |
|
|
21
|
+
|
|
22
|
+
## Operational Lessons
|
|
23
|
+
|
|
24
|
+
- Pick the model by measured speed on the target machine, not by size or reputation.
|
|
25
|
+
- `embeddinggemma:300m-qat-q8_0` was the clear winner on this MacPro.
|
|
26
|
+
- Upgrade `grix` first if that work is part of the same maintenance window, then rebuild memory once.
|
|
27
|
+
- Reindex jobs can look slow but still be healthy. Large session logs were the main reason:
|
|
28
|
+
- one `xiaoli` session file was about 320 KB
|
|
29
|
+
- one `gema` session file was about 721 KB
|
|
30
|
+
- Empty agents can legitimately show `0/0 files` or `no memory files found`.
|
|
31
|
+
- Real failures were configuration errors, services not running, or indexed counts lower than the actual memory and session file counts.
|
|
32
|
+
|
|
33
|
+
## Final Deployed State
|
|
34
|
+
|
|
35
|
+
These standalone profiles were moved to `embeddinggemma:300m-qat-q8_0` and verified healthy:
|
|
36
|
+
|
|
37
|
+
- `main`
|
|
38
|
+
- `lwq`
|
|
39
|
+
- `lsx`
|
|
40
|
+
- `zmy`
|
|
41
|
+
- `jy`
|
|
42
|
+
- `zx`
|
|
43
|
+
- `ly`
|
|
44
|
+
- `jk`
|
|
45
|
+
- `zpf`
|
|
46
|
+
|
|
47
|
+
`main` subagents with real memory content were also rebuilt successfully:
|
|
48
|
+
|
|
49
|
+
- `main`
|
|
50
|
+
- `xiaoli`
|
|
51
|
+
- `gema`
|
|
52
|
+
- `carousel-growth-engine`
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Host Readiness
|
|
2
|
+
|
|
3
|
+
Use this page when the target machine is not already prepared.
|
|
4
|
+
|
|
5
|
+
## Official Current Install Path
|
|
6
|
+
|
|
7
|
+
As of April 8, 2026:
|
|
8
|
+
|
|
9
|
+
- Ollama is available on macOS, Windows, and Linux.
|
|
10
|
+
- The Ollama quickstart exposes `ollama launch openclaw` as the official way to start OpenClaw from Ollama.
|
|
11
|
+
- The OpenClaw integration page says Ollama will prompt to install OpenClaw via npm if OpenClaw is missing.
|
|
12
|
+
- The current Ollama tutorial for OpenClaw says you need:
|
|
13
|
+
- Ollama 0.17 or later
|
|
14
|
+
- Node.js
|
|
15
|
+
- Mac or Linux for the smoothest direct setup
|
|
16
|
+
- Windows users can use WSL for the OpenClaw setup path
|
|
17
|
+
- The current OpenClaw Windows docs say native Windows and WSL2 are both supported; WSL2 is the more stable and recommended path for the full experience.
|
|
18
|
+
|
|
19
|
+
## OS Split
|
|
20
|
+
|
|
21
|
+
- macOS:
|
|
22
|
+
- install and run Ollama natively
|
|
23
|
+
- install and run OpenClaw natively
|
|
24
|
+
- Linux:
|
|
25
|
+
- install and run Ollama natively
|
|
26
|
+
- install and run OpenClaw natively
|
|
27
|
+
- Windows:
|
|
28
|
+
- native Ollama installation is fine
|
|
29
|
+
- native OpenClaw CLI/Gateway flows can work
|
|
30
|
+
- WSL2 is still the recommended path for the full CLI, Gateway, and tooling experience
|
|
31
|
+
- do not write the skill as if WSL were mandatory for every Windows task, but also do not present native Windows as the preferred path for shell-heavy automation and repo work
|
|
32
|
+
|
|
33
|
+
## Readiness Checklist
|
|
34
|
+
|
|
35
|
+
- Confirm the OS and architecture.
|
|
36
|
+
- Confirm whether you are in native macOS, native Linux, WSL, or native Windows.
|
|
37
|
+
- Confirm enough RAM or unified memory for the candidate models you plan to test.
|
|
38
|
+
- Confirm `ollama` is installed.
|
|
39
|
+
- Confirm `node` and `npm` exist before expecting OpenClaw installation through Ollama to succeed.
|
|
40
|
+
- Confirm the local Ollama API responds on `http://127.0.0.1:11434`.
|
|
41
|
+
- Confirm whether OpenClaw itself and a usable management entrypoint already exist.
|
|
42
|
+
|
|
43
|
+
## When To Skip The Survey
|
|
44
|
+
|
|
45
|
+
Skip the full readiness survey when the user already gives enough information to do a direct config change safely, for example:
|
|
46
|
+
|
|
47
|
+
- exact target profile names or config paths
|
|
48
|
+
- exact memory model to use
|
|
49
|
+
- confirmation that Ollama and OpenClaw are already installed
|
|
50
|
+
- a request that is only about switching memory configuration, not installing the stack
|
|
51
|
+
|
|
52
|
+
In that case, go straight to config update, validation, restart, and rebuild.
|
|
53
|
+
|
|
54
|
+
## Official Commands
|
|
55
|
+
|
|
56
|
+
### Install or verify Ollama
|
|
57
|
+
|
|
58
|
+
Linux:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
curl -fsSL https://ollama.com/install.sh | sh
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
macOS:
|
|
65
|
+
|
|
66
|
+
- use the official app download, or
|
|
67
|
+
- use the same official install script if that matches the environment policy
|
|
68
|
+
|
|
69
|
+
Windows:
|
|
70
|
+
|
|
71
|
+
- install Ollama from the official Windows download
|
|
72
|
+
- if the goal is a fresh full OpenClaw rollout, prefer WSL2 for the setup flow
|
|
73
|
+
- when documenting commands in the skill, prefer the path that matches the current machine: WSL shell commands for WSL setups, native CLI commands only when the host already uses a supported native Windows flow
|
|
74
|
+
|
|
75
|
+
### Install or configure OpenClaw through Ollama
|
|
76
|
+
|
|
77
|
+
Interactive:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
ollama launch openclaw
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Configure only:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
ollama launch openclaw --config
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Headless:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
ollama launch openclaw --model kimi-k2.5:cloud --yes
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Notes:
|
|
96
|
+
|
|
97
|
+
- `--yes` requires `--model`
|
|
98
|
+
- if OpenClaw is missing, Ollama prompts to install it via npm
|
|
99
|
+
- if the gateway is already running, changing the model through `ollama launch openclaw --config` restarts it automatically
|
|
100
|
+
|
|
101
|
+
## Management Entry Point
|
|
102
|
+
|
|
103
|
+
Do not assume one machine-specific wrapper across all machines.
|
|
104
|
+
|
|
105
|
+
- The generic, documented CLI is `openclaw`.
|
|
106
|
+
- Some machines may also expose a local wrapper.
|
|
107
|
+
- A reusable skill should prefer the documented `openclaw` CLI in its examples, then adapt only if the current machine exposes a different wrapper.
|
|
108
|
+
|
|
109
|
+
## Direct Provider Configs
|
|
110
|
+
|
|
111
|
+
If the user already knows the remote memory provider settings, do not force a local Ollama path first.
|
|
112
|
+
|
|
113
|
+
- You may go straight to updating `agents.defaults.memorySearch`.
|
|
114
|
+
- `provider` and `model` are the minimum fields.
|
|
115
|
+
- Provider-specific fields such as API base, headers, or key references should be written at the same time instead of leaving the config half-finished.
|
|
116
|
+
- If you are switching providers, replace the old provider-specific settings instead of leaving stale fields behind.
|
|
117
|
+
- Only benchmark local Ollama models when the user wants a local memory provider or asks for a speed comparison.
|
|
118
|
+
|
|
119
|
+
## Choosing Memory Embedding Candidates
|
|
120
|
+
|
|
121
|
+
This is a heuristic for the first pass only. The final choice must come from a benchmark on the target machine.
|
|
122
|
+
|
|
123
|
+
- If the user has nothing yet and wants to save money:
|
|
124
|
+
- prefer local Ollama deployment
|
|
125
|
+
- prefer smaller local embedding models first
|
|
126
|
+
- keep cloud suggestions optional, not default
|
|
127
|
+
- very constrained hosts:
|
|
128
|
+
- start with `nomic-embed-text:latest`
|
|
129
|
+
- add `embeddinggemma:300m-qat-q8_0` if the machine is still responsive
|
|
130
|
+
- older or mid-range hosts:
|
|
131
|
+
- start with `embeddinggemma:300m-qat-q8_0`
|
|
132
|
+
- compare with `nomic-embed-text:latest`
|
|
133
|
+
- add `qwen3-embedding:0.6b` only if you can afford a slower rebuild
|
|
134
|
+
- stronger machines:
|
|
135
|
+
- still benchmark the smaller models first
|
|
136
|
+
- only add larger models when there is a clear quality reason
|
|
137
|
+
|
|
138
|
+
## When To Stop And Re-Scope
|
|
139
|
+
|
|
140
|
+
- If `ollama` will not install cleanly through the official method, stop and resolve that first.
|
|
141
|
+
- If `node` or `npm` is missing and the machine needs OpenClaw installation, install Node.js before retrying OpenClaw setup.
|
|
142
|
+
- If local embedding models are too slow, keep the smaller local memory model and move only the main assistant model to cloud if needed.
|
|
143
|
+
- If the machine is Windows without WSL, do not invent a Linux-only path. If the requested work already fits supported native Windows CLI/Gateway flows, continue there; otherwise set up WSL2 or use a Mac/Linux host.
|
|
144
|
+
|
|
145
|
+
## Optional Example
|
|
146
|
+
|
|
147
|
+
See [case-study-macpro.md](case-study-macpro.md) for one measured old-machine rollout. Treat it as an example, not a universal baseline.
|