okf-memory/okf-agent-memory
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
Star 增长趋势(本站收录历史)
okf-memory/okf-agent-memory
深度介绍
它是什么
okf-agent-memory 是为 AI 编码代理打造的 Git 原生持久记忆层,用纯 Go 实现 Google OKF v0.2 开放知识格式标准,让 Claude Code、Cursor 等代理拥有跨会话的长期记忆。
核心亮点
- 内存级 BM25 检索:亚 300 微秒响应,无需外部向量数据库
- 内嵌 MCP Server:开箱即用,直接对接 Model Context Protocol
- 渐进式披露:按需加载知识片段,Token 消耗直降 80%
- Git 原生存储:记忆以 Markdown 形式版本化,可 diff、可回滚、可协作
- 零依赖:单二进制部署,不引入任何基础设施
为什么火
AI 代理的"失忆症"是真实痛点——每次会话都要重新喂上下文,既烧钱又低效。这个项目用最朴素的方式(Git + BM25 + Markdown)解决了最棘手的问题,避免了向量库的复杂度和锁定风险,符合开发者对"简单可靠"的偏好。
适合谁用
重度使用编码代理的开发者、需要团队共享代理知识库的工程团队,以及希望自托管记忆层、拒绝云服务依赖的隐私敏感用户。
快速上手
go install github.com/okf-memory/okf-agent-memory@latest
okf-agent-memory init
在代理配置中挂载 MCP Server 即可,记忆默认写入仓库的 .okf/ 目录。
