Every AI agent we put to work starts the day with amnesia. It does not know what the company decided last month, which price list is current, or which of three similar documents is the one that counts. You can paste context into the chat every morning, or you can give the agent a place to look things up. We call that place a brain: an AI knowledge base built so that an agent can read it, trust it and keep it current.
We run several of them. This post describes three in general terms, what made them work, and the parts we had to add once they grew.
What is an AI knowledge base, in practice?
A folder of Markdown files with rules. That is the honest answer. The Markdown matters because both people and models read it without conversion, and git keeps its history. The rules matter more, because a folder that anyone can write to turns into a junk drawer within weeks, and an agent reading a junk drawer gives confident answers from outdated notes.
The three brains we draw on here do different jobs.
A product team building a CV design tool uses its brain for research and development. Product ideas, user feedback, experiments and past decisions live there, and brainstorming sessions for new features start from it. The gain we see most is continuity: the system remembers earlier sessions, so a discussion about a feature picks up where the last one stopped, and designers, engineers and product people work from the same record instead of three versions of it.
At SolutionPlus we run two. The company operating brain holds clients, meetings, sales, marketing and operations, each folder with a summary file that follows one fixed structure: purpose, contents, timeline, latest update, gaps. Scheduled routines read it and produce the daily and weekly views. Next to it, the codebase of this website carries its own knowledge base, brain-dump/, with positioning, page plans, SEO research and audits. Every page you read on this site was written against it.
The third is a personal brain used to design the operations around the business: expenses, client documents, taxes, deadlines and the recurring admin that a founder otherwise carries in their head. It is the most sensitive of the three, which is why the last section of this post exists.
Why does every document need a status?
Because retrieval without trust is worse than no retrieval. When an agent finds two documents that disagree, it needs to know which one wins.
In brain-dump/, one file, CATALOG.yaml, lists every document with a status, a date, topics and a one to three sentence summary. The statuses form a ladder: canon > live > active > reference > record > implemented > superseded. Canon is current truth and only the owner changes it. Live is what the website says today and must agree with canon. Superseded documents point to their replacement and are hidden from search unless someone asks for them explicitly. Nothing is ever deleted; retired documents move to an archive folder with git mv.
The company brain uses a second kind of label for facts about money and deadlines: how good is the evidence? A figure can be proof, statement, calculated or unknown, and the rule is blunt. Unknown is written as unknown, with a note on what would confirm it. An agent that is allowed to guess will guess, and a guessed date in a deadline register is a liability.
Connected blocks: when the folder needed an index
The first versions had no index at all. The agent read files directly, which works for fifty documents and stops working somewhere in the hundreds, when every question means opening twenty files to find the right paragraph.
So we added an SQLite index, and Python tools around it that keep it current and enforce the rules. In this repository, brain-dump/brain search runs a hybrid search over one SQLite file: FTS5 for keywords, a local bilingual embedding model (jina-embeddings-v2-base-de, run through FastEmbed) for meaning, and a small link graph for what refers to what. It searches English and German together, which matters on a site where every page exists in both. Every indexed chunk carries its document's status, date, summary and heading path, and results are weighted by status, so a canon page outranks an old research note that happens to use the same words.
The company brain has its own set, written with the Python standard library only. One tool refreshes the catalog incrementally, re-reading only files whose size or modification time changed. Another checks each register against a size budget and reports OK, WARN or OVER. A third proposes an archive rollover for registers that grew too long, copies the old sections verbatim and verifies by checksum that archive plus slimmed register rebuild the original. None of them deletes a file.
This is what we mean by connected blocks. Each tool is small and does one job, and together they let the brain grow faster than people could curate it by hand, because the rules are checked by code instead of remembered. brain check reports catalog drift and stale references before anyone has to notice them.
The trade-off is real: every rule is one more thing to maintain, and a check that cries wolf gets ignored. We add a rule when the same mistake has happened twice, not before.
Graphify: one graph for code and documentation
Graphify is one of those rules, and the one that changed how the brains feel to work with.
It started as a code-reference graph: which file imports which, which function calls which, and which modules cluster together. That answers "what breaks if I change this?" for code. It said nothing about the documents that explain why the code exists.
It was later extended to Markdown links. A page plan that links to a component, a decision record that links to the brief it replaced, a summary that links to the source document: all of these became edges in the same graph. The knowledge base is now tied to both the code and the documentation, and a question like "which documents describe this component, and which of them are still current?" has an answer the agent can look up instead of inferring.
The practical effect shows up in reviews. When a page changes, the graph shows which plans and canon documents point at it, so the copy and the decision behind it get checked together. When a document is superseded, the graph lists what still links to the old version.
How does masking protect personal data in an AI knowledge base?
A brain is only useful if the agent can read it, and a personal or company archive contains things no model should see. Our answer is to decide at indexing time, not at question time.
The indexer matches sensitive folders and file names against rules. Documents that match, such as identity papers or residence documents, are catalogued as metadata only: name, date, size, a hash and the folder. Their contents are never read into the index, so they cannot appear in a search result or in a prompt. A credentials folder is listed by filename and nothing else.
On the writing side, summaries name categories instead of values. A folder summary says it holds tax documents for a given year and which ones are missing; it does not repeat the reference numbers inside them. Agents work under the same rule: no identification numbers, birth dates or home addresses in any output. Backups follow the split too. Documents and credentials go into separate archives, and the credentials archive is encrypted with a passphrase that is never stored.
This is data protection by design in the sense of Article 25 GDPR: the protection is part of how the system is built, not a promise in a policy. It does not make every use of the brain lawful on its own. Where client personal data is involved, you still need a legal basis, a data processing agreement with any model provider and a decision about where the model runs. Masking reduces what can leak; it does not replace those decisions.
What changes once the brain is in place?
Processes that used to depend on someone remembering start to run from the record. In our own operations that means a daily and weekly view built from the registers, deadlines that are tracked with their evidence level, research that starts from what was already decided, and site copy that is checked against canon before it ships.
The improvement loop is the part we would not give up. Each correction becomes a rule, each rule becomes a check, and the next agent session starts with that knowledge instead of repeating the mistake. The brain gets better because it is used, which is the opposite of most wikis.
If you want to know whether your own processes are ready for this, start small: one area, one catalog, one search, and a list of the questions people ask every week. Our AI automation team builds knowledge bases like these and the agents that work on them, and our workflow automation work covers the deterministic flows around them. For the question of when a plain rule beats a model, read workflow automation without AI; for why the software around a model matters as much as the model, read same model, different harness.
Frequently asked questions
What is an AI knowledge base, or company brain?
It is a structured collection of company knowledge, usually Markdown files, that an AI agent can search, cite and keep up to date. The difference from a wiki is that every document says how far to trust it (a status such as canon, live or superseded) and the agent follows written rules for adding, moving and retiring documents.
Do we need a vector database to build one?
Not at the start. Our brains run on SQLite: its FTS5 extension handles keyword search, and a local embedding model adds search by meaning in the same file. A dedicated vector database makes sense once you have millions of chunks or many concurrent users, which most small and mid-sized companies do not.
How do you keep personal data out of an AI knowledge base?
By deciding at indexing time what the agent may read. Sensitive folders and file names are matched by rules and catalogued as metadata only (name, date, size, hash), so their contents never reach the index or the model. Summaries refer to categories such as "tax documents" instead of the identifiers inside them.
How long does it take to set up a knowledge base like this?
A first useful version, with a catalog, statuses and search over one area of the business, is a matter of days, not months. The rules and tools then grow with use: each time the agent makes the same mistake twice, a rule or a check gets added.




