ENGINEERING
We Store Our Agent's Knowledge in Markdown and Git, on Purpose
By Subhojit Banerjee (Staff Engineering) · Dec 2026 · 4 min read
Before reaching for Postgres, MongoDB, or a graph database, ask what properties an agent knowledge store actually needs. Git already provides almost all of them.
The question we get most often about our Kafka copilot is why we store its knowledge as markdown files in git instead of MongoDB, Postgres, or a graph database.
Why Git Fits Before a Database Does
Git already has the properties a governed knowledge store needs, and a database would force us to rebuild them:
- Review is built in. Every change is a pull request. A database with a write API creates a path around the review gate, and sooner or later something writes to it directly.
- It acts as a transaction-time database. Git log, blame, and checking out a past commit answer what the agent knew during last Tuesday’s incident for free.
- Tests stay hermetic. The whole corpus fits in memory, so CI runs with no external services, no network calls, and no flakiness.
- Everyone can edit it. Any SRE can fix a runbook without learning a query language or a custom note format.
Two Rules That Prevent Drift
Two rules keep markdown in git from turning into an unmanageable pile. First, relation types come from a closed list (such as ownedBy, consumes, and supersedes). Open-ended vocabularies drift, and nearly every failed knowledge-graph project breaks right there. Second, text is the source of truth. Any index or graph we add later is derived from the text and can be rebuilt at any time.
Netflix’s ontology team reached a similar conclusion at much larger scale: they keep their ontology as code, versioned and reviewed through pull requests, and every harvest writes a diff-friendly text copy that proved far more useful for debugging than expected.
A database becomes worth it once the corpus genuinely outgrows git. For operational runbooks and a few thousand entities, git is simpler, safer, and easier to test.
Key Takeaways
- Use git pull requests as the structural review gate for agent knowledge.
- Restrict entity relationships to a closed vocabulary so metadata cannot drift.
- Keep plain text as the source of truth and treat any search index or graph as a rebuildable artifact.