@swarmclawai/swarmclaw 1.5.3 → 1.5.31

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
@@ -13,48 +13,9 @@ SwarmClaw is a self-hosted AI runtime for OpenClaw and multi-agent work. It help
13
13
  GitHub: https://github.com/swarmclawai/swarmclaw
14
14
  Docs: https://swarmclaw.ai/docs
15
15
  Website: https://swarmclaw.ai
16
+ Discord: https://discord.gg/sbEavS8cPV
16
17
  Extension tutorial: https://swarmclaw.ai/docs/extension-tutorial
17
18
 
18
- ## Hosted Deploys
19
-
20
- SwarmClaw now ships provider-ready deploy files at the repo root:
21
-
22
- - `render.yaml` for Render Blueprint deploys from the public GHCR image
23
- - `fly.toml` for Fly.io image-backed deploys
24
- - `railway.json` for Railway-aligned health and restart defaults
25
-
26
- The published image is:
27
-
28
- ```text
29
- ghcr.io/swarmclawai/swarmclaw:latest
30
- ```
31
-
32
- Hosted deployments should:
33
-
34
- - mount persistent storage at `/app/data`
35
- - manage secrets through the provider dashboard
36
- - set `ACCESS_KEY` and `CREDENTIAL_SECRET`
37
- - point health checks at `/api/healthz`
38
-
39
- Full hosted deployment guides live at https://swarmclaw.ai/docs/deployment
40
-
41
- ## OpenTelemetry OTLP Export
42
-
43
- SwarmClaw supports opt-in OTLP trace export for chat turns, direct model streams, tool execution, and structured-session runs.
44
-
45
- Minimal configuration:
46
-
47
- ```bash
48
- OTEL_ENABLED=true
49
- OTEL_SERVICE_NAME=swarmclaw
50
- OTEL_EXPORTER_OTLP_ENDPOINT=https://your-collector:4318
51
- OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer your-token
52
- ```
53
-
54
- If you need a trace-specific endpoint, set `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` directly instead.
55
-
56
- Operational docs: https://swarmclaw.ai/docs/observability
57
-
58
19
  ## Screenshots
59
20
 
60
21
  <table>
@@ -72,7 +33,7 @@ Operational docs: https://swarmclaw.ai/docs/observability
72
33
  <table>
73
34
  <tr>
74
35
  <td align="center"><strong>Works<br>with</strong></td>
75
- <td align="center"><img src="doc/assets/logos/openclaw.svg" width="32" alt="OpenClaw"><br><sub>OpenClaw</sub></td>
36
+ <td align="center"><img src="doc/assets/logos/openclaw.svg" width="32" alt="OpenClaw"><br><sub>OpenClaw</sub></td>
76
37
  <td align="center"><img src="public/provider-logos/hermes-agent.png" width="32" alt="Hermes Agent"><br><sub>Hermes</sub></td>
77
38
  <td align="center"><img src="doc/assets/logos/claude-code.svg" width="32" alt="Claude Code"><br><sub>Claude Code</sub></td>
78
39
  <td align="center"><img src="doc/assets/logos/codex.svg" width="32" alt="Codex"><br><sub>Codex</sub></td>
@@ -95,6 +56,131 @@ Operational docs: https://swarmclaw.ai/docs/observability
95
56
  </table>
96
57
  </div>
97
58
 
59
+ ## Requirements
60
+
61
+ - Node.js 22.6+ (`nvm use` will pick up the repo's `.nvmrc`, which matches CI)
62
+ - npm 10+ or another supported package manager
63
+ - Docker Desktop is recommended for sandbox browser execution
64
+ - Optional provider CLIs if you want delegated CLI backends such as Claude Code, Codex, OpenCode, or Gemini
65
+
66
+ ## Quick Start
67
+
68
+ ### Global install
69
+
70
+ ```bash
71
+ npm i -g @swarmclawai/swarmclaw
72
+ swarmclaw
73
+ ```
74
+
75
+ ```bash
76
+ yarn global add @swarmclawai/swarmclaw
77
+ swarmclaw
78
+ ```
79
+
80
+ ```bash
81
+ pnpm add -g @swarmclawai/swarmclaw
82
+ swarmclaw
83
+ ```
84
+
85
+ ```bash
86
+ bun add -g @swarmclawai/swarmclaw
87
+ swarmclaw
88
+ ```
89
+
90
+ Running `swarmclaw` starts the server on `http://localhost:3456`.
91
+
92
+ ### From the repo
93
+
94
+ ```bash
95
+ git clone https://github.com/swarmclawai/swarmclaw.git
96
+ cd swarmclaw
97
+ nvm use
98
+ npm run quickstart
99
+ ```
100
+
101
+ `npm run quickstart` installs dependencies, prepares local config and runtime state, and starts SwarmClaw.
102
+
103
+ ### Docker
104
+
105
+ ```bash
106
+ git clone https://github.com/swarmclawai/swarmclaw.git
107
+ cd swarmclaw
108
+ mkdir -p data
109
+ touch .env.local
110
+ docker compose up -d --build
111
+ ```
112
+
113
+ Then open `http://localhost:3456`.
114
+
115
+ ## ClawHub Skill
116
+
117
+ Install the SwarmClaw skill for your [OpenClaw](https://openclaw.ai) agents:
118
+
119
+ ```bash
120
+ clawhub install swarmclaw
121
+ ```
122
+
123
+ [Browse on ClawHub](https://clawhub.ai/skills/swarmclaw)
124
+
125
+ ## Hosted Deploys
126
+
127
+ SwarmClaw now ships provider-ready deploy files at the repo root:
128
+
129
+ - `render.yaml` for Render Blueprint deploys from the public GHCR image
130
+ - `fly.toml` for Fly.io image-backed deploys
131
+ - `railway.json` for Railway-aligned health and restart defaults
132
+
133
+ The published image is:
134
+
135
+ ```text
136
+ ghcr.io/swarmclawai/swarmclaw:latest
137
+ ```
138
+
139
+ Hosted deployments should:
140
+
141
+ - mount persistent storage at `/app/data`
142
+ - manage secrets through the provider dashboard
143
+ - set `ACCESS_KEY` and `CREDENTIAL_SECRET`
144
+ - point health checks at `/api/healthz`
145
+
146
+ Full hosted deployment guides live at https://swarmclaw.ai/docs/deployment
147
+
148
+ ## Core Capabilities
149
+
150
+ - **Providers**: OpenClaw, OpenAI, OpenRouter, Anthropic, Ollama, Hermes Agent, Google, DeepSeek, Groq, Together, Mistral, xAI, Fireworks, Nebius, DeepInfra, plus compatible custom endpoints.
151
+ - **OpenRouter**: <img src="public/provider-logos/openrouter.png" alt="OpenRouter logo" width="20" height="20" /> Use OpenRouter as a first-class built-in provider with its standard OpenAI-compatible endpoint and routed model IDs such as `openai/gpt-4.1-mini`.
152
+ - **Hermes Agent**: <img src="public/provider-logos/hermes-agent.png" alt="Hermes Agent logo" width="20" height="20" /> Connect Hermes through its OpenAI-compatible API server, locally or through a reachable remote `/v1` endpoint.
153
+ - **Delegation**: built-in delegation to Claude Code, Codex CLI, OpenCode CLI, Gemini CLI, and native SwarmClaw subagents.
154
+ - **Autonomy**: heartbeat loops, schedules, background jobs, task execution, supervisor recovery, and agent wakeups.
155
+ - **Orchestration**: durable structured execution with branching, repeat loops, parallel branches, explicit joins, restart-safe run state, and contextual launch from chats, chatrooms, tasks, schedules, and API flows.
156
+ - **Structured Sessions**: reusable bounded runs with templates, facilitators, participants, hidden live rooms, chatroom `/breakout`, durable transcripts, outputs, operator controls, and a visible protocols template gallery plus visual builder.
157
+ - **Memory**: hybrid recall, graph traversal, journaling, durable documents, project-scoped context, automatic reflection memory, communication preferences, profile and boundary memory, significant events, and open follow-up loops.
158
+ - **Wallets**: linked Base wallet generation, address management, approval-oriented limits, and agent payout identity.
159
+ - **Connectors**: Discord, Slack, Telegram, WhatsApp, Teams, Matrix, OpenClaw, SwarmDock, SwarmFeed, and more.
160
+ - **Extensions**: external tool extensions, UI modules, hooks, and install/update flows.
161
+
162
+ ## What SwarmClaw Focuses On
163
+
164
+ - **Delegation, orchestrators, and background execution**: delegated work, orchestrator agents, subagents, durable jobs, checkpointing, and background task execution.
165
+ - **Structured Sessions and orchestration**: temporary bounded runs for one agent or many, launched from context and backed by durable templates, branching, loops, parallel joins, transcripts, outputs, operator controls, and chatroom breakout flows.
166
+ - **Autonomy and memory**: heartbeats, orchestrator wake cycles, schedules, long-running execution, durable memory, reflection memory, human-context learning, document recall, and project-aware context.
167
+ - **OpenClaw integration**: named gateway profiles, external runtimes, deploy helpers, config sync, approval handling, and OpenClaw agent file editing.
168
+ - **Runtime skills**: pinned skills, OpenClaw-compatible `SKILL.md` import, on-demand skill execution, and configurable keyword or embedding-based recommendation.
169
+ - **Conversation-to-skill drafts**: draft a reusable skill from a real chat, review it, then approve it into the skill library.
170
+ - **Crypto wallets**: agent-linked Solana and Ethereum wallets for balances, approvals, signing, simulation, and execution.
171
+ - **Operator tooling**: connectors, extensions, browser automation, shell/files/git tooling, and runtime guardrails.
172
+
173
+ ## OpenClaw
174
+
175
+ SwarmClaw is built for OpenClaw operators who need more than one agent or one gateway.
176
+
177
+ - Bundle and use the official `openclaw` CLI directly from SwarmClaw.
178
+ - Connect each SwarmClaw agent to a different OpenClaw gateway profile.
179
+ - Discover, verify, and manage multiple gateways from one control plane.
180
+ - Deploy official-image OpenClaw runtimes locally, via VPS bundles, or over SSH.
181
+ - Edit OpenClaw agent files such as `SOUL.md`, `IDENTITY.md`, `USER.md`, `TOOLS.md`, and `AGENTS.md`.
182
+ - Import OpenClaw `SKILL.md` files and use them in SwarmClaw's runtime skill system.
183
+
98
184
  ## Use Cases
99
185
 
100
186
  SwarmClaw is a general-purpose agent runtime. Here are some of the ways people use it.
@@ -230,6 +316,17 @@ These aren't exclusive templates — they're patterns you combine. A virtual com
230
316
 
231
317
  The building blocks are the same: **agents, tools, memory, delegation, schedules, connectors, and skills**. SwarmClaw just gives you the control plane to wire them together.
232
318
 
319
+ ## Skill Drafts From Conversations
320
+
321
+ - From any active chat, use **Draft Skill** in the chat header.
322
+ - Or open **Skills** and use **Draft From Current Chat**.
323
+ - New agents keep **Conversation Skill Drafting** enabled by default, and you can switch it off per agent.
324
+ - SwarmClaw turns useful work into a **draft suggestion**, not a live self-modifying skill.
325
+ - Learned skills stay **user/agent scoped** by default. They can harden repeated workflows and self-heal repeated external capability failures, but they do not auto-promote into the shared reviewed skill library.
326
+ - Review the suggested name, rationale, summary, and transcript snippet.
327
+ - Approve it to save it into the normal skill library, or dismiss it.
328
+ - Runtime skill recommendations can use **keyword** or **embedding** ranking from **Settings → Memory & AI → Skills**.
329
+
233
330
  ## SwarmDock Marketplace
234
331
 
235
332
  SwarmClaw agents can register on [SwarmDock](https://swarmdock.ai) — a peer-to-peer marketplace where autonomous AI agents discover tasks, bid competitively, complete work, and earn USDC payments on Base L2. SwarmDock is the marketplace; SwarmClaw is the control plane.
@@ -255,6 +352,29 @@ SwarmClaw agents can join [SwarmFeed](https://swarmfeed.ai) — a social network
255
352
 
256
353
  Read the docs at [swarmclaw.ai/docs/swarmfeed](https://swarmclaw.ai/docs/swarmfeed) and visit [swarmfeed.ai](https://swarmfeed.ai) for the platform itself.
257
354
 
355
+ ## OpenTelemetry OTLP Export
356
+
357
+ SwarmClaw supports opt-in OTLP trace export for chat turns, direct model streams, tool execution, and structured-session runs.
358
+
359
+ Minimal configuration:
360
+
361
+ ```bash
362
+ OTEL_ENABLED=true
363
+ OTEL_SERVICE_NAME=swarmclaw
364
+ OTEL_EXPORTER_OTLP_ENDPOINT=https://your-collector:4318
365
+ OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer your-token
366
+ ```
367
+
368
+ If you need a trace-specific endpoint, set `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` directly instead.
369
+
370
+ Operational docs: https://swarmclaw.ai/docs/observability
371
+
372
+ ## Releases
373
+
374
+ ### v1.5.31 Highlights
375
+
376
+ - **Fix Docker first-run crash**: resolved `EISDIR: illegal operation on a directory, read` error when running `docker compose up` without a pre-existing `.env.local` file. Docker was creating a directory mount instead of a file, which crashed Next.js on startup. Replaced the file bind mount with `env_file` directive using `required: false`.
377
+
258
378
  ### v1.5.3 Highlights
259
379
 
260
380
  - **Copilot CLI v1.x compatibility**: the `copilot-cli` provider now handles the current event format (`assistant.message_delta`, `assistant.message`, updated `result` payload) while keeping backward compatibility with the legacy format. Also fixes `--resume` flag syntax. (Community contribution by [@borislavnnikolov](https://github.com/borislavnnikolov) -- PR #36)
@@ -319,116 +439,10 @@ Read the docs at [swarmclaw.ai/docs/swarmfeed](https://swarmclaw.ai/docs/swarmfe
319
439
  - **Following tab fix**: SwarmFeed Following tab gracefully handles unregistered agents instead of showing a 401 error
320
440
  - **Compose removal**: Removed manual compose UI from Feed page — agents post autonomously through their tools
321
441
 
322
- ## Releases
323
-
324
442
  - GitHub releases: https://github.com/swarmclawai/swarmclaw/releases
325
443
  - npm package: https://www.npmjs.com/package/@swarmclawai/swarmclaw
326
444
  - Historical release notes: https://swarmclaw.ai/docs/release-notes
327
445
 
328
-
329
- ## What SwarmClaw Focuses On
330
-
331
- - **Delegation, orchestrators, and background execution**: delegated work, orchestrator agents, subagents, durable jobs, checkpointing, and background task execution.
332
- - **Structured Sessions and orchestration**: temporary bounded runs for one agent or many, launched from context and backed by durable templates, branching, loops, parallel joins, transcripts, outputs, operator controls, and chatroom breakout flows.
333
- - **Autonomy and memory**: heartbeats, orchestrator wake cycles, schedules, long-running execution, durable memory, reflection memory, human-context learning, document recall, and project-aware context.
334
- - **OpenClaw integration**: named gateway profiles, external runtimes, deploy helpers, config sync, approval handling, and OpenClaw agent file editing.
335
- - **Runtime skills**: pinned skills, OpenClaw-compatible `SKILL.md` import, on-demand skill execution, and configurable keyword or embedding-based recommendation.
336
- - **Conversation-to-skill drafts**: draft a reusable skill from a real chat, review it, then approve it into the skill library.
337
- - **Crypto wallets**: agent-linked Solana and Ethereum wallets for balances, approvals, signing, simulation, and execution.
338
- - **Operator tooling**: connectors, extensions, browser automation, shell/files/git tooling, and runtime guardrails.
339
-
340
- ## OpenClaw
341
-
342
- SwarmClaw is built for OpenClaw operators who need more than one agent or one gateway.
343
-
344
- - Bundle and use the official `openclaw` CLI directly from SwarmClaw.
345
- - Connect each SwarmClaw agent to a different OpenClaw gateway profile.
346
- - Discover, verify, and manage multiple gateways from one control plane.
347
- - Deploy official-image OpenClaw runtimes locally, via VPS bundles, or over SSH.
348
- - Edit OpenClaw agent files such as `SOUL.md`, `IDENTITY.md`, `USER.md`, `TOOLS.md`, and `AGENTS.md`.
349
- - Import OpenClaw `SKILL.md` files and use them in SwarmClaw’s runtime skill system.
350
-
351
- ## Quick Start
352
-
353
- ### Global install
354
-
355
- ```bash
356
- npm i -g @swarmclawai/swarmclaw
357
- swarmclaw
358
- ```
359
-
360
- ```bash
361
- yarn global add @swarmclawai/swarmclaw
362
- swarmclaw
363
- ```
364
-
365
- ```bash
366
- pnpm add -g @swarmclawai/swarmclaw
367
- swarmclaw
368
- ```
369
-
370
- ```bash
371
- bun add -g @swarmclawai/swarmclaw
372
- swarmclaw
373
- ```
374
-
375
- Running `swarmclaw` starts the server on `http://localhost:3456`.
376
-
377
- ### From the repo
378
-
379
- ```bash
380
- git clone https://github.com/swarmclawai/swarmclaw.git
381
- cd swarmclaw
382
- nvm use
383
- npm run quickstart
384
- ```
385
-
386
- `npm run quickstart` installs dependencies, prepares local config and runtime state, and starts SwarmClaw.
387
-
388
- ### Docker
389
-
390
- ```bash
391
- git clone https://github.com/swarmclawai/swarmclaw.git
392
- cd swarmclaw
393
- mkdir -p data
394
- touch .env.local
395
- docker compose up -d --build
396
- ```
397
-
398
- Then open `http://localhost:3456`.
399
-
400
- ## Skill Drafts From Conversations
401
-
402
- - From any active chat, use **Draft Skill** in the chat header.
403
- - Or open **Skills** and use **Draft From Current Chat**.
404
- - New agents keep **Conversation Skill Drafting** enabled by default, and you can switch it off per agent.
405
- - SwarmClaw turns useful work into a **draft suggestion**, not a live self-modifying skill.
406
- - Learned skills stay **user/agent scoped** by default. They can harden repeated workflows and self-heal repeated external capability failures, but they do not auto-promote into the shared reviewed skill library.
407
- - Review the suggested name, rationale, summary, and transcript snippet.
408
- - Approve it to save it into the normal skill library, or dismiss it.
409
- - Runtime skill recommendations can use **keyword** or **embedding** ranking from **Settings → Memory & AI → Skills**.
410
-
411
- ## Core Capabilities
412
-
413
- - **Providers**: OpenClaw, OpenAI, OpenRouter, Anthropic, Ollama, Hermes Agent, Google, DeepSeek, Groq, Together, Mistral, xAI, Fireworks, Nebius, DeepInfra, plus compatible custom endpoints.
414
- - **OpenRouter**: <img src="public/provider-logos/openrouter.png" alt="OpenRouter logo" width="20" height="20" /> Use OpenRouter as a first-class built-in provider with its standard OpenAI-compatible endpoint and routed model IDs such as `openai/gpt-4.1-mini`.
415
- - **Hermes Agent**: <img src="public/provider-logos/hermes-agent.png" alt="Hermes Agent logo" width="20" height="20" /> Connect Hermes through its OpenAI-compatible API server, locally or through a reachable remote `/v1` endpoint.
416
- - **Delegation**: built-in delegation to Claude Code, Codex CLI, OpenCode CLI, Gemini CLI, and native SwarmClaw subagents.
417
- - **Autonomy**: heartbeat loops, schedules, background jobs, task execution, supervisor recovery, and agent wakeups.
418
- - **Orchestration**: durable structured execution with branching, repeat loops, parallel branches, explicit joins, restart-safe run state, and contextual launch from chats, chatrooms, tasks, schedules, and API flows.
419
- - **Structured Sessions**: reusable bounded runs with templates, facilitators, participants, hidden live rooms, chatroom `/breakout`, durable transcripts, outputs, operator controls, and a visible protocols template gallery plus visual builder.
420
- - **Memory**: hybrid recall, graph traversal, journaling, durable documents, project-scoped context, automatic reflection memory, communication preferences, profile and boundary memory, significant events, and open follow-up loops.
421
- - **Wallets**: linked Base wallet generation, address management, approval-oriented limits, and agent payout identity.
422
- - **Connectors**: Discord, Slack, Telegram, WhatsApp, Teams, Matrix, OpenClaw, SwarmDock, SwarmFeed, and more.
423
- - **Extensions**: external tool extensions, UI modules, hooks, and install/update flows.
424
-
425
- ## Requirements
426
-
427
- - Node.js 22.6+ (`nvm use` will pick up the repo's `.nvmrc`, which matches CI)
428
- - npm 10+ or another supported package manager
429
- - Docker Desktop is recommended for sandbox browser execution
430
- - Optional provider CLIs if you want delegated CLI backends such as Claude Code, Codex, OpenCode, or Gemini
431
-
432
446
  ## Security Notes
433
447
 
434
448
  - First run creates an access key; keep it private.
@@ -446,5 +460,6 @@ Then open `http://localhost:3456`.
446
460
  - SwarmDock marketplace: https://swarmdock.ai
447
461
  - SwarmFeed: https://swarmclaw.ai/docs/swarmfeed
448
462
  - SwarmFeed platform: https://swarmfeed.ai
463
+ - SwarmVault: https://swarmvault.ai
449
464
  - Extensions: https://swarmclaw.ai/docs/extensions
450
465
  - CLI reference: https://swarmclaw.ai/docs/cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmclawai/swarmclaw",
3
- "version": "1.5.3",
3
+ "version": "1.5.31",
4
4
  "description": "Build and run autonomous AI agents with OpenClaw, Hermes, multiple model providers, orchestration, delegation, memory, skills, schedules, and chat connectors.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: swarmclaw
3
+ description: AI agent runtime and multi-agent orchestration platform. Teaches agents how to use SwarmClaw's 6 primitive tools, persistent memory, dreaming, delegation, connectors, credentials, and the skill system. Use when an agent is running on SwarmClaw and needs to understand the platform's capabilities.
4
+ metadata:
5
+ openclaw:
6
+ emoji: "\U0001F41D"
7
+ privacyPolicy: All data stays on the local SwarmClaw instance. Memory, workspace files, and session data are stored on the host machine. No data is sent to external services unless the agent explicitly calls an external API.
8
+ dataHandling: Agent memory is stored locally in the SwarmClaw data directory. Workspace files are scoped per agent. Credentials are injected as environment variables and automatically redacted from tool output.
9
+ version: 2.4.1
10
+ author: swarmclawai
11
+ homepage: https://swarmclaw.ai
12
+ tags: [agents, orchestration, multi-agent, runtime, memory, delegation, skills, connectors, dreaming]
13
+ ---
14
+
15
+ # SwarmClaw Platform
16
+
17
+ SwarmClaw is an AI agent runtime and multi-agent orchestration platform. It gives agents a uniform set of tools, persistent memory, connector integrations, and the ability to delegate work to other agents.
18
+
19
+ Website: https://swarmclaw.ai
20
+ Docs: https://swarmclaw.ai/docs
21
+ GitHub: https://github.com/swarmclawai/swarmclaw
22
+ npm: `npm install -g swarmclaw`
23
+
24
+ ## The 6 Primitive Tools
25
+
26
+ Every agent has access to these core tools. They cover the full range of agent capabilities.
27
+
28
+ | Tool | Purpose | When to Use |
29
+ |------|---------|-------------|
30
+ | **files** | Read, write, edit, list, search files | Any file operation on the workspace filesystem |
31
+ | **execute** | Run bash scripts (sandboxed or host) | Shell commands, curl, data processing, package management |
32
+ | **memory** | Store and retrieve persistent knowledge | Facts, preferences, decisions that should survive across sessions |
33
+ | **platform** | Tasks, communication, delegation, projects | Coordinating with humans and other agents |
34
+ | **browser** | Control a headless browser | Interactive web pages, JavaScript-rendered content |
35
+ | **skills** | Discover and load skill documentation | Learning how to use tools, APIs, or workflows |
36
+
37
+ ### Tool Selection Guide
38
+
39
+ | Task | Tool |
40
+ |------|------|
41
+ | Edit a source file | `files` (edit action) |
42
+ | Run tests | `execute` |
43
+ | Call a REST API (JSON) | `execute` (curl) |
44
+ | Scrape a dynamic web page | `browser` |
45
+ | Remember a user preference | `memory` |
46
+ | Ask the user a question | `platform` (communicate.ask_human) |
47
+ | Send a Slack message | `platform` (communicate.send_message) |
48
+ | Hand off work to another agent | `platform` (communicate.delegate) |
49
+ | Find out how a tool works | `skills` (read action) |
50
+
51
+ ## Credentials
52
+
53
+ Credentials are configured per agent in the SwarmClaw UI. They are:
54
+
55
+ - **Injected as environment variables** into `execute` tool runs (e.g., `$OPENAI_API_KEY`, `$GITHUB_TOKEN`)
56
+ - **Automatically redacted** from all tool output -- secrets never appear in chat history
57
+ - **Named by convention**: `<PROVIDER>_API_KEY` or custom names set in the credential config
58
+
59
+ You never need to ask the user for API keys directly. If a credential is configured, it's available as an env var. If it's not configured, tell the user which credential to add in the agent settings.
60
+
61
+ ## The Skill System
62
+
63
+ Skills are markdown files that teach agents how to use tools, APIs, and workflows. They are documentation, not executable code.
64
+
65
+ ### Loading Skills
66
+
67
+ ```json
68
+ { "tool": "skills", "action": "list" }
69
+ { "tool": "skills", "action": "read", "name": "tools/files" }
70
+ { "tool": "skills", "action": "search", "query": "github pr" }
71
+ ```
72
+
73
+ ### Skill Locations
74
+
75
+ - `skills/` -- built-in skills shipped with SwarmClaw
76
+ - `data/skills/` -- user-created skills added at runtime
77
+
78
+ ### When to Load Skills
79
+
80
+ - Before using a tool you're unfamiliar with
81
+ - When a task involves an API or workflow you haven't used before
82
+ - When the user asks you to do something and you're unsure of the best approach
83
+
84
+ ## Agent Capabilities
85
+
86
+ ### Memory
87
+
88
+ Agents have persistent memory across sessions:
89
+
90
+ - **Working memory** (session-scoped): scratch notes, intermediate results
91
+ - **Durable memory** (cross-session): user preferences, project facts, decisions
92
+ - Memories are automatically surfaced in context when relevant
93
+ - Store important learnings proactively -- don't wait to be asked
94
+
95
+ ### Dreaming
96
+
97
+ Agents with dreaming enabled automatically consolidate memories during idle periods. You can also trigger a dream manually:
98
+
99
+ #### Check dream status
100
+ ```json
101
+ { "tool": "memory", "action": "list", "category": "dream_reflection" }
102
+ ```
103
+
104
+ #### Manual dream trigger
105
+ Use the platform API to trigger a dream cycle:
106
+ ```json
107
+ { "tool": "execute", "command": "curl -s -X POST http://localhost:3456/api/memory/dream -H 'Content-Type: application/json' -d '{\"agentId\":\"YOUR_AGENT_ID\"}'" }
108
+ ```
109
+
110
+ Dream cycles produce `dream_reflection` and `consolidated_insight` memories that help maintain a clean, coherent memory store over time.
111
+
112
+ ### Delegation
113
+
114
+ Agents can delegate work to other agents:
115
+
116
+ - **delegate**: route a task to a specific agent and wait for the result
117
+ - **spawn**: create a subagent that runs independently (fire-and-forget or session-based)
118
+ - Use `agents.list` to discover available agents and their specializations
119
+
120
+ ### Connectors
121
+
122
+ Agents can communicate through external platforms:
123
+
124
+ - Discord, Slack, Telegram, and custom webhooks
125
+ - Messages sent via `platform` tool with `communicate.send_message`
126
+ - Inbound messages from connectors trigger agent sessions automatically
127
+
128
+ ## Workspace Conventions
129
+
130
+ - The workspace root is the agent's working directory
131
+ - File paths in tool calls are relative to the workspace root
132
+ - `/workspace/...` paths are resolved to the workspace root automatically
133
+ - The `$WORKSPACE` env var points to the workspace root in execute tool runs
134
+
135
+ ## Best Practices
136
+
137
+ 1. **Load skills before unfamiliar operations.** A 30-second skill read prevents minutes of trial and error.
138
+
139
+ 2. **Use the right tool for the job.** Don't use `execute` with `echo > file.txt` when `files` write action is cleaner. Don't use `browser` when `curl` in `execute` suffices.
140
+
141
+ 3. **Store important context in memory.** If you learn something that would help in future sessions (user preference, project convention, API quirk), store it immediately.
142
+
143
+ 4. **Ask rather than guess.** When genuinely uncertain about user intent, use `communicate.ask_human`. A brief clarification is better than wasted work on the wrong approach.
144
+
145
+ 5. **Delegate when appropriate.** If another agent is better suited for a subtask, delegate. Check `agents.list` to know what's available.
146
+
147
+ 6. **Be explicit about what you're doing.** When running commands, editing files, or making decisions, explain your reasoning. Transparency builds trust.
148
+
149
+ 7. **Respect file access boundaries.** Stay within the workspace unless the agent has machine-scope access. Never write to system directories.
150
+
151
+ 8. **Handle errors gracefully.** When a tool call fails, read the error message, diagnose the issue, and retry with a corrected approach. Don't repeat the same failing call.
@@ -16,6 +16,7 @@ import type { AppView } from '@/types'
16
16
 
17
17
  const RAIL_EXPANDED_KEY = 'sc_rail_expanded'
18
18
  const GITHUB_REPO_URL = 'https://github.com/swarmclawai/swarmclaw'
19
+ const DISCORD_URL = 'https://discord.gg/sbEavS8cPV'
19
20
  const NETWORK_LINKS = [
20
21
  { href: 'https://www.swarmdock.ai', label: 'SwarmDock', abbr: 'DO' },
21
22
  { href: 'https://swarmrecall.ai', label: 'SwarmRecall', abbr: 'RE' },
@@ -487,6 +488,34 @@ export function SidebarRail({
487
488
  </a>
488
489
  </RailTooltip>
489
490
  )}
491
+ {railExpanded ? (
492
+ <a
493
+ href={DISCORD_URL}
494
+ target="_blank"
495
+ rel="noopener noreferrer"
496
+ className="w-full flex items-center gap-2.5 px-3 py-2 rounded-[10px] text-[13px] font-500 cursor-pointer transition-all
497
+ bg-transparent text-text-3 hover:text-text hover:bg-white/[0.04] no-underline"
498
+ style={{ fontFamily: 'inherit' }}
499
+ >
500
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" className="shrink-0">
501
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
502
+ <path d="M8 10h.01M12 10h.01M16 10h.01" />
503
+ </svg>
504
+ Join Discord
505
+ <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" className="ml-auto opacity-40">
506
+ <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />
507
+ </svg>
508
+ </a>
509
+ ) : (
510
+ <RailTooltip label="Join Discord" description="Open the SwarmClaw community">
511
+ <a href={DISCORD_URL} target="_blank" rel="noopener noreferrer" className="rail-btn">
512
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round">
513
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
514
+ <path d="M8 10h.01M12 10h.01M16 10h.01" />
515
+ </svg>
516
+ </a>
517
+ </RailTooltip>
518
+ )}
490
519
  {railExpanded && <DaemonIndicator />}
491
520
  {railExpanded ? (
492
521
  <NotificationCenter variant="row" align="left" direction="up" />