brain
Gives people and agents one record of what was decided and why, kept current by the agent.
- Role
- Author
- What
- A markdown wiki an agent maintains, with a local web app to read it
- Built with
- Python, Astro; local-first, MIT
- Releases
- v0.20.0 to v0.31.0, July and August 2026
Agents need a memory that does not drift.
A coding agent starts every session knowing nothing about why the code is the way it is. Notes in chat are gone the next day, and a wiki nobody tends goes stale within weeks.
brain is the pattern of a wiki an LLM maintains, made into a product: governance, health checks, and a queue that collects the work while you are away. The agent keeps it current; you talk to the agent. And no LLM ever runs on a schedule.
What it does.
-
Sources in, unchanged. The wiki is the synthesis.
Repositories, documents and conversations land under
sources/and are never rewritten. The agent keeps the wiki: decisions, discussions, state, one shelf per repository, and every claim cites the source it came from. The rulebook isAGENTS.md. You don’t read it; your agent does.
A decision page, with its status, its confidence and how many pages rely on it. -
A graph of what relies on what.
Every link between pages is in a graph: solid where a person wrote it, dashed where the agent suggested it, and a flag on low-confidence pages the rest leans on. Orphans, hubs and dead ends are listed, so the wiki can be tended, not just written.
-
Checks that run without a model.
The deterministic half runs on a local timer for free: changes in sibling repositories, pages getting old, link health. Everything that needs a model waits in a queue for the operator’s next session. Validation and source checks are one command each.
$ python3 tools/brain.py validate && python3 tools/brain.py check
OK 74 page(s) valid 197 sources checked across 74 pages 10 skipped (sibling repos not on this machine; use --verbose to list)Real output from a clean clone, offline.
-
An optional tier for many agents.
Off by default: brain can be the hub for many agents, each signing what it writes with its own key, on an append-only event stream, woken when a matching event lands. The brain is never the harness and never runs a model itself.
What it shows about how I work.
brain holds specifications, decisions and handoffs ADR-first, as a versioned repository. It is the working method behind my AI-native work, and where pi-brain started. It is how I think a team should keep its knowledge: written once, cited always, tended in the open.
How I work with knowledge bases
- Source on GitHubmisabegovic/brain, MIT
- pi-brainthe same idea for the pi harness
- How I work with knowledge basesthe practice it belongs to