OKF Agent Memory
Git-native persistent memory for AI coding agents using Google OKF v0.2, with sub-300µs in-memory BM25 search, embedded MCP server, and 80% token reduction via progressive disclosure.
At a Glance
Fully open-source under MIT License. Free to use, modify, and distribute.
Engagement
Available On
Listed Sep 2026
About OKF Agent Memory
OKF Agent Memory is an open-source Go tool that gives AI coding agents a structured, auditable memory layer stored as plain Markdown files directly in your repository. Built by the okf-memory organization and released under the MIT License, it implements the Google Cloud Open Knowledge Format (OKF) v0.2 specification with a zero-dependency single binary that includes a built-in Model Context Protocol (MCP) server. The project reached v0.1.5 in September 2026 and has accumulated over 570 GitHub stars.
What It Is
OKF Agent Memory sits between unstructured ad-hoc markdown files (like CLAUDE.md or .cursorrules) and heavyweight vector databases. It stores architectural decisions, domain knowledge, and operational facts as atomic, interlinked Markdown concept files inside a knowledge/ directory that lives in your Git repository. Agents query this structured graph using in-memory BM25 search rather than dumping entire documentation corpora into every prompt — a pattern the project calls Progressive Disclosure. The result is a bounded, auditable memory that survives context window resets without requiring any external database, Python runtime, or API embedding calls.
Architecture: 5-Layer Model
The system is organized into five clean, decoupled layers:
- Layer 1 – Specification: Open Knowledge Format v0.2, defining standardized YAML frontmatter and Markdown syntax
- Layer 2 – Convention: Normative behavioral rules including Search-Before-Write, Anti-Duplication, and Trust Tiers
- Layer 3 – Agent Skills: Structured operational playbooks for Claude Code, Cursor, Windsurf, and custom subagents
- Layer 4 – Tooling: Zero-dependency Go CLI and embedded MCP server providing sub-300µs BM25 search, mutations, and graph validation
- Layer 5 – Knowledge Corpus: The actual
knowledge/OKF v0.2 bundle with dated change logs, indexes, and frontmatter concepts
Performance and Benchmarks
The project publishes empirical benchmarks comparing OKF against Python/vector-DB runtimes (Mem0, Letta) and Node.js tooling. Key figures from the benchmark suite:
- Concept search latency: < 300 µs (in-memory BM25) vs. 150–800 ms for vector DB approaches
- Full corpus parse & graph validation: ~4 ms for 50+ concepts
- Process cold-start: < 4 ms (compiled single binary) vs. 250–600 ms for Python VM boot
- Memory footprint: < 15 MB RSS vs. 120–350 MB for Python/vector runtimes
- Token reduction: The project claims up to 80.1% fewer prompt tokens vs. monolith context dumps, based on a published benchmark against OpenAI's cloud API
For local LLMs (Ollama, LM Studio, Qwen, Mistral), the project claims up to 5.2x faster time-to-first-token by eliminating the prefill latency caused by large monolith context files.
Trust Tiers and Git-Native Auditability
A core design principle is the strict separation between human-authored knowledge (verified: human) and agent-generated drafts (generated: agent). Agents cannot overwrite human architectural decisions. Because all memory lives in standard Markdown files, teams can use git diff, git blame, and pull request reviews to audit every change — no proprietary database silo is involved.
Agent and IDE Integration
OKF Agent Memory connects to AI coding environments via its built-in stdio MCP server. Supported platforms include Claude Code, Cursor, Windsurf, and any custom agent that supports the Model Context Protocol. Setup requires adding a JSON config block pointing to the okf binary. The okf bootstrap . command scaffolds the full memory stack into any new or existing repository in a single step, creating the knowledge/ bundle, agent skill definitions, an AGENTS.md file, and a Makefile with convenience targets.
Update: v0.1.5
The latest release is v0.1.5, published on September 9, 2026, and the repository was last pushed on September 11, 2026. The project is marked as Google OKF v0.2 compliant. An upcoming OKF Cloud offering is referenced on the homepage for enterprise teams needing federated cross-repository search, visual graph exploration, and automated PR governance bots — currently in private beta waitlist stage.
Community Discussions
Be the first to start a conversation about OKF Agent Memory
Share your experience with OKF Agent Memory, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully open-source under MIT License. Free to use, modify, and distribute.
- Sub-300µs in-memory BM25 search
- Progressive Disclosure for token reduction
- Built-in stdio MCP server
- Git-native Markdown storage
- Trust tiers (verified:human vs generated:agent)
Capabilities
Key Features
- Sub-300µs in-memory BM25 search
- Progressive Disclosure to reduce token overhead by up to 80%
- Git-native Markdown storage with no external database
- Built-in stdio MCP server for Claude Code, Cursor, Windsurf
- Trust tiers: verified:human vs generated:agent
- 1-command bootstrapping with okf bootstrap
- Zero external dependencies (pure Go single binary)
- Graph validation and drift detection
- OKF v0.2 specification compliance
- Offline-capable for local LLMs (Ollama, LM Studio)
- Search-Before-Write convention to prevent duplication
- Automated benchmark suite for TTFT and token measurements
- Homebrew and cURL install support
- Domain-neutral: supports software, coaching, research, and more
