· via Hacker News – Front Page (hnrss.org)
OKF Agent Memory stores AI coding agent knowledge as Git-tracked Markdown
An open-source Go tool that surfaced on Hacker News gives AI coding agents persistent memory via Markdown files in Git, an embedded MCP server and sub-300µs local search the project says beats vector database setups.
A memory layer that lives in the repository
A project named OKF Agent Memory appeared on the Hacker News front page with an answer to a familiar pain point in AI-assisted development: agents forget everything — architectural decisions, domain quirks, operational facts — the moment a context window closes. According to the project's GitHub repository, the tool provides a standardized, vendor-neutral memory layer stored directly inside a repository as plain Markdown files with YAML frontmatter, in a knowledge/ directory committed alongside the code.
The README positions the tool between two existing extremes. On one side sit ad-hoc instruction files such as CLAUDE.md and AGENTS.md, which are simple but unstructured and grow unwieldy. On the other sit external memory systems such as Mem0 or Letta, which typically rely on vector databases that live outside version control and are hard to inspect. OKF Agent Memory claims the middle ground: structured enough for agents to search programmatically, plain enough for a human to read in a diff.
What the format specifies
The tool implements the Open Knowledge Format (OKF) v0.2, which the repository attributes to Google and describes as an open standard for agent knowledge. Each memory bundle carries provenance information about where a fact came from, trust tiers that separate generated content from verified content, and lifecycle metadata such as a status field and a stale_after threshold for retiring facts that have gone out of date.
Two design ideas do most of the work. The first is progressive disclosure: hierarchical index.md files and a link graph let an agent load only the concepts relevant to the current task rather than the entire corpus. The project claims this trims token consumption by roughly 80 percent compared with feeding a monolithic document to a model.
The second is a rule the project calls search-before-write: an agent must query existing memory before recording a new concept, which is meant to prevent duplicate entries and what the README terms hallucinated divergence — two slightly different versions of the same fact drifting apart over time. Every bundle also maintains a dated change log, log.md, using ISO 8601 dates.
Self-reported performance figures
OKF Agent Memory ships as a single binary written in pure Go with no external dependencies, and the project leans on that in its benchmark table. The reported numbers: concept search finishes in under 300 microseconds using in-memory BM25 lexical scoring, a full parse and bidirectional graph validation of a corpus of more than 50 concepts takes around 4 milliseconds, process cold start stays under 4 milliseconds, and resident memory remains below 15 MB. Because retrieval is lexical rather than embedding-based, there are no vector-database or embedding API charges at all.
The comparison figures come from the project's own table rather than an independent evaluation. That table puts Python-based vector-database setups (it names Mem0 and Letta) at 150–800 ms per concept search and roughly $0.10–$0.50 in embedding costs per 1,000 queries, with Deno and Node.js tooling falling in between at 40–120 ms per search. To back the claims up, the repository includes a benchmark runner so users can reproduce the latency and token-reduction measurements on their own hardware with local models served through LM Studio or Ollama.
CLI and agent integration
Day-to-day use runs through the okf command-line tool. Commands include validate (with a strict mode plus drift detection for descriptions that no longer match their concepts), search, show, and create and update for individual concepts. A single bootstrap command scaffolds a complete memory setup into an existing project: the knowledge/ bundle, an agent skill definition under .agents/skills/okf-memory/, a project-tailored AGENTS.md file with operating instructions for coding agents, and Makefile tasks for validation and search. A Homebrew formula is provided for installation.
The binary also embeds a Model Context Protocol (MCP) server over stdio, with example configuration for Claude Desktop and Cursor; the README lists Claude Code, Cursor and Codex among the agent platforms it can connect to. Although the tool targets software engineering first, the format is domain-neutral — the repository ships reference bundles for executive coaching, literature and cognitive science alongside a microservices architecture example.
Why it matters
Agent memory is quietly becoming infrastructure: what an agent knows about your codebase determines how useful it is in the next session. Today that knowledge mostly lives either in bloated instruction files or in proprietary vector stores that nobody can diff. Making memory plain, Git-tracked text turns agent learning into something reviewable — a pull request can show not only code changes but exactly what the agent recorded, edited or retired, with git log as the audit trail. Local, embedding-free search also strips per-query API costs out of the tight tool-calling loops agents run. The open question is adoption: OKF v0.2 is a young specification and the benchmark numbers are the project's own. But as a design direction — memory as versioned prose rather than a black-box database — it is a notable marker.
- #ai-agents
- #open-source
- #golang
- #mcp
- #git