A developer just shipped OKF Agent Memory, a tool that gives AI coding agents a persistent memory that lives inside your git repository as plain Markdown files. According to Hacker News, where the project climbed to 174 points, it’s built on Google’s Open Knowledge Format (OKF) v0.2 and written in Go. The pitch is simple: stop losing everything your agent learned the moment the context window closes.
Here’s the problem it goes after. When you work with an AI agent, the architectural decisions, domain quirks, and operational facts you hammer out together vanish once the conversation resets. Most people patch this with ad-hoc CLAUDE.md or AGENTS.md files, or they reach for heavy vector databases. OKF sits in the middle: structured enough to be useful, plain enough to read with git diff.
What it actually does
- Stores memory as version-controlled text. Everything lives in a knowledge/ folder as Markdown with YAML frontmatter. You inspect, audit, and review your agent’s memory with standard git diff and git log. No external database.
- Runs local BM25 search instead of embeddings. Retrieval is lexical and in-memory, so there are no recurring vector-embedding API bills and no network round trips.
- Ships as a single Go binary. Zero external dependencies, sub-5ms startup, and a built-in Model Context Protocol (MCP) server via okf mcp.
- Tracks provenance and trust. OKF v0.2 supports sources, trust tiers (generated vs verified), and lifecycle metadata like status and stale_after, so an agent knows what’s confirmed and what’s a guess.
- Fights context bloat. It uses progressive disclosure through hierarchical index.md files and link graphs, so agents load only the concepts they need instead of the whole corpus.
- Enforces search-before-write. The convention makes agents query existing memory before writing new entries, which cuts duplicate concepts and hallucinated contradictions.
How it stacks up on speed
The benchmarks are the loudest part of the launch. OKF claims concept search under 300 microseconds, compared to 150ms to 800ms for Python and vector-DB runtimes like Mem0 and Letta, and 40ms to 120ms for Deno or Node.js tooling. Full corpus parse and graph validation land around 4ms. Cold start is under 4ms versus 250ms to 600ms for a Python VM boot. Memory footprint stays under 15MB.
The cost angle is just as sharp. Retrieval runs at $0.00 because it’s fully local, while embedding-based systems run roughly $0.10 to $0.50 per 1,000 queries. The team also says its progressive-disclosure approach delivers an 80% token reduction, and it ships a Go benchmark runner so you can reproduce the numbers on your own hardware with LM Studio or Ollama running Gemma, Qwen, or Llama.
Getting it running
You clone the repo and compile a standalone okf binary. From there the CLI handles the work: validate a bundle, search concepts, create and update entries with automatic index and log bookkeeping, or run bootstrap to scaffold the whole memory stack into any existing project with one command. That bootstrap drops in a knowledge/ bundle, an embedded agent skill, an AGENTS.md with project-tailored instructions, and a Makefile.
The MCP server is the integration hook. It speaks over stdio and plugs into Claude Code, Cursor, Codex, and other agent platforms through a short config block, the same pattern you’d use for any MCP tool.
Why it matters
Agent memory is one of the messier unsolved problems in AI tooling right now, and most answers so far have been either too sloppy or too locked-in. What stands out here is the bet on plain text and git as the storage layer. It makes memory auditable, diffable, and free to query, which is a real answer to teams nervous about black-box vector stores and creeping API costs.
The caveats are worth naming. Lexical BM25 is fast and cheap, but it doesn’t catch semantic matches the way embeddings do, so phrasing matters more when you search. And it’s early, sitting on OKF v0.2, so expect the format and tooling to keep shifting. Still, for a git-native, zero-cost, single-binary approach, it’s a genuinely interesting direction. Full setup details and benchmarks are at the original source.