# A minister, a Raspberry Pi and Claude: why Singapore’s second brain matters for politics

Author: Fernando Nieto Lobato
Original publication: 2026-05-06
Spanish original: https://estrategiabyaleph.substack.com/p/estrategia-136-cuando-un-ministro
English URL: https://elcontemplador.github.io/estrategia-english/essays/136/
Status: Published translation

This is a translation of the original Spanish essay published on 6 May 2026. Its claims, examples and forecasts retain that historical context.

English publication: 2026-09-29

*Archive note: roles, ages, product capabilities and relative dates are preserved as reported on 6 May 2026. The Facebook quotation is transcribed from the English visible in the original image; the translated X post and other quotations are translated from the Spanish source, without claiming to recover their original English wording.*

I came across it by chance last week, in my X timeline. A tweet by Gavriel Cohen — the developer of [NanoClaw](https://nanoclaw.dev/) himself — announced, with considerable astonishment, that **Vivian Balakrishnan, Singapore’s Minister for Foreign Affairs, had just published the complete architecture of his “[second brain for a diplomat](https://gist.github.com/VivianBalakrishnan/a7d4eec3833baee4971a0ee54b08f322)”**. The tweet, reproduced below in translation, pointed to the Facebook post in which Balakrishnan announced his invention. I clicked on the [GitHub gist](https://gist.github.com/VivianBalakrishnan/a7d4eec3833baee4971a0ee54b08f322) expecting, at most, a personal note a few paragraphs long.

[![Gavriel Cohen's X post displayed in Spanish translation about the minister's second brain.](https://elcontemplador.github.io/estrategia-english/assets/images/145982e5-00d7-431b-8f0e-57120d5b7d3d_892x1493.png)](https://substackcdn.com/image/fetch/$s_!e37w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F145982e5-00d7-431b-8f0e-57120d5b7d3d_892x1493.png)

*English translation of the Spanish-rendered post by Gavriel Cohen (@Gavriel_Cohen) shown in the screenshot. The image itself says “Translated from English”; this is a retranslation, not a verified transcription of his original wording. Truncated links are not reconstructed.*

> Singapore’s Minister for Foreign Affairs published the architecture for his “second brain for a diplomat” yesterday. Architecture diagrams, design rationale, the whole package. A developer-style write-up of his own system.
>
> It runs on a Raspberry Pi. It connects to his WhatsApp and Gmail, transcribes voice notes locally, ingests speeches and articles, and builds a knowledge graph over time. It answers questions, drafts speeches and condenses information. He says he does not dare switch it off.
>
> What @VivianBala built is one of a kind. There is no other setup like it. But the things he built it from are not.
>
> It combined four open-source pieces:
>
> - @NanoClaw_AI, the agent framework: github.com/qwibitai/nanoc…
> - Mnemon, the persistent memory layer: github.com/mnemon-dev/mne…
> - OneCLI, the credential proxy that keeps API keys outside containers: github.com/onecli/onecli
> - Andrej Karpathy’s LLM Wiki pattern, the synthesis approach: x.com/karpathy/statu…
>
> None of them is his. The composition is. Then he published the composition: gist.github.com/VivianBalakris…
>
> He did not keep it in-house as an advantage for Singapore. He did not turn it into a product. He did not hoard it. He wrote it up and put it on GitHub.
>
> Tens of thousands of doctors, lawyers, researchers, investors and operators are building unique setups for themselves right now. Some simpler than Vivian’s, others more elaborate. The impulse will be to keep it to yourself. Treat it as your advantage. Think about what product or company you could build from it. Resist that impulse.
>
> Vivian put it directly: “The diplomat who learns to work with AI will have a significant advantage. I think that advantage is now.”

[![Vivian Balakrishnan's Facebook post in its original English, transcribed below.](https://elcontemplador.github.io/estrategia-english/assets/images/753aec69-369c-4163-9bd9-e396dc82a97e_1290x2014.png)](https://substackcdn.com/image/fetch/$s_!I8iL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F753aec69-369c-4163-9bd9-e396dc82a97e_1290x2014.png)

*Transcription of the original English Facebook post visible in the image, by Vivian Balakrishnan. The interface shows “2h”, not an absolute publication date.*

> AI agents have crossed a threshold I didn’t expect so soon. Not just impressive demos — but practical tools for daily use.
>
> I’ve been tinkering with what I think of as a ‘second brain’ for a diplomat, using two open-source building blocks: NanoClaw by Gavriel Cohen (github.com/qwibitai/nanoclaw) — a self-hosted Claude assistant that connects to messaging channels and runs locally on a Raspberry Pi — and the LLM Wiki pattern by Andrej Karpathy, which compiles a compounding knowledge graph from speeches and articles over time. It answers every question, researches topics, provides daily updates, drafts speeches and condenses information. It has become invaluable — I don’t dare switch it off!
>
> The diplomat who learns to work with AI will have a meaningful edge. I think that edge is now.
>
> Technical write-up: https://gist.github.com/VivianBalakrishnan/a7d4eec3833baee4971a0ee54b08f322

What I found was something else entirely.

[It was a technical document](https://gist.github.com/VivianBalakrishnan/a7d4eec3833baee4971a0ee54b08f322) several thousand words long, with diagrams, explanations of design decisions and links to the source code. I had seen documentation like that before, of course, but on GitHub, written by developers, **not by a serving foreign minister**. And here is a brief confession: I myself have spent several weeks exploring the idea of a personal “second brain” — with [Obsidian](http://obsidian.md) connected to a Claude Cowork workflow and to Codex, and some earlier experimentation with OpenClaw and Telegram — and I can say quite clearly that, unfortunately for me, I am light years away from what Balakrishnan describes. That is precisely what makes this case interesting. Not because it is beyond reach, but because it establishes a horizon that many professionals — politicians, consultants and communicators — should start taking seriously.

## The minister who codes

It is worth putting the man in context, because the first temptation would be to dismiss this as an individual eccentricity. It is not, despite how exceptional the case is at present. Vivian Balakrishnan, 65, **an ophthalmologist by training**, studied medicine at the National University of Singapore after receiving the President’s Scholarship, and went on to run Singapore General Hospital before entering politics in 2001. He has been **Minister for Foreign Affairs since 2015**, but between 2014 and 2021 he also led Singapore’s Smart Nation Initiative, the broad strategic framework under which the country built its national digital identity, integrated public services, interoperable payments system and national artificial intelligence strategy.

Then there is the telling detail. In 2015, when Prime Minister Lee Hsien Loong published a Sudoku solver written in C++ as a hobby project, Balakrishnan responded by translating it into another programming language and commenting wryly on the technical difficulties involved. This is not a minister who discovered ChatGPT in 2025: he is a public official with more than a decade of practical experience in the state’s digital transformation, who also writes code for pleasure.

That completely changes how we should read what he has published.

## NanoClaw, explained for everyone

Let us strip away the technical layers and focus on what matters. The infographic further down will probably make it even clearer and easier to understand if you do not have a technical background.

[NanoClaw](https://github.com/qwibitai/nanoclaw) is a personal AI assistant — similar to [OpenClaw](https://openclaw.es/), but minimalist in design and more focused on security — which the minister runs on a [Raspberry Pi](https://www.raspberrypi.com/), a low-cost mini-computer that fits in the palm of your hand, in his own local environment. It is built on Claude, Anthropic’s model, but the important detail is not the model: it is the plumbing around it.

That plumbing **does three things that no “standard ChatGPT” yet does**. First, it connects to his actual communication channels — WhatsApp, Gmail and a small website — transcribes his voice notes on the device itself, without the audio ever going out onto the internet, and processes images. Second, it runs scheduled tasks: daily summaries, alerts and ingestion of articles the minister saves from his phone using Obsidian’s Web Clipper. Third — and this is what is really interesting — **it accumulates knowledge over time**.

The difference between accumulating knowledge and simply “searching documents” is not trivial. Most of today’s AI assistants do the latter: they index files and retrieve snippets of text when you ask a question. Useful, but superficial. What Balakrishnan has built does the former: a system that distils discrete facts from every speech, article or conversation it ingests, organises them into a kind of knowledge map — entities, concepts and timelines — and then synthesises them into wiki-style pages that he can read and correct himself in Obsidian.

**It is the practical implementation of an idea popularised by Andrej Karpathy** — co-founder of OpenAI, former head of AI at Tesla and now one of the sector’s leading voices — under the name [LLM Wiki](https://x.com/karpathy/status/2039805659525644595?s=20): the idea that **a useful assistant should do more than search text; it should build a body of synthesised knowledge that becomes more valuable the more you use it**. Conceptually, it is the difference between having a search engine and having a notebook in which someone records, on your behalf, what matters about everything you read.

For readers with a more technical background, all the code and documentation are openly published: the [main gist](https://gist.github.com/VivianBalakrishnan/a7d4eec3833baee4971a0ee54b08f322) and the [NanoClaw repository](https://github.com/qwibitai/nanoclaw). For everyone else, this mental picture will do: a Raspberry Pi on a desk, connected to WhatsApp, reading speeches and articles, building over months a map of what its boss knows and needs to remember.

Following what we learnt in last week’s issue, we asked ChatGPT Images to create an **infographic** explaining the system’s operation in a very simple, stripped-down way, so that anyone could understand it. Here is the visual summary, which should make the process and system even easier to grasp.

[![Generated infographic explaining inputs, NanoClaw processing, outputs and structured memory.](https://elcontemplador.github.io/estrategia-english/assets/images/3e243acd-a904-4efe-ad4d-2fbcba4f9350_1024x1536.png)](https://substackcdn.com/image/fetch/$s_!59Hs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e243acd-a904-4efe-ad4d-2fbcba4f9350_1024x1536.png)

*English transcription of the generated infographic: “How the Singapore foreign minister’s ‘second brain’ works”. A personal AI assistant that reads, listens, remembers and helps with decisions. The graphic’s claims about local processing are reproduced as its simplified explanation; they should not be read as proof that all model inference happens locally.*

**1. Inputs — information arriving each day:** WhatsApp messages; Gmail emails; voice notes with local transcription; articles and websites clipped from a phone; documents, speeches and reports; images.

**2. The system — NanoClaw:** runs on a Raspberry Pi in the local environment. Transcribes and processes locally: voice notes become text without going out onto the internet. Processes images and files: extracts useful information from documents and images. Scheduled tasks: daily summaries, alerts, automatic content ingestion and so on. AI with context, Claude: understands, reasons and generates useful, personalised responses.

**3. Outputs — what the minister receives:** personalised summaries; alerts and reminders; answers and support in real time; wiki-style pages in Obsidian; maps, timelines and relationships; information ready for decision-making.

**4. Structured memory — the real “brain”:** turns scattered information into useful knowledge that grows over time. It extracts key facts from every message, article or document; organises them into a knowledge graph of entities, concepts, dates, places and relationships; generates wiki pages in Obsidian by topic, person, organisation and event; knowledge becomes connected, updated and more valuable every day.

**How it works in practice:** 1. New information arrives through the connected channels. 2. The system processes it locally and extracts what matters. 3. AI understands it, relates it to what it already knows and saves it. 4. Ready-to-use summaries, alerts and wiki pages are generated. 5. The minister reviews, corrects and adds his judgement. 6. The system learns and improves with each cycle.

**Key principles:** privacy — sensitive data are processed locally; structured memory, not just text search; transparency — code and architecture published; human review at all times; designed to help him decide, not to decide for him.

Closing text: “In a few words: it is not a chatbot. It is a personal infrastructure for memory and knowledge that helps a diplomat understand better, remember more and decide more clearly.”

## Three strategic lessons from this case

### 1. Radical transparency is beginning to be a source of credibility, not a risk

The natural reflex in any government office would be to hide a system like this or dress it up in an empty press release. Balakrishnan does the opposite: he publishes the architecture, design decisions, security criteria and link to NanoClaw’s open repository. He even explains mechanisms for keeping API usage down, such as preliminary scripts that avoid waking the agent when an automated check is enough. In doing so, he turns the tool into a political message: he conveys technical competence and a willingness to be held accountable. **Recent European “counterexamples” are telling.** Sweden’s prime minister, Ulf Kristersson, acknowledged last August that he used ChatGPT for “second opinions” and immediately faced a media crisis: “You were elected by the voters, not ChatGPT.” In the United Kingdom, minister Peter Kyle’s prompts were published following a citizen’s freedom-of-information request. The lesson: using AI quietly and explaining it poorly becomes a scandal. Publishing it with sound judgement neutralises the scandal before it exists.

### 2. The difference between searching documents and building memory is the difference between an organisation that reacts and one that learns

In any public administration — and any professional practice or organisation, including our own — useful knowledge is scattered across emails, reports, meetings, notes and personal memory. Every change of cycle destroys a large part of that knowledge. A structured-memory system such as Balakrishnan’s is neither a search engine nor a chatbot: it is infrastructure for preserving continuity. In diplomacy, where every precedent and nuance carries weight, that capability is a pure competitive advantage. But the lesson applies equally to any consultant, teacher or communication professional whose livelihood depends on accumulated intellectual work.

### 3. A missing layer is neither fascination nor regulation: it is operational understanding

Much of the public debate about AI in the West swings between two extremes: superficial enthusiasm for the latest fashionable tool and abstract regulatory fear. What is missing — and where Singapore is several years ahead — is the middle ground: knowing exactly what an agent is, what giving it memory entails, why it matters that certain processes run locally, and when to automate and when not to. Without that layer, laws are written blind, public projects are contracted to consultancies that sell them as black boxes, and people who make their living in communication or political consultancy are excluded from the conversation that matters because they do not understand it.

## Why all this matters

**There is a line from Balakrishnan himself, at the end of his post, that is worth reading slowly: “The diplomat who learns to work with AI will have a meaningful edge. I think that edge is now.”** The important thing is not the sentence. The important thing is that, when it came with a public repository containing the entire architecture, it ceased to be a declaration and became **evidence that he knows what he is talking about**.

That is probably the new rule of the game for political communication about AI: it is not about speaking eloquently about the future. Increasingly, it is about “showing the code”.

[Fernando Nieto Lobato](https://www.linkedin.com/in/fernandonietolobato/)

*Director of Digital Innovation at Institución Educativa ALEPH and editor of the estrategIA newsletter*
