Skip to content

Commit ef6973b

Browse files
gabi-simonsclaude
andcommitted
docs: rewrite READMEs for pluggable multi-channel architecture
Reflects the architectural shift from a hardcoded WhatsApp bot to a pluggable channel platform. Adds upgrading notice, Mermaid architecture diagram, CI/License/TypeScript/PRs badges, and clarifies that slash commands run inside the Claude Code CLI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 423fc07 commit ef6973b

2 files changed

Lines changed: 276 additions & 117 deletions

File tree

README.md

Lines changed: 139 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
<p align="center">
6-
An AI assistant that runs agents securely in their own containers. Lightweight, built to be easily understood and completely customized for your needs.
6+
A pluggable AI assistant platform. Agents run in containers. Channels install as skills. Small enough to read, built to be yours.
77
</p>
88

99
<p align="center">
@@ -12,12 +12,16 @@
1212
<a href="https://discord.gg/VDdww8qS42"><img src="https://img.shields.io/discord/1470188214710046894?label=Discord&logo=discord&v=2" alt="Discord" valign="middle"></a>&nbsp;&nbsp;
1313
<a href="repo-tokens"><img src="repo-tokens/badge.svg" alt="34.9k tokens, 17% of context window" valign="middle"></a>
1414
</p>
15+
<p align="center">
16+
<a href="https://github.com/qwibitai/nanoclaw/actions"><img src="https://github.com/qwibitai/nanoclaw/workflows/CI/badge.svg" alt="Build Status" valign="middle"></a>&nbsp;&nbsp;
17+
<a href="https://github.com/qwibitai/nanoclaw/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" valign="middle"></a>&nbsp;&nbsp;
18+
<img src="https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white" alt="TypeScript" valign="middle">&nbsp;&nbsp;
19+
<a href="https://github.com/qwibitai/nanoclaw/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" valign="middle"></a>
20+
</p>
1521

16-
Using Claude Code, NanoClaw can dynamically rewrite its code to customize its feature set for your needs.
17-
18-
**New:** First AI assistant to support [Agent Swarms](https://code.claude.com/docs/en/agent-teams). Spin up teams of agents that collaborate in your chat.
22+
NanoClaw ships as a minimal core with **no channels built in.** You add exactly the channels you need — WhatsApp, Telegram, Slack, Discord, Gmail — by running [skills](#skills-over-features) inside Claude Code. Each channel self-registers at startup; unconfigured channels are silently skipped. No feature flags, no config toggles — just clean code that does what you need.
1923

20-
## Why I Built NanoClaw
24+
## Why
2125

2226
[OpenClaw](https://github.com/openclaw/openclaw) is an impressive project, but I wouldn't have been able to sleep if I had given complex software I didn't understand full access to my life. OpenClaw has nearly half a million lines of code, 53 config files, and 70+ dependencies. Its security is at the application level (allowlists, pairing codes) rather than true OS-level isolation. Everything runs in one Node process with shared memory.
2327

@@ -28,52 +32,76 @@ NanoClaw provides that same core functionality, but in a codebase small enough t
2832
```bash
2933
git clone https://github.com/qwibitai/NanoClaw.git
3034
cd NanoClaw
31-
claude
35+
claude # launches Claude Code CLI
3236
```
3337

34-
Then run `/setup`. Claude Code handles everything: dependencies, authentication, container setup and service configuration.
38+
Inside the Claude Code prompt, run:
39+
40+
```
41+
/setup # installs deps, authenticates, configures containers
42+
/add-whatsapp # or /add-telegram, /add-slack, /add-discord, /add-gmail
43+
```
44+
45+
> **Note:** Commands prefixed with `/` are [Claude Code skills](https://code.claude.com/docs/en/skills). Type them inside the `claude` CLI prompt, not in your regular terminal.
46+
47+
You can run multiple channels simultaneously or use just one.
48+
49+
## Upgrading from Pre-Pluggable Versions
50+
51+
> **Breaking change.** WhatsApp is no longer bundled in the core — it's now a pluggable skill, just like every other channel. If you're upgrading an existing installation:
52+
>
53+
> ```bash
54+
> claude # open Claude Code in your NanoClaw directory
55+
> ```
56+
> ```
57+
> /add-whatsapp # re-installs WhatsApp as a pluggable channel
58+
> ```
59+
>
60+
> Your existing auth credentials, groups, and scheduled tasks are preserved. The skill just wires WhatsApp back into the new channel registry.
3561
3662
## Philosophy
3763
38-
**Small enough to understand.** One process, a few source files and no microservices. If you want to understand the full NanoClaw codebase, just ask Claude Code to walk you through it.
64+
<a id="skills-over-features"></a>
65+
66+
**Small enough to understand.** One process, a few source files, no microservices. Want to understand the full codebase? Ask Claude Code to walk you through it. The whole thing fits in a single context window.
3967
40-
**Secure by isolation.** Agents run in Linux containers (Apple Container on macOS, or Docker) and they can only see what's explicitly mounted. Bash access is safe because commands run inside the container, not on your host.
68+
**Secure by isolation.** Agents run in Linux containers (Apple Container on macOS, or Docker). They can only see what's explicitly mounted. Bash access is safe because commands execute inside the container, not on your host.
4169
42-
**Built for the individual user.** NanoClaw isn't a monolithic framework; it's software that fits each user's exact needs. Instead of becoming bloatware, NanoClaw is designed to be bespoke. You make your own fork and have Claude Code modify it to match your needs.
70+
**Built for the individual.** NanoClaw isn't a monolithic framework; it's software that fits each user's exact needs. Fork it, point Claude Code at it, and make it yours.
4371
44-
**Customization = code changes.** No configuration sprawl. Want different behavior? Modify the code. The codebase is small enough that it's safe to make changes.
72+
**Customization = code changes.** No configuration sprawl. Want different behavior? Modify the code. The codebase is small enough that this is safe.
4573
4674
**AI-native.**
47-
- No installation wizard; Claude Code guides setup.
48-
- No monitoring dashboard; ask Claude what's happening.
49-
- No debugging tools; describe the problem and Claude fixes it.
75+
- No installation wizard Claude Code guides setup.
76+
- No monitoring dashboard ask Claude what's happening.
77+
- No debugging tools describe the problem and Claude fixes it.
5078
51-
**Skills over features.** Instead of adding features (e.g. support for Telegram) to the codebase, contributors submit [claude code skills](https://code.claude.com/docs/en/skills) like `/add-telegram` that transform your fork. You end up with clean code that does exactly what you need.
79+
**Skills over features.** This is the core design principle. Traditional platforms bolt on every channel behind feature flags and configuration layers. NanoClaw does the opposite: channels, integrations, and capabilities are [Claude Code skills](https://code.claude.com/docs/en/skills) that **mutate your fork.** Run `/add-telegram` and you get clean, auditable Telegram code committed to your codebase — not a 15-channel abstraction layer you'll never read.
5280
53-
**Best harness, best model.** NanoClaw runs on the Claude Agent SDK, which means you're running Claude Code directly. Claude Code is highly capable and its coding and problem-solving capabilities allow it to modify and expand NanoClaw and tailor it to each user.
81+
**Best harness, best model.** NanoClaw runs on the Claude Agent SDKyou're running Claude Code directly. Its coding and problem-solving capabilities let it modify, expand, and tailor NanoClaw to each user.
5482
5583
## What It Supports
5684
57-
- **Messenger I/O** - Message NanoClaw from your phone. Supports WhatsApp, Telegram, Discord, Slack, Signal and headless operation.
58-
- **Isolated group context** - Each group has its own `CLAUDE.md` memory, isolated filesystem, and runs in its own container sandbox with only that filesystem mounted to it.
59-
- **Main channel** - Your private channel (self-chat) for admin control; every group is completely isolated
60-
- **Scheduled tasks** - Recurring jobs that run Claude and can message you back
61-
- **Web access** - Search and fetch content from the Web
62-
- **Container isolation** - Agents are sandboxed in Apple Container (macOS) or Docker (macOS/Linux)
63-
- **Agent Swarms** - Spin up teams of specialized agents that collaborate on complex tasks. NanoClaw is the first personal AI assistant to support agent swarms.
64-
- **Optional integrations** - Add Gmail (`/add-gmail`) and more via skills
85+
- **Pluggable channels** — Add WhatsApp (`/add-whatsapp`), Telegram (`/add-telegram`), Slack (`/add-slack`), Discord (`/add-discord`), or Gmail (`/add-gmail`). Run one or many simultaneously.
86+
- **Isolated group context** Each group has its own `CLAUDE.md` memory, isolated filesystem, and runs in its own container sandbox.
87+
- **Main channel** Your private channel (self-chat) for admin control; every other group is fully isolated.
88+
- **Scheduled tasks** Recurring jobs that run Claude and can message you back.
89+
- **Web access** Search and fetch content from the web.
90+
- **Container isolation** Agents sandboxed in Apple Container (macOS) or Docker (macOS/Linux).
91+
- **Agent Swarms** Spin up teams of specialized agents that collaborate on complex tasks via [Agent Teams](https://code.claude.com/docs/en/agent-teams).
92+
- **Zero-config channel discovery** — Channels auto-detect credentials at startup. If credentials exist, the channel connects. Nothing to toggle.
6593
6694
## Usage
6795
68-
Talk to your assistant with the trigger word (default: `@Andy`):
96+
Talk to your assistant with the trigger word (default: `@Andy`) from any connected channel:
6997
7098
```
7199
@Andy send an overview of the sales pipeline every weekday morning at 9am (has access to my Obsidian vault folder)
72100
@Andy review the git history for the past week each Friday and update the README if there's drift
73101
@Andy every Monday at 8am, compile news on AI developments from Hacker News and TechCrunch and message me a briefing
74102
```
75103
76-
From the main channel (your self-chat), you can manage groups and tasks:
104+
From the main channel (your self-chat), manage groups and tasks:
77105
```
78106
@Andy list all scheduled tasks across groups
79107
@Andy pause the Monday briefing task
@@ -82,34 +110,37 @@ From the main channel (your self-chat), you can manage groups and tasks:
82110
83111
## Customizing
84112
85-
NanoClaw doesn't use configuration files. To make changes, just tell Claude Code what you want:
113+
No configuration files. Tell Claude Code what you want:
86114
87115
- "Change the trigger word to @Bob"
88-
- "Remember in the future to make responses shorter and more direct"
116+
- "Make responses shorter and more direct"
89117
- "Add a custom greeting when I say good morning"
90118
- "Store conversation summaries weekly"
91119
92-
Or run `/customize` for guided changes.
120+
Or run `/customize` inside Claude Code for guided changes.
93121
94122
The codebase is small enough that Claude can safely modify it.
95123
96124
## Contributing
97125
98126
**Don't add features. Add skills.**
99127
100-
If you want to add Telegram support, don't create a PR that adds Telegram alongside WhatsApp. Instead, contribute a skill file (`.claude/skills/add-telegram/SKILL.md`) that teaches Claude Code how to transform a NanoClaw installation to use Telegram.
128+
Want to add a new channel or integration? Contribute a skill (`.claude/skills/add-<name>/`) that teaches Claude Code how to transform a NanoClaw installation. Users run the skill on their fork and get clean code that does exactly what they need — not a bloated system trying to support every use case simultaneously.
101129
102-
Users then run `/add-telegram` on their fork and get clean code that does exactly what they need, not a bloated system trying to support every use case.
130+
See existing channel skills (`/add-whatsapp`, `/add-telegram`, `/add-slack`, `/add-discord`, `/add-gmail`) for the pattern.
103131
104132
### RFS (Request for Skills)
105133
106134
Skills we'd like to see:
107135
108136
**Communication Channels**
109-
- `/add-slack` - Add Slack
137+
- `/add-signal` — Add Signal as a channel
110138
111139
**Session Management**
112-
- `/clear` - Add a `/clear` command that compacts the conversation (summarizes context while preserving critical information in the same session). Requires figuring out how to trigger compaction programmatically via the Claude Agent SDK.
140+
- `/clear` — Compact the conversation (summarize context while preserving critical information in the same session). Requires figuring out how to trigger compaction programmatically via the Claude Agent SDK.
141+
142+
**Platform Support**
143+
- `/setup-windows` — Windows support via WSL2 + Docker
113144
114145
## Requirements
115146
@@ -120,22 +151,75 @@ Skills we'd like to see:
120151
121152
## Architecture
122153
123-
```
124-
WhatsApp (baileys) --> SQLite --> Polling loop --> Container (Claude Agent SDK) --> Response
154+
```mermaid
155+
graph LR
156+
subgraph Channels["Pluggable Channels"]
157+
WA[WhatsApp]
158+
TG[Telegram]
159+
SL[Slack]
160+
DC[Discord]
161+
New["Other Channel (Signal, Gmail...)"]
162+
end
163+
164+
subgraph Orchestrator["Orchestrator — index.ts"]
165+
ML[Message Loop]
166+
GQ[Group Queue]
167+
RT[Router]
168+
TS[Task Scheduler]
169+
DB[(SQLite)]
170+
end
171+
172+
subgraph Execution["Container Execution"]
173+
CR[Container Runner]
174+
LC["Linux Container"]
175+
IPC[IPC Watcher]
176+
end
177+
178+
%% Flow
179+
WA & TG & SL & DC & New -->|onMessage| ML
180+
ML --> GQ
181+
GQ -->|concurrency| CR
182+
CR --> LC
183+
LC -->|filesystem IPC| IPC
184+
IPC -->|tasks & messages| RT
185+
RT -->|Channel.sendMessage| Channels
186+
TS -->|due tasks| CR
187+
188+
%% DB Connections
189+
DB <--> ML
190+
DB <--> TS
191+
192+
%% Styling for the dynamic channel
193+
style New stroke-dasharray: 5 5,stroke-width:2px
125194
```
126195

127-
Single Node.js process. Agents execute in isolated Linux containers with filesystem isolation. Only mounted directories are accessible. Per-group message queue with concurrency control. IPC via filesystem.
196+
Single Node.js process. Channels are pluggable — each registers a factory function via `src/channels/registry.ts`, and the orchestrator instantiates whichever channels have credentials present. Agents execute in isolated Linux containers. Per-group message queue with concurrency control. IPC via filesystem.
128197

129198
Key files:
130-
- `src/index.ts` - Orchestrator: state, message loop, agent invocation
131-
- `src/channels/whatsapp.ts` - WhatsApp connection, auth, send/receive
132-
- `src/ipc.ts` - IPC watcher and task processing
133-
- `src/router.ts` - Message formatting and outbound routing
134-
- `src/group-queue.ts` - Per-group queue with global concurrency limit
135-
- `src/container-runner.ts` - Spawns streaming agent containers
136-
- `src/task-scheduler.ts` - Runs scheduled tasks
137-
- `src/db.ts` - SQLite operations (messages, groups, sessions, state)
138-
- `groups/*/CLAUDE.md` - Per-group memory
199+
200+
| File | Purpose |
201+
|------|---------|
202+
| `src/index.ts` | Orchestrator: state, message loop, agent invocation |
203+
| `src/channels/registry.ts` | Channel registry — the pluggable channel system |
204+
| `src/channels/index.ts` | Barrel imports that trigger channel self-registration |
205+
| `src/router.ts` | Message formatting and outbound routing |
206+
| `src/ipc.ts` | IPC watcher and task processing |
207+
| `src/group-queue.ts` | Per-group queue with global concurrency limit |
208+
| `src/container-runner.ts` | Spawns streaming agent containers |
209+
| `src/task-scheduler.ts` | Runs scheduled tasks |
210+
| `src/db.ts` | SQLite operations (messages, groups, sessions, state) |
211+
| `src/types.ts` | `Channel` interface, message types |
212+
| `groups/*/CLAUDE.md` | Per-group agent memory |
213+
214+
### Adding a Channel
215+
216+
Channels follow a self-registration pattern. Each channel skill adds a file to `src/channels/` that:
217+
218+
1. Implements the `Channel` interface (`connect`, `sendMessage`, `ownsJid`, `disconnect`, ...)
219+
2. Calls `registerChannel(name, factory)` at module load
220+
3. Returns `null` from the factory if credentials are missing
221+
222+
The barrel file `src/channels/index.ts` imports all channel modules, triggering registration. The orchestrator loops through registered channels and connects whichever ones return a valid instance. No if-else chains, no feature flags — just the factory pattern.
139223

140224
## FAQ
141225

@@ -145,31 +229,31 @@ Docker provides cross-platform support (macOS, Linux and even Windows via WSL2)
145229

146230
**Can I run this on Linux?**
147231

148-
Yes. Docker is the default runtime and works on both macOS and Linux. Just run `/setup`.
232+
Yes. Docker is the default runtime and works on both macOS and Linux. Run `/setup` inside Claude Code.
149233

150234
**Is this secure?**
151235

152236
Agents run in containers, not behind application-level permission checks. They can only access explicitly mounted directories. You should still review what you're running, but the codebase is small enough that you actually can. See [docs/SECURITY.md](docs/SECURITY.md) for the full security model.
153237

238+
**How do I add a channel?**
239+
240+
Run the corresponding skill inside Claude Code: `/add-whatsapp`, `/add-telegram`, `/add-slack`, `/add-discord`, or `/add-gmail`. Each skill installs the channel code, guides you through authentication, and registers it. You can run multiple channels at the same time.
241+
154242
**Why no configuration files?**
155243

156-
We don't want configuration sprawl. Every user should customize NanoClaw so that the code does exactly what they want, rather than configuring a generic system. If you prefer having config files, you can tell Claude to add them.
244+
We don't want configuration sprawl. Every user should customize NanoClaw so that the code does exactly what they need, rather than configuring a generic system. If you prefer config files, tell Claude to add them.
157245

158246
**How do I debug issues?**
159247

160-
Ask Claude Code. "Why isn't the scheduler running?" "What's in the recent logs?" "Why did this message not get a response?" That's the AI-native approach that underlies NanoClaw.
248+
Ask Claude Code. "Why isn't the scheduler running?" "What's in the recent logs?" "Why did this message not get a response?" Or run `/debug` inside Claude Code for guided troubleshooting.
161249

162-
**Why isn't the setup working for me?**
250+
**Why isn't setup working for me?**
163251

164-
If you have issues, during setup, Claude will try to dynamically fix them. If that doesn't work, run `claude`, then run `/debug`. If Claude finds an issue that is likely affecting other users, open a PR to modify the setup SKILL.md.
252+
During setup, Claude will try to dynamically fix issues. If that doesn't work, run `/debug` inside Claude Code. If Claude finds an issue likely affecting other users, open a PR to modify the setup SKILL.md.
165253

166254
**What changes will be accepted into the codebase?**
167255

168-
Only security fixes, bug fixes, and clear improvements will be accepted to the base configuration. That's all.
169-
170-
Everything else (new capabilities, OS compatibility, hardware support, enhancements) should be contributed as skills.
171-
172-
This keeps the base system minimal and lets every user customize their installation without inheriting features they don't want.
256+
Security fixes, bug fixes, and clear improvements to the core. Everything else — new channels, integrations, platform support — should be contributed as skills. This keeps the base system minimal and lets every user customize their installation without inheriting features they don't want.
173257

174258
## Community
175259

0 commit comments

Comments
 (0)