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 Articles
Pi Network launches the PiRC1 token framework, banning projects that have no real-world applications from issuing tokens
OpenClaw 2026.4.22 Unifies Plugin Lifecycle Across Codex and Pi Harnesses, Reduces Plugin Load Time by Up to 90%
Pi Network releases an opinion solicitation draft for PiRC2, opening contract review for the testnet subscription
Pi Network founder May 7 discussed human identity verification in the AI era at Consensus 2026
Pi Network issues a node upgrade warning: if you haven’t upgraded by April 27, you risk being disconnected