$npx skillfedfor your agent
REPO

Plain Markdown beats vector databases for AI agent memory if you value auditability

on: okf-memory/okf-agent-memory

Every AI coding agent eventually forgets. Close the context window and the architectural decision you spent an hour explaining is gone. OKF Agent Memory attacks this problem with a deliberately low-tech answer: plain Markdown files with YAML frontmatter, stored in a knowledge/ directory that lives inside your repository and travels with your code through ordinary version control.

The format it builds on, Google's Open Knowledge Format v0.2, adds structure that raw CLAUDE.md files lack: provenance fields, trust tiers distinguishing agent-generated from human-verified facts, and lifecycle metadata including staleness timestamps. The tooling layer is a single Go binary with zero external dependencies. Search runs as in-memory BM25, which the README benchmarks at under 300 microseconds - compared to the 150ms to 800ms range it attributes to embedding-API-backed alternatives like Mem0 or Letta. Full corpus parse and graph validation across 50-plus concepts clocks around 4 milliseconds. Memory footprint stays under 15 MB RSS. These numbers are self-reported and reproducible via a bundled benchmark runner against local LLMs, which is a reasonable caveat to keep in mind.

Two design principles do real work here. Progressive Disclosure means the agent only loads what it needs: hierarchical index files and a link graph let it navigate to a specific concept without ingesting the whole corpus, which the project claims produces roughly an 80% token reduction compared to dumping monolithic documentation into context. Search-Before-Write is a behavioral mandate baked into the agent skill definition - the agent must query existing memory before creating a new concept, which prevents the slow drift where the same decision gets recorded three different ways across three sessions.

The MCP server (okf mcp) exposes the whole stack over stdio, so Claude Code, Cursor, and similar tools can call it as a native tool without any wrapper. The bootstrap command scaffolds the entire memory architecture into an existing project in one step, generating the knowledge bundle, agent skill definitions, and a tailored AGENTS.md.

What this is not: a semantic search system, a graph database, or anything that understands meaning. BM25 is lexical. If your agent uses terminology inconsistently, retrieval will miss things. The trust tier system is only as reliable as whoever marks something verified. And the whole approach assumes your agents will actually follow the Search-Before-Write convention, which is a behavioral bet, not a technical guarantee.

Still, the core tradeoff is honest and well-reasoned. You give up semantic recall and gain auditability, zero ongoing API cost, and a memory layer that any developer can read, edit, and review with standard tools. For teams already living in Git, that is a meaningful property.

Git-native agent memory that trades semantic search for auditability, zero API cost, and a knowledge layer any developer can inspect with standard tools.

Install it

Sources & links