Singapore Foreign Minister Assembles AI Diplomatic Assistant on Raspberry Pi Using Claude Code

According to monitoring by Beating, Singapore’s Foreign Minister Vivian Balakrishnan has unveiled his self-built AI assistant system, referring to it as the ‘diplomat’s second brain.’ The entire system runs on a Raspberry Pi 5 (a credit card-sized microcomputer) and is connected to his WhatsApp and Gmail, capable of transcribing voice notes, extracting articles, drafting speeches, answering questions, and continuously accumulating knowledge with use. Balakrishnan stated, ‘I dare not turn it off.’ He later added on X that he has never used an IDE (Integrated Development Environment), and all code editing was done by Claude Code. He described his work as ‘tool assembly,’ clearly distinguishing it from Karpathy’s concept of ‘vibe coding.’ The system is built on the open-source agent framework NanoClaw and runs the agent in an isolated Docker container via the Claude Agent SDK, with each chat group isolated and invisible to one another. The WhatsApp integration uses Baileys (an open-source implementation of the WhatsApp Web protocol) and does not rely on commercial APIs. Voice notes are transcribed locally on the device using whisper.cpp, without uploading to the cloud. Knowledge storage is structured in three layers, inspired by Andrej Karpathy’s LLM Wiki model: the first layer contains raw materials (speeches, articles) that are archived without modification; the second layer is a mnemon knowledge graph (based on an SQLite graph database) that extracts facts from the raw materials into independent nodes, using a locally running nomic-embed-text (a 274MB vector embedding model) for semantic retrieval; the third layer is a Wiki page that compiles facts into human-readable narrative documents, categorized by entities, concepts, and timelines, and synced to the Obsidian app on his phone via iCloud. Each time a message is received, the system automatically queries the knowledge graph and injects relevant facts into the context. In terms of security design, the container accesses APIs through OneCLI credential proxies, avoiding exposure to raw keys; path mounts are restricted by a whitelist, blocking sensitive directories like .ssh and .aws. All voice transcriptions and vector embeddings are completed locally, ensuring that policy-sensitive content does not leave the device. Balakrishnan has published the complete architecture documentation on GitHub, stating, ‘Diplomats who learn to collaborate with AI will have a real advantage, and I believe that advantage window is now.’

This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments