GitHub Project okf-agent-memory Introduces Git-Native Persistent Memory for AI Coding Agents

2 min read

AI coding agents often lose valuable context when conversations reset after context windows close. The okf-agent-memory project addresses this challenge by providing a persistent, standardized memory layer that integrates directly into Git repositories as plain Markdown files with YAML frontmatter. This approach bridges the gap between unstructured markdown notes and complex vector databases, offering a vendor-neutral and transparent solution. Built on the open standard Open Knowledge Format (OKF) v0.2, okf-agent-memory supports provenance tracking, trust tiers, and lifecycle metadata. It features an in-memory BM25 search engine capable of sub-300 microsecond retrieval times and bundle validation in around 4 milliseconds, all without requiring virtual machine spin-up or network calls. The toolchain is implemented entirely in Go with zero external dependencies, resulting in fast startup times and a single binary executable. It includes a built-in Model Context Protocol (MCP) server to facilitate integration with various AI platforms such as Claude Code and Codex. Key design principles include progressive disclosure, which uses hierarchical index files to load only the necessary concepts, and a search-before-write policy to prevent duplication and hallucination in agent memory. The solution is domain-neutral, suitable for software engineering, coaching, scientific research, literature reviews, and operational workflows. Users can bootstrap the full memory stack into any project repository with a single command, which sets up the knowledge bundle, agent skill definitions, and operating instructions. The project also provides comprehensive documentation, benchmarking tools, and a test suite to validate memory bundle conformance and performance. By eliminating reliance on external vector databases and API calls, okf-agent-memory reduces token bloat by approximately 80%, cutting costs and improving efficiency for AI agents. Its Git-native approach enables full version control and auditability using standard Git tools. Overall, okf-agent-memory offers a practical and efficient method for maintaining persistent, searchable knowledge for AI coding agents within existing development workflows.