Singapore's Foreign Minister Vivian Balakrishnan has publicly detailed the AI assistant he built for himself — a system he calls "the second brain of a diplomat." It runs entirely on a Raspberry Pi 5 (a credit-card-sized single-board computer), hooked up to his WhatsApp and Gmail. It can transcribe voice notes, summarize articles, draft speeches, answer questions, and it gets smarter over time. Balakrishnan says he "dares not turn it off."

The system is built on the open-source agent framework NanoClaw, using the Claude Agent SDK to run agents in isolated Docker containers. Each chat group gets its own container — completely sandboxed and invisible to others, similar to the approach taken by projects like Tencent Cloud's Cube Sandbox. WhatsApp integration is handled by Baileys, an open-source implementation of the WhatsApp Web protocol, no commercial API required. Voice notes are transcribed locally on the device using whisper.cpp, never uploaded to the cloud.
https://gist.github.com/VivianBalakrishnan/a7d4eec3833baee4971a0ee54b08f322
Knowledge storage follows a three-tier architecture inspired by Andrej Karpathy's LLM Wiki pattern. The first layer holds raw material (speeches, articles) — archived and never modified. The second layer is a mnemon knowledge graph built on SQLite, which extracts facts from the raw material as independent nodes, using a locally running nomic-embed-text model (a 274MB vector embedding model) for semantic search. The third layer is a Wiki page that compiles facts into human-readable narrative documents organized by entity, concept, and timeline, synced via iCloud to Obsidian on the minister's phone. Every time a message comes in, the system automatically queries the knowledge graph and injects relevant facts into the context.
On the security front, containers access APIs through OneCLI credential proxies — never touching raw keys. Path mounts are whitelisted, blocking sensitive directories like .ssh and .aws. All speech transcription and vector embedding happens locally; policy-sensitive content never leaves the device.
Balakrishnan has published the full architecture on GitHub, saying, "A diplomat who learns to collaborate with AI will have a real advantage. I believe the window for that advantage is now."