nanocoai/nanoclaw
A lightweight alternative to OpenClaw that runs in containers for security. Connects to WhatsApp, Telegram, Slack, Discord, Gmail and other messaging apps,, has memory, scheduled jobs, and runs directly on Anthropic's Agents SDK
NanoClaw – An AI‑assistant platform that runs each agent in its own Docker container
What it is – NanoClaw is a lightweight, open‑source framework for building personal AI assistants (agents) that talk on any chat platform you choose. The key idea is isolation: every agent runs inside its own Linux container, so it can only see the files you explicitly mount and never gets direct access to your host system or API keys.
Why it exists – The author felt that existing “all‑in‑one” AI‑assistant projects (e.g., OpenClaw) were huge, hard to audit, and relied on in‑process permission checks. NanoClaw strips the stack down to a single Node process plus a handful of source files, while still giving each agent full OS‑level sandboxing via Docker.
How you get started – Clone the repo and run bash nanoclaw.sh. The script:
- Installs Node, pnpm and Docker if they’re missing.
- Registers your Anthropic (Claude) credentials via the OneCLI “Agent Vault”.
- Builds a Docker image that will run the agent.
- Pairs the agent with a messaging channel (Slack, Telegram, Discord, WhatsApp, iMessage, etc.). If any step fails, the script hands the problem to Claude Code, an AI‑driven debugger that can diagnose and retry automatically.
Core concepts
| Concept | What it means |
|---|---|
| Agent group | A logical collection of agents that share a memory store (CLAUDE.md) and a dedicated container. |
| Channel adapters | Small plug‑ins that translate messages from a chat service into the internal format. They are installed on demand with commands like /add-slack or /add-telegram. |
| Isolation model | Each channel can be wired to its own agent (full privacy), to a shared agent (single memory across channels), or to a hybrid “shared session” where one conversation spans many surfaces. |
| OneCLI Agent Vault | A proxy that injects API keys (Anthropic, OpenAI, etc.) at request time, so the keys never appear inside the container. |
| Scheduled tasks | Recurring jobs that the agent can run, optionally guarded by “script gates” that skip execution when there’s no work. |
| Templates | Ready‑made bundles of instructions, tools and skills that you can copy into a new groups/<name> folder with ncl groups create --template <ref>. |
Supported chat platforms – WhatsApp, Telegram, Discord, Slack, Microsoft Teams, iMessage, Matrix, Google Chat, Webex, Linear, GitHub, WeChat, and email (via Resend). New adapters are added as skills on a separate channels branch and copied into your fork with a simple /add‑<channel> command.
Model back‑ends – By default NanoClaw talks to Anthropic’s Claude via the official Claude Agent SDK. You can swap in other providers (OpenAI Codex, OpenRouter via OpenCode, local Ollama models, etc.) with /add‑opencode or /add‑ollama‑provider. Different agent groups can use different providers simultaneously.
Security highlights
- Container sandbox – Agents run in Docker containers (macOS, Linux, or WSL2). Only the directories you mount are visible.
- No raw keys inside containers – All outbound API calls go through OneCLI’s Agent Vault, which enforces per‑agent policies and rate limits.
- No user accounts – NanoClaw stores nothing in the cloud; the only optional cloud interaction is fetching a pre‑built hardened agent image or enabling community‑portal perks.
Customization workflow – Instead of a sprawling config file, you tell the built‑in Claude Code AI what you want (e.g., “change the trigger word to @Bob” or “add a custom morning greeting”). Claude can edit the source code directly because the codebase is intentionally tiny.
Development & contribution model – The main trunk branch stays minimal (registry, orchestration, core DB). New channel adapters live on a channels branch, new provider adapters on a providers branch. Users install them in their own fork via the /add‑<name> skills; the project only accepts security fixes and bug fixes to the core.
Typical use‑case – After setup you can talk to your assistant with a trigger word (default @Andy):
@Andy send an overview of the sales pipeline every weekday morning at 9am (has access to my Obsidian vault folder)
@Andy review the git history for the past week each Friday and update the README if there’s drift
The assistant runs in its isolated container, pulls the requested data, and posts the result back to the channel you invoked it from.
License – MIT.
All details above are taken directly from the repository’s README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project