← all repositories
okf-memory/okf-agent-memory

AI agent memory that lives in git and searches in microseconds

It stores AI agent memory as plain Markdown inside your repository, replacing expensive vector databases with sub-300-microsecond local search and cutting token bloat by 80%.

okf-agent-memory
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

OKF Agent Memory is a Go binary that turns a knowledge/ directory inside your repo into a structured, persistent memory bank for AI coding agents. It stores concepts as Markdown files with YAML frontmatter following Google’s OKF v0.2 spec, then serves them back to agents through an embedded Model Context Protocol server or a fast CLI. Everything stays in git—no external database, no embedding API calls, and no network roundtrips.

The interesting bit

Instead of dumping everything into the context window and hoping for the best, it uses progressive disclosure through hierarchical index.md files and link graphs so agents load only the concepts they actually need. Search is pure in-memory BM25, which keeps retrieval under 300 µs and the whole binary cold-start under 4 ms—fast enough to live inside tight agent tool-calling loops without the usual VM boot tax.

Key highlights

  • Zero external dependencies; single Go binary with a memory footprint under 15 MB RSS.
  • Sub-300 µs concept search and ~4 ms full corpus graph validation, per the project’s own benchmark table.
  • Enforces a “search-before-write” convention to prevent duplicate concepts and hallucinated drift.
  • Built-in MCP server over stdio plugs into Claude Code, Cursor, and Codex without extra tooling.
  • Claims an 80% token reduction via progressive disclosure, with a reproducible benchmark suite included in the repo.

Verdict

Worth a look if you run local or self-hosted agents and want version-controlled, offline memory without spinning up a database or paying embedding fees. Skip it if you need the semantic similarity retrieval of a full vector database or prefer managed memory outside your repository.

Frequently asked

What is okf-memory/okf-agent-memory?
It stores AI agent memory as plain Markdown inside your repository, replacing expensive vector databases with sub-300-microsecond local search and cutting token bloat by 80%.
Is okf-agent-memory open source?
Yes — okf-memory/okf-agent-memory is open source, released under the MIT license.
What language is okf-agent-memory written in?
okf-memory/okf-agent-memory is primarily written in Go.
How popular is okf-agent-memory?
okf-memory/okf-agent-memory has 549 stars on GitHub.
Where can I find okf-agent-memory?
okf-memory/okf-agent-memory is on GitHub at https://github.com/okf-memory/okf-agent-memory.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.