Gate News message, April 27 — Singapore’s Foreign Minister Vivian Balakrishnan recently announced he has built a custom AI assistant system, which he calls “the diplomat’s second brain,” running on a Raspberry Pi 5 (a credit-card-sized microcomputer). The system integrates with his WhatsApp and Gmail, enabling voice note transcription, article summarization, speech drafting, question answering, and continuous knowledge accumulation. Balakrishnan stated he “does not dare turn it off.” He clarified on X that he has never used an IDE (integrated development environment), with all code editing performed by Claude Code, describing his work as “tool assembly” to distinguish it from Andrej Karpathy’s “vibe coding” concept.
The system is built on the open-source agent framework NanoClaw and runs Claude Agent SDK within isolated Docker containers, with each chat group operating independently. WhatsApp integration uses Baileys, an open-source implementation of the WhatsApp Web protocol, avoiding reliance on commercial APIs. Voice transcription is handled locally via whisper.cpp without uploading to cloud services.
Knowledge storage employs a three-layer architecture inspired by Karpathy’s LLM Wiki model. The first layer stores raw materials (speeches, articles) without modification; the second layer uses mnemon, a SQLite-based knowledge graph that extracts facts as independent nodes and performs semantic retrieval via nomic-embed-text, a 274MB local embedding model; the third layer compiles facts into human-readable Wiki pages organized by entities, concepts, and timelines, synced to Obsidian on his phone via iCloud. Upon receiving messages, the system automatically queries the knowledge graph and injects relevant facts into context.
Security measures include container access to APIs through OneCLI credential proxies without exposing raw keys, whitelist-restricted path mounting that blocks sensitive directories like .ssh and .aws, and local processing of all voice transcription and vector embedding. Balakrishnan published the complete architecture documentation on GitHub, stating “diplomats who learn to collaborate with AI will have true advantage, and I believe that advantage window is now.”
Related News
Telegram launches a no-code AI bot tool, supporting GPT and Llama models
Stanford AI course combined with industry leaders Huang Renxun and Altman, challenging to create value for the world in just ten weeks!
UAE Announces Shift Toward AI Government Model in the Next Two Years