What Is This? NanoClaw is a personal AI assistant built on Anthropic's Claude that runs entirely on a Raspberry Pi. It connects to messaging channels such as WhatsApp, Telegram, Slack, and Discord, processes voice and images, schedules recurring tasks, and—unlike a standard chatbot—accumulates knowledge over time through a structured memory system.
The Core Problem It Solves Standard large language model (LLM) assistants are stateless: they forget everything between sessions. The typical solution is retrieval-augmented generation (RAG) over a document store, but RAG only retrieves chunks of raw text, not synthesized knowledge.
NanoClaw addresses this in three ways:
Extract: It pulls discrete facts, insights, and style preferences from raw documents (such as speeches, articles, or conversations) into a graph database. Each entry is a self-contained, retrievable statement.
Synthesize: It compiles those facts into human-readable wiki pages organized by entity, concept, and timeline.
Recall: On every agent invocation, it runs a semantic query against the graph using the user’s message as input. Relevant entries are injected as context before the agent responds.
The result is an agent that gets smarter over time, can surface what it knows automatically, and can cite specific stored facts when explaining its reasoning.
Architecture The system is composed of three main layers:
Raw Sources → mnemon graph → wiki pages (transcripts, articles, web clips) → (structured facts, graph nodes, semantic retrieval) → (narrative syntheses, human-readable, cross-referenced)
Layer 1 — Raw Sources These are archival files, never modified after storage: - Speech transcripts in markdown format - Articles saved from URL ingestion or mobile web clipping (such as through Obsidian Web Clipper)
Layer 2 — mnemon Knowledge Graph This is a SQLite-backed graph database where each entry has content, category, importance score, tags, timestamp, and graph edges to related entries. The graph is queried semantically using local vector embeddings (Ollama + nomic-embed-text).
There are two stores: - Global: shared knowledge across all groups, read-only for non-main agents - Local: per-group memory, writable only by that group's agent
Layer 3 — Wiki Pages These are synthesized markdown files compiled from mnemon facts. They are not just raw extracts, but full narrative pages with cross-references, organized into entities/, concepts/, and timelines/ subdirectories. Pages are browsable in Obsidian on macOS and iOS.
- NanoClaw (Node.js + TypeScript): Orchestrates the message loop, manages containers, and handles channel routing. - Claude Agent SDK: Runs agent logic inside isolated Docker containers per group. - Baileys: Implements WhatsApp Web protocol (no business API required). - mnemon: Custom command-line knowledge graph tool (combines SQLite and graph traversal). - Ollama + nomic-embed-text: Provides local vector embeddings for semantic recall, running on the Raspberry Pi without cloud calls. - whisper.cpp: Performs local voice transcription, converting voice notes to text directly on the device. - sharp: Handles image resizing and processing before passing images to multimodal Claude. - OneCLI: Handles credential proxying so containers never see raw API keys. - SQLite: Used for message storage, group registry, and task scheduling. - systemd: Handles process management (for the NanoClaw service and article watcher).
Messaging Channels: WhatsApp, Gmail (read and send), and Web are active. Telegram, Slack, and Discord are available as optional skill branches.
Multimodal: Voice notes are transcribed locally using whisper.cpp before the agent processes them. Images are resized and passed as multimodal content to Claude.
Memory: Every time the agent is called, it triggers a semantic recall against the knowledge graph. Relevant facts automatically surface as a system reminder—the agent never needs to decide to "look something up."
Task Scheduler: Supports cron jobs, interval, and one-time tasks. Includes a bash pre-check script to avoid waking the agent unnecessarily, keeping API usage minimal.
Multi-group Isolation: Each registered group receives an isolated Docker container, its own filesystem, local mnemon store, and Claude session. Groups cannot access each other's data, ensuring privacy and security.
NanoClaw thus acts as a persistent, evolving AI assistant, particularly useful for roles such as diplomats or professionals who need their assistant to remember context, style preferences, and accumulated knowledge over time, beyond the capabilities of standard chatbots.