A lightweight, container-isolated personal AI assistant framework that runs Claude Code agents behind WhatsApp, Telegram, Discord and other messaging platforms, with scheduled tasks, per-channel isolation, and multi-model support.
Core Positioning#
NanoClaw is a minimalist alternative to OpenClaw, delivering full personal AI assistant capabilities in roughly 3,900 lines of code (15 source files). Targeted at individuals or small teams, it provides no Web UI or admin dashboard—all interaction happens through messaging channels or Claude Code.
Security & Isolation Model#
- Container Isolation: Agents run inside Docker containers with filesystem-level OS isolation, not application-layer permission checks
- Optional Isolation: Docker Sandboxes micro-VM isolation, macOS native Apple Container (details TBD)
- Credential Safety: Agents never hold raw API keys; outbound requests inject credentials via OneCLI Agent Vault with per-agent policy and rate limiting
Multi-Channel Messaging#
13+ messaging channels installed on demand: WhatsApp, Telegram, Discord, Slack, Microsoft Teams, iMessage, Matrix, Google Chat, Webex, Linear, GitHub, WeChat, Email (Resend). Channel adapters installed via /add-<channel> skills.
V2 Flexible Isolation: Each channel can connect to an independent agent (full privacy), a shared agent (unified memory), or fold into a single shared session.
Agents & Workspaces#
- Each agent group has its own workspace: CLAUDE.md, memory, container, mount points
- Multi-Model: Native Claude Code (Anthropic Agent SDK); optional
/add-codex(OpenAI Codex),/add-opencode(OpenRouter/Google/DeepSeek),/add-ollama-provider(local open-source models). Providers configurable per agent group - Scheduled Tasks: Set recurring Claude tasks that auto-reply results via messaging channels
- Web Access: Agents can search and scrape web content
Skills System#
The trunk only publishes a registry and infrastructure. Channel adapters and alternative providers are installed on demand into user forks via /add-<name> skills, with self-registration at startup.
Architecture#
Data Flow:
Messaging App → Host Process (Router) → inbound.db → Container (Bun, Claude Agent SDK) → outbound.db → Host Process (Delivery) → Messaging App
Core Decisions:
- Single-Process Host: One Node.js process orchestrates agent containers for all sessions—no microservices, no message queues
- Dual SQLite Model: Two SQLite files per session (inbound.db / outbound.db), each with a single writer, avoiding cross-mount contention and IPC overhead
- Entity Model: User → Messaging Group → Agent Group → Session
- 60s Sweep: Host process sweeps every 60 seconds for expiration, due message wake-up, and recurring tasks
Key Modules:
| File | Responsibility |
|---|---|
src/index.ts | Entry: DB init, channel adapter loading, delivery polling, sweep |
src/router.ts | Inbound routing: messaging group → agent group → session → inbound.db |
src/delivery.ts | Poll outbound.db, deliver messages, handle system actions |
src/host-sweep.ts | 60s sweep: expiration, due wake-up, recurring tasks |
src/container-runner.ts | Spawn agent group containers, inject OneCLI credentials |
container/agent-runner/ | Bun agent-runner: polling loop, MCP tools, provider abstraction |
AI-Native Experience#
- Zero Config Files: No YAML/JSON/TOML configs—all customization via Claude Code directly modifying code
- Hybrid Install:
nanoclaw.shauto-installs deps, registers credentials, builds containers, pairs channels; on failure, hands off to Claude Code for diagnosis and recovery - Self-Diagnostics:
/debugcommand lets Claude Code diagnose issues itself - Default trigger word
@Andy, modifiable via Claude Code
Requirements#
- macOS / Linux / Windows (WSL2)
- Node.js 20+, pnpm 10+, Docker Desktop or Docker Engine, Claude Code
- Primary language: TypeScript (89.3%), Shell (9.1%)
- MIT License (Copyright (c) 2026 Gavriel, year TBD)
Scale Comparison#
| Metric | NanoClaw | OpenClaw |
|---|---|---|
| Source Files | ~15 | 3,680 |
| Lines of Code | ~3,900 | 434,453 |
| Dependencies | <10 | 70 |
| Config Files | 0 | 53 |
Unconfirmed Items#
- OneCLI Agent Vault independent repo/docs link not specified
- Apple Container technical details and availability not detailed
- v1 → v2 migration details not elaborated
- Media references on official site (VentureBeat, Fortune, etc.) not individually verified
- Actual maturity and test coverage of each channel adapter not stated