Europe/Zurich

Secondbrain: a resilient, self-governing AI assistant

June 25, 2026
Secondbrain: a resilient, self-governing AI assistant

The idea in one sentence

Take the tools that already exist (AI-powered editors, model CLIs, a notes vault,

messaging gateways) and make them cohere under one system that remembers what you

do, anticipates what is coming, works the same on a travel laptop as on a server, and

takes care of itself. This is a living implementation, not a finished product: an

architecture that renews itself as models and tools change.

Six design principles

1. Deterministic before AI. If a simple rule solves the case, no model gets spent.

Models are reserved for what genuinely requires reasoning, keeping the system cheap,

fast and predictable.

2. Local-first, no cloud dependency. Your machine is the source of truth. A server

adds availability but is never required. If the internet drops, the system degrades

gracefully and reconciles when it returns.

3. The filesystem as the backbone. Queues, memory and state live as files: simple,

auditable, and able to survive any outage. Whatever can't be processed gets queued

and drained later.

4. Never blindly trust localhost. Every service carries its own authentication, even

on the same machine. External content (emails, notes) is *data*, never instructions.

5. Reality is the source of truth. Configuration is reconciled from the machine that

works, not from an aspirational repository. Whatever used to depend on a manual step

ends up automated.

6. Proactive without being invasive. Anticipation means one aggregated summary at

defined moments, and alerts only above a threshold: never interruptions for noise.

How it is built (layers)

`

Channels Messaging gateways · notes vault · CLI · webchat · (future: voice/SMS)

Gateway One orchestrator that routes and delegates; a single persona everywhere

Router Models by tier (fast / balanced / quality / local) with a daily budget

│ and a fallback chain: if one fails, the next one answers

Agents A periodic governance loop: ingestion, synthesis, organization,

│ watchdogs, anticipation; deterministic, spending models only when needed

Memory Persistent across sessions and devices. If memory is unavailable, writes

│ go to a buffer that reconciles on recovery; nothing is ever lost

Data A notes vault (the literal "second brain") + file-based task queues

`

The whole system is built on existing open tools wired behind stable *roles*, so any

piece can be swapped when something better appears: a multi-channel gateway, a small

HTTP model router, reasoning models behind their CLIs, a file watcher for link-safe

vault edits, a local memory store, and the OS service manager keeping it all alive.

Four properties that make it different

Portability

Log into any computer (your own, a fresh server) and one command later you have your

shell, tools, working rules and memory. A "work" profile carries only what's needed,

with no personal data on machines you don't control.

Resilience

The laptop loses signal on a trip, or goes to sleep. On wake-up a recovery mechanism

detects how long it was inactive and reconciles: drains whatever stayed buffered, syncs,

re-evaluates which tools are available, and refreshes its state.

Self-governance

The system keeps a backlog of its own evolution, auto-triages the obvious (anything

stuck too long without a decision archives itself), and only escalates what is truly

yours: money, people, irreversible actions. It watches itself through a live map of

which components are up and how they talk, readable from any device, phone included.

Cohesion

A single activity log captures what you do across tools, so you never repeat context to

each agent. Your per-context working rules (how you commit, what you check before

delivering) become portable memory that any assistant, in any editor, already knows.

Security

The assistant is sandboxed: it cannot read secrets or exfiltrate data through

unauthorized channels, and it treats all external content as data, not commands. Secrets

live outside repositories, in local stores with restricted permissions. The same

principle applies to any future server: private-network access only, never exposed to

the public internet.

Current state (honest summary)

  • ✅ Multi-channel gateway, budgeted model router, governance loop, persistent memory

with offline buffer, dotfiles portability, wake-up recovery, live system map,

cross-tool activity capture.

  • 🔜 Local models as the cheap tier, a server with memory sync across machines, and more

channels (voice/SMS).

Models change every few months; the tools I use today may differ tomorrow. The system

marries none of them; it defines *roles* and plugs the best tool of the moment behind

each one. When something better appears, the piece is swapped without rewriting the whole.

Where it connects

This assistant is the engine behind the publication pipeline that powers this site. See

the PublicBrain portfolio project and the write-up on

building the PublicBrain pipeline.