Short answer
A knowledge base for AI agents is the set of documents agents search before they act: runbooks, policies, product facts, decisions. Keep it as plain markdown files the team owns, give each agent access to only the folders it needs, and let agents correct a stale page in place, so the fix reaches the next reader.
A knowledge base for AI agents is a set of documents your agents search and read before they act: runbooks, policies, product facts, past decisions. Build it as plain markdown files your team owns, scope each agent to the folders it needs, and give it a safe way to correct a page, because a knowledge base agents can only read goes stale faster than one people read.
Most of the guides ranking for this search describe a retrieval pipeline. Ingest the documents, chunk them, embed them, rerank the results, evaluate the answers. That is a real stack and some teams need it. But every one of those guides treats the knowledge base as something the agent reads and never writes, and that one assumption is where agent knowledge bases fail in practice. The agent finds the stale page, quotes it with confidence, a person corrects it in the chat, and the correction dies with the session. Next week the agent quotes the same stale page.
This page is about the other half: what a knowledge base looks like when the agents reading it can also fix it, safely, in the same files the team edits. Baalda is built for exactly that, so it comes up early, and the last section says plainly where it is the wrong choice.
What is a knowledge base for AI agents, and how is it different from agent memory?
The two get mixed up because both sound like "what the agent knows". They are different things with different owners.
Agent memory is what one agent learned from its own work: your preferences, the fact that the build needs Node 22, the mistake it made yesterday. It belongs to the agent, or to the person running it, and tools like Claude Code's CLAUDE.md or a memory server hold it. Giving an AI agent memory a person can open covers that side.
A knowledge base is what the team knows, written down for anyone to read: how refunds work, which customer is on which contract, why the team chose Postgres. It exists before the agent arrives and outlives every session. Several agents and several people read the same page, so a wrong page is wrong for all of them at once.
The practical difference is ownership. Nobody has to review what an agent remembers about your editor settings. Somebody has to review what an agent changes in the refunds policy, because three other agents and ten people read it tomorrow.
Why do knowledge bases for AI agents go stale?
Because the people who notice a page is wrong are no longer the people reading it.
In a knowledge base people read, the reader who spots an error is one click from the edit button. In one agents read, the reader is a model, and the person who catches the error sees only the agent's answer, in a chat window, far from the document that caused it. Fixing it means finding the source page, opening a different tool and rewriting it, and that rarely happens in the middle of a task. So the wrong answer gets corrected in the conversation and the wrong page stays exactly as it was.
A retrieval pipeline makes this worse rather than better, in one specific way. When the documents are copied into a vector index, the index becomes the thing the agent reads, and the original files become the thing people edit. Now there are two copies with a sync job between them, and a correction has to travel through both before the agent sees it. Second brain vs RAG goes through when that index is worth having and when links between plain files do the job.
The fix is to close the loop: let the agent that hit the stale page propose the correction in the page itself, where the next reader, person or model, will find it.
How does an agent correct a page in Baalda?
Baalda is a team second brain built on plain markdown files on your own disk, with real-time multi-user editing, per-file permissions, open source under Apache-2.0 and self-hostable. It serves the same vault to AI clients over MCP, and the write path is the part that matters here.
An agent reads a page with read_note, which returns the text and a revision. When it wants to correct the page, it calls edit_note with targeted edits rather than a rewrite of the whole body, and passes that revision back:
{
"docId": "refunds-policy",
"expectedRevision": "<revision returned by read_note>",
"edits": [
{
"type": "replace",
"find": "Refunds are processed within 14 days.",
"replace": "Refunds are processed within 5 business days (changed 3 Nov, see decisions/refund-sla.md)."
}
]
}Three refusals are built into that call, and each one closes a way an agent can damage a shared page. If the note changed since the agent read it, the revision no longer matches and nothing is written. If the find text appears zero times or more than once, the whole call is refused with nothing written, so a vague edit cannot land in the wrong paragraph. And every call is checked against the per-folder and per-note permissions of the person whose token the agent uses: reads need view, writes need edit, and a note that person cannot see does not appear in the agent's search results at all.
When the edit goes through, it takes the same route as a keystroke. If a teammate has the refunds page open, the server applies the change to the live document and the corrected sentence appears in their editor while they watch. If nobody has it open, the server applies it to the stored document and the next person to open it gets the new text. Either way it ends up as the same .md file on everyone's disk, and the earlier version stays in the note's version history, so a bad correction is one restore away. What an MCP server for team notes needs covers the identity model behind those permission checks in full.

How do you build a knowledge base for AI agents, step by step?
The steps are the same whichever tool holds the files. The fourth and fifth are where Baalda does the work.
- Start from one job the agent gets wrong. Not the whole company wiki. Pick the support answers, the deploy runbook or the sales objections, and write only what that job needs.
- One answer per file, in plain markdown. A page titled with the question it answers is easy for an agent to find with
search_notesand easy for a person to check. Long pages that answer ten things get quoted for the wrong one. - Put the source and date in the page. "Changed 3 Nov, see decisions/refund-sla.md" tells the next reader where the claim came from. A decision log is the natural home for the why.
- Give each agent its own scope. Mint the agent's token as a member with access to the folders it needs, not as an admin. An admin's token reaches everything, because owners and admins get
editeverywhere. - Connect the agent and tell it when to write. For Claude Code that is one command, with the token in an environment variable rather than in the file:
claude mcp add --transport http baalda https://your-server/api/mcp \
--header "Authorization: Bearer ${BAALDA_MCP_TOKEN}"Then add one rule to the agent's instructions file: when a page in the knowledge base contradicts what you just verified, correct it with edit_note, keep the change small, and put the source in the sentence. How to write AGENTS.md covers where that rule goes for each agent.
- Review the edits, not the pages. Version history shows what changed on each page, and Vault Settings lists every connected MCP client with its call count and last activity. A weekly look at what agents corrected is a much smaller job than rereading the knowledge base.
Where is Baalda the wrong tool for this?
Be clear about what this setup is not.
- It is not a tuned retrieval pipeline. Baalda's
search_notesruns semantic and keyword search over the notes and the text of attached files, which is enough for a team's working knowledge. It has no reranking stage, no evaluation harness and no pipeline that pulls documents in from other tools. If the agent has to answer across a million support tickets, build the pipeline. - It is not a customer-facing help centre. A public support bot answering customers belongs on a help-centre product with article analytics and deflection reporting. Baalda is for the knowledge a team works from.
- It has no verification dates. Guru marks a card as verified by a named person for a set interval and unverifies it when someone else edits it. Baalda has version history and nothing that expires a page. If proving an answer is current is the main job, Guru does that and Baalda does not.
- An agent with `edit` can still be wrong. The revision check stops it from overwriting someone else's change. It does not stop it from writing a confident mistake. That is why the scope in step 4 and the weekly review in step 6 are part of the setup, not optional extras.
What it does give you is one copy of the knowledge, in files the team owns, that people and agents both read and both correct. For most teams of five to fifty, that loop matters more than the retrieval stack, because a well-retrieved stale page is still stale.