Zbrain
LLM-maintained knowledge system. Started as a personal wiki with structured philosophy, projects, and synthesis - evolved into a shared second brain co-maintained with a collaborator.
TL;DR
Shared second brain. My collaborator and I dump raw thoughts via Telegram; an LLM summarizes, clusters, and cross-references them automatically. You can browse mine live at okzaid.com/brain.
Overview
Zbrain is a second brain that an LLM actively maintains. Raw notes, conversations, and artifacts land in an ingestion zone. An agent summarizes, cross-links, and promotes them into structured wiki pages across categories like philosophy, projects, playbooks, and synthesis. The system started as a personal wiki and has expanded into a shared knowledge graph co-maintained with a collaborator.
You can browse my own running Zbrain at okzaid.com/brain - the portfolio is literally projecting the wiki you'd otherwise have to clone and open in Obsidian.
Inspiration
The seed idea came from an Andrej Karpathy tweet about personal LLM-maintained knowledge systems - the insight that the tedious part of a knowledge base is not the reading or the thinking, it is the bookkeeping, and that is exactly the work LLMs are good at and humans are bad at. Zbrain is my attempt at a concrete implementation of that idea.
Problem
Every knowledge system has the same failure mode: the friction of maintaining it is higher than the value of having it. Obsidian and Notion give you beautifully structured vaults that rot within weeks because nobody wants to write the structure manually. Tags go stale. Links go uncreated. Synthesis never happens.
The promise of "second brain" has been a promise for a decade. The missing piece was an agent that could do the curation work without a human doing it every evening.
Approach
The system is structured around a clean separation between raw input and structured output, with an LLM doing the work in between.
- Raw folder: Unstructured ingestion zone. Chat transcripts, voice notes, pasted articles, scraped sources. No structure required, no format required.
- Wiki folder: Structured output zone. Each entry has frontmatter (type, created, updated, status, tags, sources), a consistent section template (thesis, status, stack, decisions, learnings, outcomes, open questions, links), and bidirectional wiki-style links.
- Index: A top-level catalog that tracks every wiki page with one-line descriptions. Regenerated on every ingest.
- Agent workflow: Ingestion pulls raw material, synthesizes it into the wiki format, cross-links against existing pages, flags contradictions with earlier entries, and surfaces open questions the human needs to answer.
- Shared layer: The wiki is version-controlled and shared with a collaborator. Both contributors and the agent write to the same structure.
- Live projection: The portfolio pulls the wiki via git submodule and renders it at /brain with an Obsidian-style force-directed graph plus a browsable file tree.
Key Decisions
- Markdown in git over a database: Plain text with frontmatter is portable, diffable, reviewable, and survives any tool change. Databases lock you in; markdown files do not.
- LLM as librarian, not oracle: The agent does curation, linking, and synthesis. It does not decide what is true. Every entry has explicit provenance via the sources frontmatter field so you can always trace a claim back to its raw origin.
- Frontmatter-typed entries: Every entry declares its type (project / playbook / synthesis / etc.) and status. This lets the index and any downstream tool filter semantically rather than by folder.
- Separate raw from wiki: The discipline of keeping ingestion distinct from structured output means the wiki stays legible. Raw material can be messy; wiki entries cannot.
- Shared from day one: Designing for a collaborator from the start forces the format to be self-explanatory. Single-user systems drift into personal shorthand that becomes unreadable to anyone else including future-you.
Challenges
Provenance is the hardest problem. When an LLM synthesizes a wiki page from five raw sources, how do you know which claim came from where? The answer was strict sourcing: every wiki entry's frontmatter lists its raw sources, and claims that are LLM-synthesized get flagged differently than claims lifted directly from source material.
Contradiction detection is the second hardest. Notes written in January can conflict with notes written in March. A naive ingest overwrites the earlier claim. The better behavior is to flag the tension in a synthesis note so the human can reconcile it. "Dual-source tension flagged" is a status the system explicitly tracks.
Keeping the wiki honest when an LLM is doing the writing means resisting the temptation to let it confabulate structure. Empty sections stay empty. "Needs info" is a valid status. Overconfident pages are worse than sparse ones.
Outcome
Active knowledge system with structured categories (projects, philosophy, playbooks, synthesis) maintained across an LLM-driven ingest loop. Shared with a collaborator. Contains over a year of structured project history, playbook patterns distilled from recurring decisions, and cross-linked synthesis pages that would be impossible to maintain manually. Live at okzaid.com/brain.