lazyclaw 4.2.2 → 5.0.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.ko.md +44 -0
- package/README.md +172 -353
- package/agents.mjs +19 -3
- package/channels/handoff.mjs +41 -0
- package/channels/loader.mjs +124 -0
- package/channels/matrix.mjs +417 -0
- package/channels/telegram.mjs +362 -0
- package/channels/threads.mjs +116 -0
- package/cli.mjs +730 -27
- package/daemon.mjs +111 -0
- package/gateway/device_auth.mjs +664 -0
- package/gateway/http_gateway.mjs +304 -0
- package/mas/agent_memory.mjs +35 -34
- package/mas/agent_turn.mjs +30 -1
- package/mas/confidence.mjs +108 -0
- package/mas/index_db.mjs +242 -0
- package/mas/mention_router.mjs +75 -4
- package/mas/nudge.mjs +97 -0
- package/mas/prompt_stack.mjs +80 -0
- package/mas/provider_adapters.mjs +83 -0
- package/mas/redact.mjs +46 -0
- package/mas/skill_synth.mjs +331 -0
- package/mas/tool_runner.mjs +19 -48
- package/mas/tools/browser.mjs +77 -0
- package/mas/tools/clarify.mjs +36 -0
- package/mas/tools/coding.mjs +109 -0
- package/mas/tools/delegation.mjs +53 -0
- package/mas/tools/edit.mjs +36 -0
- package/mas/tools/git.mjs +110 -0
- package/mas/tools/ha.mjs +34 -0
- package/mas/tools/learning.mjs +168 -0
- package/mas/tools/media.mjs +105 -0
- package/mas/tools/os.mjs +152 -0
- package/mas/tools/patch.mjs +91 -0
- package/mas/tools/recall.mjs +103 -0
- package/mas/tools/registry.mjs +93 -0
- package/mas/tools/scheduling.mjs +62 -0
- package/mas/tools/skill_view.mjs +43 -0
- package/mas/tools/web.mjs +137 -0
- package/mas/toolsets.mjs +64 -0
- package/mas/trajectory_export.mjs +169 -0
- package/mas/trajectory_store.mjs +179 -0
- package/mas/user_modeler.mjs +108 -0
- package/package.json +22 -3
- package/providers/codex_cli.mjs +200 -0
- package/providers/gemini_cli.mjs +179 -0
- package/providers/registry.mjs +61 -1
- package/sandbox/base.mjs +82 -0
- package/sandbox/confiners/bubblewrap.mjs +21 -0
- package/sandbox/confiners/firejail.mjs +16 -0
- package/sandbox/confiners/landlock.mjs +14 -0
- package/sandbox/confiners/seatbelt.mjs +28 -0
- package/sandbox/daytona.mjs +37 -0
- package/sandbox/docker.mjs +91 -0
- package/sandbox/index.mjs +67 -0
- package/sandbox/local.mjs +59 -0
- package/sandbox/modal.mjs +53 -0
- package/sandbox/singularity.mjs +39 -0
- package/sandbox/ssh.mjs +56 -0
- package/sandbox.mjs +11 -127
- package/scripts/hermes-import.mjs +111 -0
- package/scripts/migrate-v5.mjs +342 -0
- package/scripts/openclaw-import.mjs +71 -0
- package/sessions.mjs +20 -1
- package/skills.mjs +101 -8
- package/skills_curator.mjs +323 -0
- package/workspace.mjs +18 -3
package/README.md
CHANGED
|
@@ -1,427 +1,246 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lazyclaw
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](./LICENSE)
|
|
5
|
-
[](https://nodejs.org/)
|
|
3
|
+
<img src="docs/assets/sleepy-sloth-source.png" alt="lazyclaw sloth" width="120" align="right">
|
|
6
4
|
|
|
7
|
-
**A
|
|
5
|
+
**A terminal agent whose learning loop runs free on your Claude Pro subscription.**
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
Chat with any provider. Train the skill bank, user model, and reflection pass on `claude-cli` — $0. One SQLite + FTS5 store remembers every session. Hand the same conversation off between TUI, Slack, Discord, Telegram, Matrix, Email, and Voice.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/lazyclaw)
|
|
10
|
+
[](https://nodejs.org/)
|
|
11
|
+
[](./LICENSE)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npx lazyclaw onboard # 15 seconds to a working CLI
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
<img src="docs/screenshots/help.png" alt="lazyclaw subcommand reference" width="820">
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
*한국어: [README.ko.md](./README.ko.md)*
|
|
16
20
|
|
|
17
21
|
---
|
|
18
22
|
|
|
19
|
-
##
|
|
23
|
+
## Why lazyclaw
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
npm install -g lazyclaw
|
|
23
|
-
lazyclaw version
|
|
24
|
-
```
|
|
25
|
+
Four things no other terminal agent CLI does together:
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
1. **Split chat and trainer providers.** Pay-per-token for chat, $0 subscription for the learning loop. Or vice versa.
|
|
28
|
+
2. **Recall across every CLI.** One FTS5 index over sessions, skills, trajectories, and memory.
|
|
29
|
+
3. **Cross-channel handoff.** `/handoff slack <channel-id>` moves the live conversation; context follows.
|
|
30
|
+
4. **Six sandbox backends, one API.** `local` / `docker` / `ssh` / `singularity` / `modal` / `daytona`.
|
|
27
31
|
|
|
28
|
-
##
|
|
32
|
+
## Known limitations (v5.1 roadmap)
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
lazyclaw onboard # arrow-key picker; defaults to claude-cli (no key)
|
|
32
|
-
lazyclaw status # current provider/model + masked key
|
|
33
|
-
lazyclaw doctor # validate config + provider registry
|
|
34
|
-
```
|
|
34
|
+
Calibrate expectations before reading the rest:
|
|
35
35
|
|
|
36
|
-
`
|
|
36
|
+
- `recall` is callable from inside chat today; the top-level `lazyclaw recall ...` CLI shape ships in v5.1.
|
|
37
|
+
- `lazyclaw sandbox` exposes `list | test | add | use`; the `sandbox run --backend ...` shape lands in v5.1.
|
|
38
|
+
- `codex-cli` and `gemini-cli` provider modules are tracked but not yet registered in the main runtime.
|
|
39
|
+
- E2E matrix ships with 32 of 48 flows marked `test.skip` pending v5.1 wiring; the min-green-set is documented in `tests/e2e/phaseH-e2e-matrix.spec.ts`.
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
## Install
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
```bash
|
|
44
|
+
# Try it (no install)
|
|
45
|
+
npx lazyclaw onboard && lazyclaw chat
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
# Keep it
|
|
48
|
+
npm install -g lazyclaw
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
# Hack on it
|
|
51
|
+
git clone https://github.com/cmblir/lazyclaw && cd lazyclaw
|
|
52
|
+
npm install && npm link
|
|
53
|
+
```
|
|
45
54
|
|
|
46
55
|
```bash
|
|
47
|
-
lazyclaw
|
|
48
|
-
|
|
49
|
-
# → { provider: "claude-cli", model: "claude-opus-4-7", hasApiKey: false }
|
|
56
|
+
lazyclaw version
|
|
57
|
+
# → { "version": "5.0.0", "nodeVersion": "v20.11.0", "platform": "darwin" }
|
|
50
58
|
```
|
|
51
59
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Pay-per-token mode (API key)
|
|
60
|
+
Requires **Node 18+**. macOS / Linux / WSL are first-class. Native PowerShell runs but ghost-text and the ANSI banner fall back to plain prompts.
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
## First run
|
|
57
63
|
|
|
58
64
|
```bash
|
|
59
|
-
lazyclaw onboard
|
|
60
|
-
|
|
65
|
+
lazyclaw onboard # arrow-key picker; defaults to claude-cli (no key)
|
|
66
|
+
# → writes ~/.lazyclaw/config.json
|
|
61
67
|
```
|
|
62
68
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
### Built-in OpenAI-compatible vendors
|
|
66
|
-
|
|
67
|
-
Eight popular OpenAI-compatible services ship as first-class providers — pick one in the setup picker (no `+ Add custom` walkthrough needed) or set the matching environment variable and they Just Work:
|
|
68
|
-
|
|
69
|
-
| Provider | Models include | Env var |
|
|
70
|
-
|---|---|---|
|
|
71
|
-
| `nim` | `meta/llama-3.1-405b-instruct`, `nvidia/llama-3.1-nemotron-70b-instruct`, `deepseek-ai/deepseek-r1`, `mistralai/mixtral-8x22b-instruct-v0.1` | `NVIDIA_API_KEY` (or `NIM_API_KEY`) |
|
|
72
|
-
| `openrouter` | `anthropic/claude-3.5-sonnet`, `openai/gpt-4o`, `meta-llama/llama-3.1-405b-instruct`, `deepseek/deepseek-r1` | `OPENROUTER_API_KEY` |
|
|
73
|
-
| `groq` | `llama-3.3-70b-versatile`, `mixtral-8x7b-32768`, `deepseek-r1-distill-llama-70b` | `GROQ_API_KEY` |
|
|
74
|
-
| `together` | `meta-llama/Llama-3.3-70B-Instruct-Turbo`, `Qwen/Qwen2.5-72B-Instruct-Turbo`, `deepseek-ai/DeepSeek-V3` | `TOGETHER_API_KEY` |
|
|
75
|
-
| `xai` | `grok-2-latest`, `grok-2-vision-1212` | `XAI_API_KEY` (or `GROK_API_KEY`) |
|
|
76
|
-
| `deepseek` | `deepseek-chat`, `deepseek-reasoner` | `DEEPSEEK_API_KEY` |
|
|
77
|
-
| `mistral` | `mistral-large-latest`, `codestral-latest`, `pixtral-large-latest` | `MISTRAL_API_KEY` |
|
|
78
|
-
| `fireworks` | `accounts/fireworks/models/llama-v3p3-70b-instruct`, `…/deepseek-r1` | `FIREWORKS_API_KEY` |
|
|
69
|
+
<img src="docs/screenshots/onboard.png" alt="lazyclaw onboard --non-interactive" width="720">
|
|
79
70
|
|
|
80
71
|
```bash
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
lazyclaw chat --provider nim --model meta/llama-3.1-405b-instruct
|
|
84
|
-
|
|
85
|
-
# Or commit the choice to ~/.lazyclaw/config.json
|
|
86
|
-
lazyclaw onboard --non-interactive --provider nim \
|
|
87
|
-
--model nvidia/llama-3.1-nemotron-70b-instruct --api-key nvapi-...
|
|
72
|
+
lazyclaw status # → { provider, model, hasApiKey }
|
|
73
|
+
lazyclaw doctor # validates config + provider registry + index.db
|
|
88
74
|
```
|
|
89
75
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
### `orchestrator` — multi-agent dispatch as a provider
|
|
93
|
-
|
|
94
|
-
`orchestrator` is a synthetic provider that composes the others. A chat message hitting `PROVIDERS.orchestrator` triggers a three-phase pipeline instead of a single 1:1 call:
|
|
76
|
+
Move the config dir with `LAZYCLAW_CONFIG_DIR=/elsewhere`. For automation, add `--non-interactive --provider X --model Y [--api-key Z]`.
|
|
95
77
|
|
|
96
|
-
|
|
97
|
-
2. **EXECUTE** — each subtask is dispatched round-robin across the *workers*. Replies stream inline so you watch progress in real time.
|
|
98
|
-
3. **SYNTHESIS** — the planner re-enters with every worker's output and writes the final user-facing answer.
|
|
78
|
+
## The trainer split — $0 learning on your Claude Pro subscription
|
|
99
79
|
|
|
100
|
-
|
|
80
|
+
v5 separates two provider slots in your config: `provider` (chat — the hot path) and `trainer.provider` (skill synthesis, user-model updates, reflection — bursty, cheap). They are wired independently, so a Pro/Max subscription can power the learning loop while chat runs through any provider, paid or local. lazyclaw is the **only** terminal agent CLI that splits these two roles.
|
|
101
81
|
|
|
102
|
-
```
|
|
82
|
+
```jsonc
|
|
83
|
+
// ~/.lazyclaw/config.json
|
|
103
84
|
{
|
|
104
|
-
"provider": "
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"nim:meta/llama-3.1-405b-instruct"
|
|
112
|
-
],
|
|
113
|
-
"maxSubtasks": 5
|
|
85
|
+
"provider": "openai", // chat: pay-per-token
|
|
86
|
+
"model": "gpt-4.1",
|
|
87
|
+
"trainer": {
|
|
88
|
+
"provider": "claude-cli", // trainer: $0 on Pro/Max
|
|
89
|
+
"model": "claude-haiku-4-5",
|
|
90
|
+
"schedule": "nightly",
|
|
91
|
+
"budget": { "maxCallsPerDay": 200, "usdPerDay": 0.50 }
|
|
114
92
|
}
|
|
115
93
|
}
|
|
116
94
|
```
|
|
117
95
|
|
|
118
|
-
|
|
96
|
+
The canonical default is `trainer.provider = "auto"` — resolves to `claude-cli` when a Pro/Max session is detected, else mirrors the chat provider.
|
|
119
97
|
|
|
120
|
-
|
|
98
|
+
**Three configs covering the common cases:**
|
|
121
99
|
|
|
122
|
-
|
|
100
|
+
| Setup | `provider` | `trainer.provider` | Cost |
|
|
101
|
+
|---|---|---|---|
|
|
102
|
+
| Subscription only | `claude-cli` | `claude-cli` | $0 |
|
|
103
|
+
| Hybrid (recommended) | `openai` / any | `claude-cli` | chat-only |
|
|
104
|
+
| Pure API | `openai` / any | `openai` / any | both metered |
|
|
123
105
|
|
|
124
|
-
|
|
125
|
-
lazyclaw orchestrator status
|
|
126
|
-
lazyclaw orchestrator set-planner claude-cli:claude-opus-4-7
|
|
127
|
-
lazyclaw orchestrator workers add openai:gpt-4o
|
|
128
|
-
lazyclaw orchestrator workers add gemini:gemini-2.5-pro
|
|
129
|
-
lazyclaw orchestrator workers set claude-cli:claude-sonnet-4-6,nim:meta/llama-3.1-405b-instruct # bulk replace
|
|
130
|
-
lazyclaw orchestrator set-max-subtasks 5
|
|
131
|
-
lazyclaw orchestrator clear # wipe cfg.orchestrator
|
|
132
|
-
lazyclaw config set provider orchestrator # route chats through it
|
|
133
|
-
```
|
|
106
|
+
Full JSONC examples and the `auto` resolution rules: [docs/trainer-recipes.md](./docs/trainer-recipes.md).
|
|
134
107
|
|
|
135
|
-
##
|
|
108
|
+
## Provider matrix
|
|
136
109
|
|
|
137
|
-
|
|
110
|
+
| Chat provider | Trainer provider | Auth |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| `claude-cli` | `claude-cli` | subscription (Pro/Max) |
|
|
113
|
+
| `anthropic` | `anthropic` | API key |
|
|
114
|
+
| `openai` | `openai` | API key |
|
|
115
|
+
| `gemini` | `gemini` | API key |
|
|
116
|
+
| `ollama` | `ollama` | local (no key) |
|
|
117
|
+
| `nim` / `openrouter` / `groq` / `together` / `xai` / `deepseek` / `mistral` / `fireworks` | — | API key (OpenAI-compatible) |
|
|
138
118
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
| `Enter` | Run the highlighted item |
|
|
143
|
-
| `q` / `Esc` / `Ctrl-C` | Leave lazyclaw |
|
|
144
|
-
| `/` | Open an inline slash-command prompt |
|
|
119
|
+
Plus two meta-providers, usable in either slot:
|
|
120
|
+
- `orchestrator` — composes any of the above into a multi-agent pipeline ([docs/multi-agent.md](./docs/multi-agent.md))
|
|
121
|
+
- `custom` — any OpenAI-compatible v1 endpoint with your own base URL + key
|
|
145
122
|
|
|
146
|
-
|
|
123
|
+
<img src="docs/screenshots/providers.png" alt="lazyclaw providers info — model list + capabilities" width="720">
|
|
147
124
|
|
|
148
|
-
|
|
149
|
-
|---|---|
|
|
150
|
-
| `/exit` / `/quit` | Leave lazyclaw |
|
|
151
|
-
| `/help` | List launcher slash commands inline |
|
|
152
|
-
| `/version` | Print version + node + platform |
|
|
125
|
+
## What it ships
|
|
153
126
|
|
|
154
|
-
|
|
127
|
+
### Around 50 tools plus MCP
|
|
128
|
+
A unified registry covers fs, exec, web, os, coding, git (5 read + 2 sensitive), scheduling, delegation, media, ha, clarify, browser, and learning groups. Sensitive tools route through an approval hook. Bring external servers in over stdio MCP.
|
|
155
129
|
|
|
156
|
-
|
|
130
|
+
### Channels that hand off
|
|
131
|
+
First-class channels for Slack, Discord, Telegram, Matrix, Email, and Voice. Signal and WhatsApp ship as full implementations with external runtime dependencies (`signal-cli` for Signal; `whatsapp-web.js` browser automation with QR-on-first-run for WhatsApp). Move a live conversation between any two with `/handoff <target> <externalId>` — no other agent CLI does cross-channel handoff.
|
|
157
132
|
|
|
158
133
|
```bash
|
|
159
|
-
lazyclaw
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
lazyclaw chat --skill review,style # compose named skills as the system prompt
|
|
134
|
+
lazyclaw channels install @lazyclaw/channel-discord
|
|
135
|
+
# inside Slack: /handoff discord <channel-id>
|
|
136
|
+
# inside Discord: /handoff tui <thread-id>
|
|
163
137
|
```
|
|
164
138
|
|
|
165
|
-
|
|
139
|
+
Slack is built-in and does not need `channels install`. The plugin loader expects `@lazyclaw/channel-<name>` npm package names.
|
|
166
140
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
│ _ │
|
|
170
|
-
│ | |__ _ _____ _ _ │
|
|
171
|
-
│ | / _` |_ / || | '_| │
|
|
172
|
-
│ |_\__,_/__\_, |_| │
|
|
173
|
-
│ LazyClaw |__/ 3.99.11 │
|
|
174
|
-
╰──────────────────────────────╯
|
|
141
|
+
### Personas that compose
|
|
142
|
+
Swap personality per channel without losing session memory. Layers compose top-down: global SOUL → workspace SOUL → active personality → agent role → user model (USER.md) → skill bank → memory core → recent trajectory tail. See [docs/persona-cookbook.md](./docs/persona-cookbook.md).
|
|
175
143
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
slash · /help · /model · /provider · /exit
|
|
179
|
-
hint · → to accept the suggested command, Tab to cycle
|
|
144
|
+
### Loops and scheduled goals
|
|
145
|
+
Durable foreground or `--detach` loops; cron-scheduled goals with channel fan-out. State lives in `~/.lazyclaw/loops/<id>/` and survives restart. See [docs/loop-goal-preflight.md](./docs/loop-goal-preflight.md).
|
|
180
146
|
|
|
181
|
-
|
|
182
|
-
|
|
147
|
+
### A TUI that ghosts the right answer
|
|
148
|
+
Ink-based UI with two-column splash, sloth ASCII banner, Cursor-style ghost autocomplete (`→` accepts, `Tab` cycles), interrupt-and-redirect REPL, multiline editor, and a fixed 4-line footer with live cost rate cards.
|
|
183
149
|
|
|
184
|
-
|
|
150
|
+
## Command reference
|
|
185
151
|
|
|
186
|
-
|
|
|
152
|
+
| Command | Purpose |
|
|
187
153
|
|---|---|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
# Repeat one prompt N times against the active provider. Foreground
|
|
231
|
-
# blocks the terminal; --detach forks a worker and prints {loopId,
|
|
232
|
-
# pid, statePath}. Worker state under ~/.lazyclaw/loops/<id>/.
|
|
233
|
-
lazyclaw loop "fix the failing tests" --max 5 --until "DONE"
|
|
234
|
-
lazyclaw loop "ship checklist" --max 10 --detach --session daily
|
|
235
|
-
lazyclaw loops list
|
|
236
|
-
lazyclaw loops show <loopId>
|
|
237
|
-
lazyclaw loops tail <loopId>
|
|
238
|
-
lazyclaw loops kill <loopId> # SIGTERM; repeat within 5s for SIGKILL
|
|
239
|
-
|
|
240
|
-
# Goals: persistent objectives with optional cron schedule + channel fan-out.
|
|
241
|
-
lazyclaw goal add ship-v4 --desc "Ship v4" --cron "0 9 * * 1-5"
|
|
242
|
-
lazyclaw goal list
|
|
243
|
-
lazyclaw goal tick ship-v4 --force
|
|
244
|
-
lazyclaw goal channel add ship-v4 slack:#deploys
|
|
245
|
-
lazyclaw goal close ship-v4 done # also uninstalls the cron entry
|
|
246
|
-
|
|
247
|
-
# Memory: ~/.lazyclaw/memory/{core.md,recent.jsonl,episodic/*.md}
|
|
248
|
-
lazyclaw memory show core
|
|
249
|
-
lazyclaw memory show recent
|
|
250
|
-
lazyclaw memory dream # consolidate recent → episodic files
|
|
251
|
-
lazyclaw memory edit core # open $EDITOR
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
For Slack fan-out, set `SLACK_BOT_TOKEN` (xoxb-...) in `~/.lazyclaw/.env`.
|
|
255
|
-
Tokens never appear in goal records or logs. Socket Mode inbound also
|
|
256
|
-
needs `SLACK_APP_TOKEN` (xapp-...) and `SLACK_SIGNING_SECRET`.
|
|
257
|
-
|
|
258
|
-
## Multi-agent Slack teams (v4.1)
|
|
259
|
-
|
|
260
|
-
Drive a small team of named agents through a single Slack thread. The
|
|
261
|
-
lead agent receives the user's request, decides who else on the team
|
|
262
|
-
should weigh in, `@mentions` them, and the router runs each mentioned
|
|
263
|
-
agent in turn through the full tool-use loop (bash / read / write /
|
|
264
|
-
grep) before handing control back. The thread terminates when the lead
|
|
265
|
-
emits the literal marker `[[TASK_DONE]]` or the per-task iteration
|
|
266
|
-
budget runs out. Each agent's reply is mirrored into the Slack thread
|
|
267
|
-
under its own persona (`chat:write.customize` makes the username + icon
|
|
268
|
-
match the agent in Slack's UI).
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
# 1) Register agents — system prompt + provider + per-agent tool whitelist
|
|
272
|
-
lazyclaw agent add planner --role "Project planner" --provider anthropic --model claude-opus-4-7
|
|
273
|
-
lazyclaw agent add backend --role "Backend engineer" --provider anthropic --model claude-opus-4-7
|
|
274
|
-
lazyclaw agent add frontend --role "Frontend engineer" --provider openai --model gpt-4.1
|
|
275
|
-
lazyclaw agent list
|
|
276
|
-
|
|
277
|
-
# 2) Group them into a team that talks in a specific Slack channel
|
|
278
|
-
lazyclaw team add shop --agents planner,backend,frontend --lead planner --channel '#shop'
|
|
279
|
-
|
|
280
|
-
# 3) Open a task — posts a root message into the team's channel, returns
|
|
281
|
-
# the task id and the Slack thread_ts.
|
|
282
|
-
lazyclaw task start --team shop --title "ship checkout flow" --description "MVP scope"
|
|
283
|
-
|
|
284
|
-
# 4) Drive one user turn through the mention router. The lead replies,
|
|
285
|
-
# @mentions teammates, they run tool-use loops, hand back to the lead.
|
|
286
|
-
lazyclaw task tick t_20260518_xxxxxx "go" --max-turns 12
|
|
287
|
-
|
|
288
|
-
# 5) Inspect the conversation (text, markdown, or raw JSON)
|
|
289
|
-
lazyclaw task transcript t_20260518_xxxxxx --format md > thread.md
|
|
290
|
-
lazyclaw task show t_20260518_xxxxxx
|
|
291
|
-
lazyclaw task done t_20260518_xxxxxx # or `abandon` — also posts a closing message
|
|
292
|
-
|
|
293
|
-
# 6) Agent memory carries lessons forward across tasks (v4.2). The
|
|
294
|
-
# router auto-fires a ≤6-bullet reflection per participating agent
|
|
295
|
-
# when a task transitions to done. Manual control:
|
|
296
|
-
lazyclaw agent memory show planner
|
|
297
|
-
lazyclaw agent memory edit planner # opens $EDITOR
|
|
298
|
-
lazyclaw agent memory clear planner
|
|
299
|
-
lazyclaw agent reflect planner --task t_20260518_xxxxxx
|
|
300
|
-
# Flip auto reflection off per agent: edit ~/.lazyclaw/agents/<name>.json
|
|
301
|
-
# and set "memoryWrite": "off" (other values: "auto" default, "manual").
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Slack inbound (a user pings `@lazyclaw` in a channel, the bot replies)
|
|
305
|
-
runs through the Socket Mode listener:
|
|
306
|
-
|
|
307
|
-
```bash
|
|
308
|
-
lazyclaw slack listen # foreground; connects, reacts with :eyes:, replies in thread
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
The CLI is mirrored by daemon HTTP routes (`GET/POST/PATCH/DELETE
|
|
312
|
-
/agents|teams|tasks`, `GET /tasks/<id>/transcript`) and by the
|
|
313
|
-
browser dashboard's Agents / Teams / Tasks tabs:
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
lazyclaw dashboard # opens http://127.0.0.1:<port>/ in the default browser
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
Slack app prerequisites — bot token scopes `app_mentions:read`,
|
|
320
|
-
`chat:write`, `chat:write.customize`, `im:history`, `im:read`,
|
|
321
|
-
`im:write`, `channels:history`, `reactions:write`; Socket Mode enabled;
|
|
322
|
-
app token scope `connections:write`; invite the bot into every team
|
|
323
|
-
channel. Tokens live exclusively in `~/.lazyclaw/.env` and never appear
|
|
324
|
-
in agent/team/task records or logs.
|
|
325
|
-
|
|
326
|
-
For the full data model + phase plan, see `docs/multi-agent.md`.
|
|
327
|
-
|
|
328
|
-
## Providers / sessions / skills
|
|
329
|
-
|
|
330
|
-
```bash
|
|
331
|
-
lazyclaw providers list # all registered providers
|
|
332
|
-
lazyclaw providers info anthropic
|
|
333
|
-
lazyclaw providers test anthropic # 1-token reachability probe
|
|
334
|
-
|
|
335
|
-
lazyclaw sessions list # persisted chats
|
|
336
|
-
lazyclaw sessions show daily
|
|
337
|
-
lazyclaw sessions search "deploy"
|
|
338
|
-
lazyclaw sessions export daily > daily.md
|
|
339
|
-
lazyclaw sessions clear daily
|
|
340
|
-
|
|
341
|
-
lazyclaw skills list # markdown skill bundles
|
|
342
|
-
lazyclaw skills show review
|
|
343
|
-
lazyclaw skills install ./my-skill.md
|
|
344
|
-
lazyclaw skills remove review
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
<img src="docs/screenshots/providers.png" alt="lazyclaw providers info anthropic — model list + capabilities" width="760">
|
|
348
|
-
|
|
349
|
-
## Workflows (DAG / sequential / persistent)
|
|
350
|
-
|
|
351
|
-
```bash
|
|
352
|
-
lazyclaw run my-job ./flow.mjs # sequential, resumable
|
|
353
|
-
lazyclaw run my-job ./flow.mjs --parallel --concurrency 4 # in-memory DAG
|
|
354
|
-
lazyclaw run my-job ./flow.mjs --parallel-persistent # DAG + checkpoints
|
|
355
|
-
lazyclaw resume my-job ./flow.mjs # resume a stalled run
|
|
356
|
-
|
|
357
|
-
lazyclaw inspect # list every session
|
|
358
|
-
lazyclaw inspect my-job --summary
|
|
359
|
-
lazyclaw inspect my-job --critical-path ./flow.mjs # bottleneck finder
|
|
360
|
-
lazyclaw inspect my-job --slowest 5
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
State at `./.workflow-state/<id>/` (override with `LAZYCLAW_WORKFLOW_STATE_DIR=...`).
|
|
364
|
-
|
|
365
|
-
## Local HTTP gateway
|
|
366
|
-
|
|
367
|
-
```bash
|
|
368
|
-
lazyclaw daemon # bind a free port; prints { port, url }
|
|
369
|
-
lazyclaw daemon --port 19600
|
|
370
|
-
lazyclaw daemon --auth-token $(openssl rand -hex 16)
|
|
371
|
-
lazyclaw daemon --rate-limit 60 --log info # 60 req/min/IP, JSON access logs
|
|
372
|
-
lazyclaw daemon --once # serve a single request, then exit
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
## Cost rate cards
|
|
376
|
-
|
|
377
|
-
```bash
|
|
378
|
-
lazyclaw rates list
|
|
379
|
-
lazyclaw rates set anthropic/claude-opus-4-7 \
|
|
380
|
-
--in 15 --out 75 --cache-read 1.5 --cache-create 18.75
|
|
381
|
-
lazyclaw rates copy anthropic/claude-opus-4-7 anthropic/claude-opus-4-6
|
|
382
|
-
lazyclaw rates delete openai/gpt-3.5-turbo
|
|
383
|
-
lazyclaw rates validate
|
|
384
|
-
```
|
|
154
|
+
| `lazyclaw` | Interactive menu; type a slash command or pick a subcommand |
|
|
155
|
+
| `lazyclaw onboard` | Arrow-key setup; writes `~/.lazyclaw/config.json` |
|
|
156
|
+
| `lazyclaw status` | Print active provider / model / masked key |
|
|
157
|
+
| `lazyclaw doctor` | Validate config, provider registry, FTS5 index |
|
|
158
|
+
| `lazyclaw chat` | Interactive REPL with ghost autocomplete + slash commands |
|
|
159
|
+
| `lazyclaw agent "<prompt>"` | One-shot generate; supports stdin |
|
|
160
|
+
| `lazyclaw run \| resume \| inspect` | DAG / sequential / persistent workflow jobs (`--dir <state-dir>`) |
|
|
161
|
+
| `lazyclaw config get\|set\|list\|edit\|validate` | Dotted-key config access |
|
|
162
|
+
| `lazyclaw sandbox list\|test\|add\|use` | Manage sandbox backends |
|
|
163
|
+
| `lazyclaw channels install\|list\|remove` | Channel plugin lifecycle (`@lazyclaw/channel-<name>`) |
|
|
164
|
+
| `lazyclaw trajectories export --format ...` | Export to atropos / axolotl / openai-ft / jsonl |
|
|
165
|
+
| `lazyclaw personality use\|list\|show` | Activate / inspect personas |
|
|
166
|
+
| `lazyclaw migrate v5` | v4 → v5 with backup |
|
|
167
|
+
| `lazyclaw version` / `lazyclaw help` | Version + subcommand help |
|
|
168
|
+
|
|
169
|
+
In-REPL slash commands include `/help`, `/status`, `/provider`, `/model`, `/skill`, `/loop`, `/goal`, `/memory`, `/agent`, `/team`, `/handoff`, `/personality`, `/exit`. Depth lives in `lazyclaw <cmd> --help` and the docs below.
|
|
170
|
+
|
|
171
|
+
## Migrating from v4
|
|
172
|
+
|
|
173
|
+
> [!IMPORTANT]
|
|
174
|
+
> `lazyclaw migrate v5` backs up your existing `~/.lazyclaw/` to `backup-v4-<ts>/` before rewriting anything. Don't skip the backup — the SQLite schema and skill frontmatter both change shape.
|
|
175
|
+
|
|
176
|
+
- **What changed**: split `trainer` provider block, new `~/.lazyclaw/index.db` (SQLite + FTS5), per-day JSONL trajectory sink, persona file directory, kebab-case provider IDs (`claude-cli`, `gemini-cli`, ...), additive SKILL.md frontmatter (`group`, `trained_by`, `confidence`, `cross_cli_tested`).
|
|
177
|
+
- **Migrate**:
|
|
178
|
+
```bash
|
|
179
|
+
npm install -g lazyclaw@5
|
|
180
|
+
lazyclaw migrate v5
|
|
181
|
+
```
|
|
182
|
+
- **Rollback**: restore `~/.lazyclaw/backup-v4-<ts>/` and `npm install -g lazyclaw@4`.
|
|
183
|
+
|
|
184
|
+
Full guide: [docs/migration-v4-to-v5.md](./docs/migration-v4-to-v5.md).
|
|
185
|
+
|
|
186
|
+
## CLI vs Channels — quick reference
|
|
187
|
+
|
|
188
|
+
| Capability | TUI | Slack / Discord / Telegram |
|
|
189
|
+
|---|---|---|
|
|
190
|
+
| Start a chat | `lazyclaw chat` | `@lazyclaw <message>` |
|
|
191
|
+
| Hand off to another surface | `/handoff slack <channel-id>` | `/handoff tui <thread-id>` |
|
|
192
|
+
| Recall across history | `/recall "<query>"` inside chat (top-level CLI v5.1) | `/recall "<query>"` inside chat |
|
|
193
|
+
| Switch persona | `/personality use terse` | `/personality use terse` |
|
|
194
|
+
| Switch model | `/model <name>` | `/model <name>` |
|
|
195
|
+
| Show status | `lazyclaw status` | `@lazyclaw status` |
|
|
385
196
|
|
|
386
|
-
|
|
197
|
+
Channel plugins implement a shared `channels/base.mjs` contract, so the surface you address them through is interchangeable.
|
|
387
198
|
|
|
388
|
-
##
|
|
199
|
+
## Configuration
|
|
389
200
|
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
201
|
+
```jsonc
|
|
202
|
+
// ~/.lazyclaw/config.json
|
|
203
|
+
{
|
|
204
|
+
"provider": "claude-cli",
|
|
205
|
+
"model": "claude-opus-4-7",
|
|
206
|
+
"trainer": {
|
|
207
|
+
"provider": "auto", // "auto" | claude-cli | anthropic | openai | gemini | ollama
|
|
208
|
+
"model": "claude-haiku-4-5",
|
|
209
|
+
"schedule": "nightly",
|
|
210
|
+
"budget": { "maxCallsPerDay": 200, "usdPerDay": 0.50 }
|
|
211
|
+
},
|
|
212
|
+
"sandbox": { "backend": "local" }, // local | docker | ssh | singularity | modal | daytona
|
|
213
|
+
"channels": { "slack": { "enabled": true } },
|
|
214
|
+
"persona": { "active": "default" },
|
|
215
|
+
"orchestra": { "learning": { "crossCliDampenFactor": 0.85 } }
|
|
216
|
+
}
|
|
400
217
|
```
|
|
401
218
|
|
|
402
|
-
|
|
219
|
+
Override the config directory with `LAZYCLAW_CONFIG_DIR=/path`. Workflow state moves with `LAZYCLAW_WORKFLOW_STATE_DIR=/path`. Channel tokens live exclusively in `~/.lazyclaw/.env`. Full schema in `lazyclaw config --help` and the docs.
|
|
403
220
|
|
|
404
|
-
|
|
405
|
-
lazyclaw completion bash >> ~/.bashrc
|
|
406
|
-
lazyclaw completion zsh >> ~/.zshrc
|
|
407
|
-
```
|
|
221
|
+
## Security and privacy
|
|
408
222
|
|
|
409
|
-
|
|
223
|
+
> [!WARNING]
|
|
224
|
+
> **`~/.lazyclaw/config.json` is trusted code.** Values resolved with `$(...)` execute at config load. Treat the file like a shell rc — never paste an untrusted snippet without reading it first.
|
|
410
225
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
| `~/.lazyclaw/sessions/*.jsonl` | persisted chat sessions |
|
|
415
|
-
| `~/.lazyclaw/skills/*.md` | installed skill bundles |
|
|
416
|
-
| `./.workflow-state/<id>/` | per-session workflow checkpoints (cwd-relative) |
|
|
226
|
+
- **Trainer transcripts stay local.** Skill synthesis and user-model writes go through your configured trainer provider only; there is no hosted lazyclaw service.
|
|
227
|
+
- **Sandbox backends enforce different blast radii.** `local` runs as you; `docker` / `singularity` / `daytona` isolate; `ssh` / `modal` move execution off-host. Pick per task.
|
|
228
|
+
- **Secrets are redacted** from trajectories and synthesised skills (`sk-...`, `ghp_...`, `AKIA...`, bearer tokens, `*_KEY=...`, PEM blocks). Channel tokens live in `~/.lazyclaw/.env` and are never logged.
|
|
417
229
|
|
|
418
|
-
|
|
230
|
+
## Documentation
|
|
419
231
|
|
|
420
|
-
|
|
232
|
+
- [docs/migration-v4-to-v5.md](./docs/migration-v4-to-v5.md) — full v4 → v5 walkthrough + rollback
|
|
233
|
+
- [docs/trainer-recipes.md](./docs/trainer-recipes.md) — $0, hybrid, offline, and `auto` trainer configs
|
|
234
|
+
- [docs/persona-cookbook.md](./docs/persona-cookbook.md) — layered persona compose stack + skin import
|
|
235
|
+
- [docs/multi-agent.md](./docs/multi-agent.md) — orchestrator pipeline + Slack team data model
|
|
236
|
+
- [docs/loop-goal-preflight.md](./docs/loop-goal-preflight.md) — durable loops and cron-scheduled goals
|
|
237
|
+
- [docs/agent-memory.md](./docs/agent-memory.md) — per-agent memory, reflection, and skill synthesis
|
|
238
|
+
- [CHANGELOG.md](./CHANGELOG.md) — release notes (Keep a Changelog)
|
|
239
|
+
- [README.ko.md](./README.ko.md) — Korean companion
|
|
421
240
|
|
|
422
|
-
##
|
|
241
|
+
## Community
|
|
423
242
|
|
|
424
|
-
Source
|
|
243
|
+
Source and issues: [cmblir/lazyclaw](https://github.com/cmblir/lazyclaw). PRs welcome.
|
|
425
244
|
|
|
426
245
|
## License
|
|
427
246
|
|