loki-mode 9.8.1 → 9.12.0
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 +19 -14
- package/SKILL.md +3 -2
- package/VERSION +1 -1
- package/autonomy/loki +122 -1
- package/autonomy/run.sh +49 -2
- package/dashboard/__init__.py +1 -1
- package/dashboard/api_evidence.py +411 -0
- package/dashboard/api_operator.py +283 -0
- package/dashboard/api_phases.py +262 -0
- package/dashboard/api_releases.py +242 -0
- package/dashboard/api_runs.py +477 -0
- package/dashboard/api_tests.py +444 -0
- package/dashboard/api_v2.py +47 -1
- package/dashboard/server.py +54 -0
- package/dashboard/static/index.html +246 -135
- package/docs/ARCHITECTURE-OVERVIEW.md +5 -3
- package/docs/CAPABILITY-BACKLOG.md +53 -0
- package/docs/COMPARISON.md +2 -2
- package/docs/COMPETITIVE-ANALYSIS.md +1 -1
- package/docs/COMPETITIVE-SCORECARD.md +422 -0
- package/docs/DASHBOARD-9.12-EVIDENCE.md +97 -0
- package/docs/DASHBOARD-ARCHITECTURE.md +423 -0
- package/docs/DEMOS.md +21 -23
- package/docs/HANDOFF-2026-08-03.md +439 -0
- package/docs/INSTALLATION.md +17 -10
- package/docs/OUTCOME-FRONTIER.md +536 -0
- package/docs/PROMPT-ABLATION-RESULT.md +97 -0
- package/docs/TOOLS.md +800 -0
- package/docs/alternative-installations.md +2 -3
- package/docs/audit-logging.md +44 -35
- package/docs/authentication.md +13 -2
- package/docs/authorization.md +87 -81
- package/docs/git-workflow.md +6 -3
- package/docs/metrics.md +15 -16
- package/docs/network-security.md +16 -13
- package/docs/openclaw-integration.md +36 -556
- package/docs/show-hn-post.md +2 -2
- package/docs/siem-integration.md +39 -36
- package/loki-ts/dist/loki.js +18 -18
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/references/confidence-routing.md +18 -1
- package/references/invariant-checks.md +13 -8
- package/references/magic-rarv-integration.md +0 -1
- package/references/multi-provider.md +27 -5
- package/skills/healing.md +4 -2
- package/tools/audit-docs.py +488 -0
- package/tools/baseline-pin.py +19 -1
- package/tools/calibration-audit.py +523 -0
- package/tools/ci-gate.py +19 -1
- package/tools/cost-forecast.py +344 -0
- package/tools/cost-guard.py +19 -1
- package/tools/cost-history.py +19 -1
- package/tools/cost-per-outcome.py +394 -0
- package/tools/estimate-run.py +19 -1
- package/tools/evidence-freshness.py +307 -0
- package/tools/gate-init.py +19 -1
- package/tools/gate-report.py +19 -1
- package/tools/gate-simulate.py +570 -0
- package/tools/gate-trend.py +354 -0
- package/tools/model-advisor.py +52 -1
- package/tools/policy-load.py +19 -1
- package/tools/prompt-cost.py +363 -0
- package/tools/prompt-diff.py +448 -0
- package/tools/prompt-lint.py +448 -0
- package/tools/receipt-bundle.py +72 -2
- package/tools/receipt-diff.py +19 -1
- package/tools/receipt-find.py +19 -1
- package/tools/receipt-stats.py +380 -0
- package/tools/receipt-timeline.py +478 -0
- package/tools/receipt-verify-batch.py +291 -0
- package/tools/run-replay.py +19 -1
- package/tools/signing-status.py +19 -1
- package/tools/token-guard.py +19 -1
- package/tools/token-tax.py +375 -0
- package/tools/tool-index.py +19 -1
- package/tools/verification-tax.py +277 -0
- package/tools/verify-chain.py +361 -0
|
@@ -1,572 +1,52 @@
|
|
|
1
1
|
# OpenClaw Integration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Status: skeleton. Not a shipped feature.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
An earlier version of this page documented an OpenClaw coordination protocol
|
|
6
|
+
with `loki openclaw` subcommands, `/api/openclaw/*` REST endpoints,
|
|
7
|
+
`LOKI_OPENCLAW_*` environment variables, a `.loki/config.yaml` `openclaw:`
|
|
8
|
+
block, and `loki_openclaw_*` Prometheus metrics. **None of that exists in the
|
|
9
|
+
source.** It has been removed rather than left in place:
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
- `grep -c openclaw autonomy/loki` returns `0` -- there is no `loki openclaw`
|
|
12
|
+
command in the CLI dispatch, and no `--openclaw` flag anywhere in
|
|
13
|
+
`autonomy/` or `loki-ts/src/`.
|
|
14
|
+
- `grep -rn "api/openclaw" dashboard/server.py loki-ts/src/` returns nothing --
|
|
15
|
+
none of the documented REST endpoints are implemented.
|
|
16
|
+
- No `LOKI_OPENCLAW_*` variable is read by any runtime code.
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
- **Standardized communication** - Common message format for agent-to-agent communication
|
|
11
|
-
- **Shared task queues** - Distribute work across multiple orchestrators
|
|
12
|
-
- **State synchronization** - Keep agent state consistent across systems
|
|
18
|
+
## What actually exists
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
- AutoGPT
|
|
16
|
-
- MetaGPT
|
|
17
|
-
- CrewAI
|
|
18
|
-
- LangGraph agents
|
|
19
|
-
- Custom agent frameworks implementing the OpenClaw protocol
|
|
20
|
+
Two real things, neither of which is a Loki CLI feature:
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
**1. A file-watching bridge skeleton** at `integrations/openclaw/bridge/`. It
|
|
23
|
+
watches a `.loki` directory, maps Loki events to an OpenClaw gateway message
|
|
24
|
+
shape (`schema_map.py`), and prints the mapped JSON to stdout. Its own module
|
|
25
|
+
docstring states the limitation plainly:
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# Start with OpenClaw integration
|
|
29
|
-
loki start --openclaw ./prd.md
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Configuration
|
|
33
|
-
|
|
34
|
-
### Environment Variables
|
|
35
|
-
|
|
36
|
-
| Variable | Default | Description |
|
|
37
|
-
|----------|---------|-------------|
|
|
38
|
-
| `LOKI_OPENCLAW_ENABLED` | `false` | Enable OpenClaw bridge |
|
|
39
|
-
| `LOKI_OPENCLAW_ENDPOINT` | - | OpenClaw server endpoint URL (required) |
|
|
40
|
-
| `LOKI_OPENCLAW_AGENT_ID` | `loki-{pid}` | Unique agent ID for this Loki instance |
|
|
41
|
-
| `LOKI_OPENCLAW_NAMESPACE` | `default` | Namespace for multi-tenant deployments |
|
|
42
|
-
| `LOKI_OPENCLAW_HEARTBEAT` | `30` | Heartbeat interval in seconds |
|
|
43
|
-
| `LOKI_OPENCLAW_TIMEOUT` | `120` | Message timeout in seconds |
|
|
44
|
-
|
|
45
|
-
### Configuration File
|
|
46
|
-
|
|
47
|
-
```yaml
|
|
48
|
-
# .loki/config.yaml
|
|
49
|
-
openclaw:
|
|
50
|
-
enabled: true
|
|
51
|
-
endpoint: http://openclaw-server:8080
|
|
52
|
-
agent_id: loki-primary
|
|
53
|
-
namespace: production
|
|
54
|
-
heartbeat_interval: 30
|
|
55
|
-
message_timeout: 120
|
|
56
|
-
features:
|
|
57
|
-
task_sharing: true
|
|
58
|
-
state_sync: true
|
|
59
|
-
capabilities_discovery: true
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## OpenClaw Protocol
|
|
63
|
-
|
|
64
|
-
### Message Format
|
|
65
|
-
|
|
66
|
-
OpenClaw uses JSON messages over HTTP/WebSocket:
|
|
67
|
-
|
|
68
|
-
```json
|
|
69
|
-
{
|
|
70
|
-
"protocol_version": "1.0",
|
|
71
|
-
"message_type": "task_offer",
|
|
72
|
-
"agent_id": "loki-12345",
|
|
73
|
-
"namespace": "default",
|
|
74
|
-
"timestamp": "2026-02-15T14:30:00Z",
|
|
75
|
-
"payload": {
|
|
76
|
-
"task_id": "task-abc123",
|
|
77
|
-
"task_type": "code_review",
|
|
78
|
-
"priority": "high",
|
|
79
|
-
"deadline": "2026-02-15T16:00:00Z",
|
|
80
|
-
"requirements": {
|
|
81
|
-
"model": "opus",
|
|
82
|
-
"skills": ["code_review", "security_audit"]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Message Types
|
|
89
|
-
|
|
90
|
-
| Type | Direction | Description |
|
|
91
|
-
|------|-----------|-------------|
|
|
92
|
-
| `register` | Loki → OpenClaw | Agent registration with capabilities |
|
|
93
|
-
| `heartbeat` | Loki → OpenClaw | Keep-alive signal |
|
|
94
|
-
| `task_offer` | OpenClaw → Loki | Task offered for execution |
|
|
95
|
-
| `task_accept` | Loki → OpenClaw | Accept task offer |
|
|
96
|
-
| `task_reject` | Loki → OpenClaw | Reject task offer |
|
|
97
|
-
| `task_update` | Loki → OpenClaw | Progress update |
|
|
98
|
-
| `task_complete` | Loki → OpenClaw | Task completion |
|
|
99
|
-
| `state_sync` | Bidirectional | State synchronization |
|
|
100
|
-
| `capability_query` | OpenClaw → Loki | Query agent capabilities |
|
|
101
|
-
|
|
102
|
-
## Agent Registration
|
|
103
|
-
|
|
104
|
-
When OpenClaw bridge starts, Loki Mode registers with the OpenClaw server:
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"message_type": "register",
|
|
109
|
-
"agent_id": "loki-12345",
|
|
110
|
-
"payload": {
|
|
111
|
-
"name": "Loki Mode",
|
|
112
|
-
"version": "5.42.2",
|
|
113
|
-
"provider": "claude",
|
|
114
|
-
"capabilities": [
|
|
115
|
-
"full_stack_development",
|
|
116
|
-
"code_review",
|
|
117
|
-
"testing",
|
|
118
|
-
"deployment",
|
|
119
|
-
"business_operations"
|
|
120
|
-
],
|
|
121
|
-
"agent_types": [
|
|
122
|
-
"eng-frontend", "eng-backend", "eng-qa",
|
|
123
|
-
"ops-devops", "ops-sre", "biz-marketing"
|
|
124
|
-
],
|
|
125
|
-
"max_concurrent_tasks": 10,
|
|
126
|
-
"supported_models": ["opus", "sonnet", "haiku"]
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## Task Coordination
|
|
132
|
-
|
|
133
|
-
### Receiving Tasks
|
|
134
|
-
|
|
135
|
-
Loki Mode receives tasks from OpenClaw:
|
|
136
|
-
|
|
137
|
-
```json
|
|
138
|
-
{
|
|
139
|
-
"message_type": "task_offer",
|
|
140
|
-
"payload": {
|
|
141
|
-
"task_id": "external-task-123",
|
|
142
|
-
"task_type": "code_review",
|
|
143
|
-
"description": "Review authentication module",
|
|
144
|
-
"files": ["src/auth.py", "tests/test_auth.py"],
|
|
145
|
-
"priority": "high",
|
|
146
|
-
"deadline": "2026-02-15T16:00:00Z"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Loki Mode evaluates and responds:
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"message_type": "task_accept",
|
|
156
|
-
"payload": {
|
|
157
|
-
"task_id": "external-task-123",
|
|
158
|
-
"assigned_agent": "review-code",
|
|
159
|
-
"estimated_duration": 600
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Offering Tasks
|
|
165
|
-
|
|
166
|
-
Loki Mode can offer tasks to other agents via OpenClaw:
|
|
167
|
-
|
|
168
|
-
```json
|
|
169
|
-
{
|
|
170
|
-
"message_type": "task_offer",
|
|
171
|
-
"payload": {
|
|
172
|
-
"task_id": "loki-task-456",
|
|
173
|
-
"task_type": "data_analysis",
|
|
174
|
-
"description": "Analyze user behavior logs",
|
|
175
|
-
"requirements": {
|
|
176
|
-
"skills": ["data_science", "ml"],
|
|
177
|
-
"estimated_cost": 0.50
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## State Synchronization
|
|
184
|
-
|
|
185
|
-
### Shared State
|
|
186
|
-
|
|
187
|
-
Loki Mode synchronizes key state with OpenClaw:
|
|
188
|
-
|
|
189
|
-
- Active agents and their status
|
|
190
|
-
- Task queue (pending, in-progress, completed)
|
|
191
|
-
- Session metadata (iteration, cost, uptime)
|
|
192
|
-
- Resource utilization (memory, CPU, tokens)
|
|
193
|
-
|
|
194
|
-
```json
|
|
195
|
-
{
|
|
196
|
-
"message_type": "state_sync",
|
|
197
|
-
"payload": {
|
|
198
|
-
"session_status": "running",
|
|
199
|
-
"iteration": 42,
|
|
200
|
-
"agents_active": 12,
|
|
201
|
-
"tasks_pending": 5,
|
|
202
|
-
"tasks_in_progress": 8,
|
|
203
|
-
"tasks_completed": 127,
|
|
204
|
-
"cost_usd": 2.34
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Conflict Resolution
|
|
210
|
-
|
|
211
|
-
When state conflicts occur:
|
|
212
|
-
|
|
213
|
-
1. **Last-write-wins** - Default strategy
|
|
214
|
-
2. **Merge** - For additive operations (task queue append)
|
|
215
|
-
3. **Reject** - For conflicting updates (agent status)
|
|
216
|
-
|
|
217
|
-
## Capability Discovery
|
|
218
|
-
|
|
219
|
-
Other agents can query Loki Mode's capabilities:
|
|
220
|
-
|
|
221
|
-
```json
|
|
222
|
-
{
|
|
223
|
-
"message_type": "capability_query",
|
|
224
|
-
"payload": {
|
|
225
|
-
"query_type": "supports_task_type",
|
|
226
|
-
"task_type": "frontend_development"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
Response:
|
|
232
|
-
|
|
233
|
-
```json
|
|
234
|
-
{
|
|
235
|
-
"message_type": "capability_response",
|
|
236
|
-
"payload": {
|
|
237
|
-
"supported": true,
|
|
238
|
-
"agent_types": ["eng-frontend"],
|
|
239
|
-
"confidence": 0.95,
|
|
240
|
-
"estimated_cost": 0.10
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## API Endpoints
|
|
246
|
-
|
|
247
|
-
Loki Mode exposes OpenClaw endpoints on the dashboard server:
|
|
248
|
-
|
|
249
|
-
```bash
|
|
250
|
-
# Get OpenClaw status
|
|
251
|
-
GET http://localhost:57374/api/openclaw/status
|
|
252
|
-
|
|
253
|
-
# Send message to OpenClaw server
|
|
254
|
-
POST http://localhost:57374/api/openclaw/send
|
|
255
|
-
{
|
|
256
|
-
"message_type": "task_offer",
|
|
257
|
-
"payload": {...}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
# Query capabilities
|
|
261
|
-
GET http://localhost:57374/api/openclaw/capabilities
|
|
262
|
-
|
|
263
|
-
# Get received messages
|
|
264
|
-
GET http://localhost:57374/api/openclaw/messages?limit=50
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
## CLI Commands
|
|
268
|
-
|
|
269
|
-
```bash
|
|
270
|
-
# Check OpenClaw connection status
|
|
271
|
-
loki openclaw status
|
|
272
|
-
|
|
273
|
-
# Send test message
|
|
274
|
-
loki openclaw test
|
|
275
|
-
|
|
276
|
-
# List received messages
|
|
277
|
-
loki openclaw messages
|
|
278
|
-
|
|
279
|
-
# Query registered agents
|
|
280
|
-
loki openclaw agents
|
|
281
|
-
|
|
282
|
-
# Disconnect from OpenClaw
|
|
283
|
-
loki openclaw disconnect
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
## Examples
|
|
287
|
-
|
|
288
|
-
### Multi-System Workflow
|
|
289
|
-
|
|
290
|
-
```
|
|
291
|
-
MetaGPT (Planning)
|
|
292
|
-
↓
|
|
293
|
-
Sends task via OpenClaw
|
|
294
|
-
↓
|
|
295
|
-
Loki Mode (Implementation)
|
|
296
|
-
↓
|
|
297
|
-
Sends result via OpenClaw
|
|
298
|
-
↓
|
|
299
|
-
AutoGPT (Testing)
|
|
300
|
-
↓
|
|
301
|
-
Sends report via OpenClaw
|
|
302
|
-
↓
|
|
303
|
-
CrewAI (Deployment)
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### Task Distribution
|
|
307
|
-
|
|
308
|
-
```yaml
|
|
309
|
-
# Distribute tasks across multiple Loki instances
|
|
310
|
-
openclaw:
|
|
311
|
-
enabled: true
|
|
312
|
-
endpoint: http://openclaw-lb:8080
|
|
313
|
-
features:
|
|
314
|
-
task_sharing: true
|
|
315
|
-
|
|
316
|
-
# Loki instance 1 (frontend)
|
|
317
|
-
agents:
|
|
318
|
-
- eng-frontend
|
|
319
|
-
- eng-mobile
|
|
320
|
-
|
|
321
|
-
# Loki instance 2 (backend)
|
|
322
|
-
agents:
|
|
323
|
-
- eng-backend
|
|
324
|
-
- eng-database
|
|
325
|
-
|
|
326
|
-
# Loki instance 3 (ops)
|
|
327
|
-
agents:
|
|
328
|
-
- ops-devops
|
|
329
|
-
- ops-sre
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### Cross-Framework Integration
|
|
333
|
-
|
|
334
|
-
```python
|
|
335
|
-
# AutoGPT sending task to Loki via OpenClaw
|
|
336
|
-
import requests
|
|
337
|
-
|
|
338
|
-
openclaw_url = "http://openclaw-server:8080/tasks"
|
|
339
|
-
task = {
|
|
340
|
-
"task_type": "code_review",
|
|
341
|
-
"description": "Review API implementation",
|
|
342
|
-
"files": ["api/routes.py"],
|
|
343
|
-
"target_agent": "loki-12345"
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
response = requests.post(openclaw_url, json=task)
|
|
347
|
-
print(f"Task sent: {response.json()}")
|
|
348
|
-
|
|
349
|
-
# Wait for completion
|
|
350
|
-
task_id = response.json()["task_id"]
|
|
351
|
-
while True:
|
|
352
|
-
status = requests.get(f"{openclaw_url}/{task_id}").json()
|
|
353
|
-
if status["status"] == "completed":
|
|
354
|
-
print(f"Result: {status['result']}")
|
|
355
|
-
break
|
|
356
|
-
time.sleep(10)
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
## OpenClaw Server Setup
|
|
360
|
-
|
|
361
|
-
### Docker Deployment
|
|
362
|
-
|
|
363
|
-
```yaml
|
|
364
|
-
# docker-compose.yml
|
|
365
|
-
version: '3.8'
|
|
366
|
-
services:
|
|
367
|
-
openclaw-server:
|
|
368
|
-
image: openclaw/server:latest
|
|
369
|
-
ports:
|
|
370
|
-
- "8080:8080"
|
|
371
|
-
environment:
|
|
372
|
-
- OPENCLAW_LOG_LEVEL=info
|
|
373
|
-
- OPENCLAW_AUTH_ENABLED=false
|
|
374
|
-
volumes:
|
|
375
|
-
- openclaw-data:/data
|
|
27
|
+
> NOTE: This is a foundation/skeleton. The WebSocket gateway client is not yet
|
|
28
|
+
> implemented. Currently logs mapped events to stdout as JSON for testing.
|
|
29
|
+
> The --gateway flag is accepted but has no effect until the WebSocket client
|
|
30
|
+
> is built in a future phase.
|
|
376
31
|
|
|
377
|
-
|
|
378
|
-
image: asklokesh/loki-mode:latest
|
|
379
|
-
environment:
|
|
380
|
-
- LOKI_OPENCLAW_ENABLED=true
|
|
381
|
-
- LOKI_OPENCLAW_ENDPOINT=http://openclaw-server:8080
|
|
382
|
-
- LOKI_OPENCLAW_AGENT_ID=loki-frontend
|
|
383
|
-
depends_on:
|
|
384
|
-
- openclaw-server
|
|
385
|
-
|
|
386
|
-
loki-mode-2:
|
|
387
|
-
image: asklokesh/loki-mode:latest
|
|
388
|
-
environment:
|
|
389
|
-
- LOKI_OPENCLAW_ENABLED=true
|
|
390
|
-
- LOKI_OPENCLAW_ENDPOINT=http://openclaw-server:8080
|
|
391
|
-
- LOKI_OPENCLAW_AGENT_ID=loki-backend
|
|
392
|
-
depends_on:
|
|
393
|
-
- openclaw-server
|
|
394
|
-
|
|
395
|
-
volumes:
|
|
396
|
-
openclaw-data:
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
### Kubernetes Deployment
|
|
400
|
-
|
|
401
|
-
```yaml
|
|
402
|
-
apiVersion: v1
|
|
403
|
-
kind: Service
|
|
404
|
-
metadata:
|
|
405
|
-
name: openclaw-server
|
|
406
|
-
spec:
|
|
407
|
-
selector:
|
|
408
|
-
app: openclaw
|
|
409
|
-
ports:
|
|
410
|
-
- port: 8080
|
|
411
|
-
---
|
|
412
|
-
apiVersion: apps/v1
|
|
413
|
-
kind: Deployment
|
|
414
|
-
metadata:
|
|
415
|
-
name: openclaw-server
|
|
416
|
-
spec:
|
|
417
|
-
replicas: 3
|
|
418
|
-
selector:
|
|
419
|
-
matchLabels:
|
|
420
|
-
app: openclaw
|
|
421
|
-
template:
|
|
422
|
-
metadata:
|
|
423
|
-
labels:
|
|
424
|
-
app: openclaw
|
|
425
|
-
spec:
|
|
426
|
-
containers:
|
|
427
|
-
- name: openclaw
|
|
428
|
-
image: openclaw/server:latest
|
|
429
|
-
ports:
|
|
430
|
-
- containerPort: 8080
|
|
431
|
-
env:
|
|
432
|
-
- name: OPENCLAW_REDIS_URL
|
|
433
|
-
value: redis://redis:6379
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
## Security
|
|
437
|
-
|
|
438
|
-
### Authentication
|
|
32
|
+
Run it directly, not through `loki`:
|
|
439
33
|
|
|
440
34
|
```bash
|
|
441
|
-
|
|
442
|
-
export LOKI_OPENCLAW_AUTH_TOKEN=your-secret-token
|
|
443
|
-
|
|
444
|
-
# Or use mutual TLS
|
|
445
|
-
export LOKI_OPENCLAW_TLS_CERT=/path/to/client-cert.pem
|
|
446
|
-
export LOKI_OPENCLAW_TLS_KEY=/path/to/client-key.pem
|
|
447
|
-
export LOKI_OPENCLAW_TLS_CA=/path/to/ca-cert.pem
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
### Authorization
|
|
451
|
-
|
|
452
|
-
```yaml
|
|
453
|
-
openclaw:
|
|
454
|
-
authorization:
|
|
455
|
-
enabled: true
|
|
456
|
-
allowed_agents:
|
|
457
|
-
- autogpt-production
|
|
458
|
-
- metagpt-staging
|
|
459
|
-
allowed_namespaces:
|
|
460
|
-
- production
|
|
461
|
-
- staging
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
### Encryption
|
|
465
|
-
|
|
466
|
-
```bash
|
|
467
|
-
# Use HTTPS for OpenClaw endpoint
|
|
468
|
-
export LOKI_OPENCLAW_ENDPOINT=https://openclaw-server:8443
|
|
469
|
-
|
|
470
|
-
# Enable message encryption
|
|
471
|
-
export LOKI_OPENCLAW_ENCRYPT_MESSAGES=true
|
|
472
|
-
export LOKI_OPENCLAW_ENCRYPTION_KEY=your-encryption-key
|
|
35
|
+
python -m integrations.openclaw.bridge --loki-dir .loki
|
|
473
36
|
```
|
|
474
37
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
```
|
|
482
|
-
loki_openclaw_connected{agent_id="loki-12345"} 1
|
|
483
|
-
loki_openclaw_messages_sent_total{type="task_offer"} 42
|
|
484
|
-
loki_openclaw_messages_received_total{type="task_accept"} 38
|
|
485
|
-
loki_openclaw_tasks_completed_total 35
|
|
486
|
-
loki_openclaw_latency_seconds{operation="send"} 0.015
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
### Health Checks
|
|
490
|
-
|
|
491
|
-
```bash
|
|
492
|
-
# Check OpenClaw connection
|
|
493
|
-
curl http://localhost:57374/api/openclaw/health
|
|
494
|
-
|
|
495
|
-
# Response
|
|
496
|
-
{
|
|
497
|
-
"connected": true,
|
|
498
|
-
"server": "http://openclaw-server:8080",
|
|
499
|
-
"last_heartbeat": "2026-02-15T14:30:00Z",
|
|
500
|
-
"latency_ms": 15,
|
|
501
|
-
"messages_pending": 0
|
|
502
|
-
}
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
## Troubleshooting
|
|
506
|
-
|
|
507
|
-
### Connection Issues
|
|
508
|
-
|
|
509
|
-
```bash
|
|
510
|
-
# Test OpenClaw server connectivity
|
|
511
|
-
curl http://openclaw-server:8080/health
|
|
512
|
-
|
|
513
|
-
# Check Loki OpenClaw status
|
|
514
|
-
loki openclaw status
|
|
515
|
-
|
|
516
|
-
# View connection logs
|
|
517
|
-
loki enterprise audit tail --event openclaw.connect
|
|
518
|
-
|
|
519
|
-
# Reconnect manually
|
|
520
|
-
loki openclaw reconnect
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
### Message Delivery Failures
|
|
524
|
-
|
|
525
|
-
```bash
|
|
526
|
-
# Check message queue
|
|
527
|
-
loki openclaw messages --status failed
|
|
528
|
-
|
|
529
|
-
# Retry failed messages
|
|
530
|
-
loki openclaw retry
|
|
531
|
-
|
|
532
|
-
# View OpenClaw logs
|
|
533
|
-
docker logs openclaw-server
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
### Performance Issues
|
|
537
|
-
|
|
538
|
-
```bash
|
|
539
|
-
# Check message latency
|
|
540
|
-
curl http://localhost:57374/metrics | grep loki_openclaw_latency
|
|
541
|
-
|
|
542
|
-
# Monitor message queue size
|
|
543
|
-
loki openclaw status | grep messages_pending
|
|
544
|
-
|
|
545
|
-
# Increase heartbeat interval to reduce traffic
|
|
546
|
-
export LOKI_OPENCLAW_HEARTBEAT=60
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
## Best Practices
|
|
550
|
-
|
|
551
|
-
1. **Use namespaces** to isolate environments (dev, staging, production)
|
|
552
|
-
2. **Enable authentication** in production deployments
|
|
553
|
-
3. **Monitor message latency** and set appropriate timeouts
|
|
554
|
-
4. **Implement retry logic** for transient failures
|
|
555
|
-
5. **Use task priorities** for critical workloads
|
|
556
|
-
6. **Set up health checks** for automatic reconnection
|
|
557
|
-
7. **Log all OpenClaw messages** for audit trail
|
|
558
|
-
|
|
559
|
-
## Limitations
|
|
38
|
+
**2. An OpenClaw skill package** at `integrations/openclaw/`, which you copy
|
|
39
|
+
into an OpenClaw workspace so an OpenClaw agent can invoke the ordinary
|
|
40
|
+
`loki start` / `loki status --json` CLI on your behalf. See
|
|
41
|
+
[`integrations/openclaw/README.md`](../integrations/openclaw/README.md) for the
|
|
42
|
+
install steps and the two helper scripts (`poll-status.sh`,
|
|
43
|
+
`format-progress.sh`).
|
|
560
44
|
|
|
561
|
-
|
|
562
|
-
- Not all agent frameworks support OpenClaw yet
|
|
563
|
-
- Message size limited to 1MB
|
|
564
|
-
- Synchronous task completion only (async planned for v2.0)
|
|
565
|
-
- No built-in conflict resolution for complex state updates
|
|
45
|
+
## If you need real multi-agent coordination today
|
|
566
46
|
|
|
567
|
-
|
|
47
|
+
Use the surfaces that are actually implemented and tested:
|
|
568
48
|
|
|
569
|
-
-
|
|
570
|
-
-
|
|
571
|
-
|
|
572
|
-
-
|
|
49
|
+
- The MCP server (`loki mcp`) exposes Loki's tools to any MCP client.
|
|
50
|
+
- `.loki/events.jsonl` is the durable event stream the bridge skeleton reads;
|
|
51
|
+
anything that can tail a JSONL file can consume it.
|
|
52
|
+
- `loki status --json` is the supported programmatic status surface.
|
package/docs/show-hn-post.md
CHANGED
|
@@ -10,9 +10,9 @@ I built Loki Mode because I got tired of the copy-paste loop between AI coding a
|
|
|
10
10
|
|
|
11
11
|
**What it does:** You give it a Product Requirements Document. It breaks the work into tasks across 41 specialized agent roles organized into 8 domains (engineering, operations, business, data, product, growth, review, orchestration) -- prompt-defined specifications the orchestrator adopts per phase, with parallel review (blind council) and optional worktree streams on Claude Code, sequential on other providers -- and runs every iteration through a self-verification loop called RARV: Reason, Act, Reflect, Verify. The idea is that the system catches its own mistakes before you have to.
|
|
12
12
|
|
|
13
|
-
**Quality gates:**
|
|
13
|
+
**Quality gates:** 8 automated gates including 3-reviewer blind review (agents review each other's work without seeing prior reviews), anti-sycophancy checks (a devil's advocate pass on unanimous approvals), and mock/mutation detection. These are not foolproof, but they catch a surprising number of issues that single-pass generation misses.
|
|
14
14
|
|
|
15
|
-
**Multi-provider:** Runs on Claude Code (full parallel agent support), OpenAI Codex CLI, or
|
|
15
|
+
**Multi-provider:** Runs on Claude Code (full parallel agent support), Cline, OpenAI Codex CLI, Aider, or opencode. Everything other than Claude Code runs in degraded sequential mode -- no parallel agents, no Task tool. Claude Code is the primary target. (The Google Gemini CLI provider was removed in v7.5.18 after Google deprecated it upstream.)
|
|
16
16
|
|
|
17
17
|
**Memory:** 3-tier system (episodic, semantic, procedural) so the system can learn from previous runs. Optional vector search with sentence-transformers if you want similarity-based retrieval.
|
|
18
18
|
|