Release v0.1.0 • Google OKF v0.2 Compliant • Sub-300µs Search

The Git-Native Memory for
Autonomous AI Coding Agents

Transparent, auditable Markdown memory for Claude Code, Cursor, and Local LLMs. Slash token overhead by 90% through in-memory BM25 progressive disclosure — with zero external database dependencies.

$ brew install okf-memory/tap/okf 📋
Get Started in 1 Min Get OKF Cloud Access
zsh — okf-agent-memory
$ okf search "jwt auth flow" knowledge

[1] Score: 4.82 | architecture/auth-decision.md
    Title: JWT Authentication & Refresh Token Strategy
    Tags: [auth, security, adr] | Trust: verified: human:lead@okf-memory.dev
    Summary: Use RSA-256 JWTs with 15m expiration & sliding refresh tokens.

⚡ Retrieved 1 concept in 268.4µs (<0.3ms) via In-Memory BM25

Engineered for Maximum Agent Performance

Why developers and enterprises choose OKF over opaque vector databases and unstructured flat files.

Sub-300µs BM25 Search

Built in pure Go with zero runtime dependencies. Queries full knowledge graphs in microseconds directly in memory without slow vector embeddings or external API calls.

🗂️

Progressive Disclosure

Slash token costs by up to 94%. Instead of dumping 20k-token monoliths into every prompt, agents dynamically pull only the exact 300-token concept required.

🔒

Trust & Provenance Tiers

Strict distinction between authoritative human decisions (verified: human) and agent drafts (generated: agent). Agents never overwrite human architectural law.

🔌

Built-In Stdio MCP Server

Plug-and-play Model Context Protocol (MCP) server embedded inside the single binary. Works seamlessly with Claude Code, Cursor, Windsurf, and custom IDEs.

🛡️

100% Git-Native & Auditable

No proprietary database silos. Your memory lives in human-readable Markdown files right in your repository. Use git diff, git blame, and code reviews.

🚀

1-Command Bootstrapping

Run okf bootstrap . in any new or existing repository. Automatically scaffolds knowledge bundles, non-destructively enriches AGENTS.md, and installs skills.

Sub-50ms TTFT for Local LLMs (Ollama / Qwen / Llama 3) 100% OFFLINE

Eliminates the local AI bottleneck: Feeding 20k-token monolith files into local 8B–14B models causes severe prompt prefill latency (5–10s) and exhausts VRAM KV-caches. With OKF Progressive Disclosure, agents query in <300µs and ingest only the exact 300-token concept required — keeping local models razor-sharp without hallucinations.

Tested Across Local & Remote Models

Direct empirical measurements proving OKF's dual impact: slashing 80.1% prompt token billing on Remote Cloud APIs and eliminating brutal prefill latency (up to 5.2x faster TTFT) on Local On-Device Models.

☁️
REMOTE MODEL • Official OpenAI Cloud API Test Date: September 2026

OpenAI Production Cloud • api.openai.com

Deployment: Remote Cloud SaaS • Model: gpt-5.6-solPrimary Benefit: -80.1% Token Billing & Context Savings (3,034 → 603 tokens)

☁️ Remote / Cloud API Pay-per-Token SaaS • Billing Focus
🖥️ Local / On-Device Metal GPU • TTFT Acceleration Focus
Context Overhead Reduction -80.1%
603 tokens
vs. 3,034 tokens in Monolith Dump
Prefill Latency (TTFT) 1.1x Faster
8,682 ms
vs. 9,227 ms cloud TTFT latency
Total Turn Duration -1.0s
14.9 sec
vs. 15.9 sec full monolith turn
Policy Adherence Accuracy 100% PASS
4/4 checks
AES-256-GCM • 96-bit Nonce • Headers
✓ GCM ✓ 12B Nonce ✓ Version Header ✓ No ECB/CBC
Traditional Pattern

Monolith Context Dump (CLAUDE.md)

3,034 Tokens

Every turn dumps the entire 11.5 KB documentation corpus into the system prompt. Forces the model to parse megabytes of unrelated rules.

  • Severe Prefill Lag: 9,227 ms time-to-first-token
  • O(N) Token Bloat: Scales linearly with team documentation size
  • Attention Dispersion: Critical ADR policies get lost in context walls
  • Cloud Cost Escalation: Wastes 80% of budget on repeat prompt processing
OKF Memory Pattern

Progressive Disclosure (In-Memory BM25)

603 Tokens

In-memory BM25 index (<300µs) extracts only the single verified ADR relevant to the user's specific coding task.

  • Instant First Token: 8,682 ms (1.1x faster)
  • O(1) Bounded Prompt: Consistently minimal context overhead
  • Zero Distraction: LLM focuses purely on the target policy decision
  • 100% Policy Adherence: Flawless code generation with zero hallucinations
Reproduce These Benchmarks On Your Own Machine

100% pure Go standard library suite. Zero external dependencies. Supports LM Studio, Ollama, OpenAI, Claude, and Gemini.

$ make benchmark 📋

System Architecture Matrix: OKF vs. Alternatives

Comparison of runtime latency, storage transparency, and operational complexity.

Feature / Metric OKF Agent Memory Mem0 / Letta Ad-hoc Markdown (CLAUDE.md)
Search Latency < 300 µs (In-Memory BM25) 150 – 800 ms (Vector API) N/A (Full context scan)
Cold Start / Overhead < 4 ms (Pure Go Binary) 1.5 – 3.0 s (Python / DB) 0 ms (Static File)
Storage & Format Standard OKF v0.2 Markdown Postgres / Pinecone (Black Box) Unstructured text
Runtime Cost 0.00 € (Zero API fees) $$$ per Embedding & DB host Context Bloat Costs
Trust Signals verified: vs generated: Opaque Vector Weights None
Git Native (Diff/Blame) ✅ 100% Native ❌ Proprietary DB ✅ Native

The 5-Layer Architectural Model

A clean, decoupled hierarchy ensuring portability across any AI agent or IDE.

LAYER 5

Knowledge Corpus Layer (knowledge/)

Conformant OKF v0.2 bundle containing dated change logs, indexes, and frontmatter concepts.

LAYER 4

Deterministic Tooling Layer (Go CLI & MCP)

Zero-dependency single executable providing sub-300µs BM25 search, mutations, and graph validation.

LAYER 3

Agent Skills Layer (.agents/skills/okf-memory/)

Structured operational playbooks for Claude Code, Cursor, Windsurf, and custom subagents.

LAYER 2

Convention Layer (Convention v0.1)

Normative behavioral rules: Search-Before-Write, Anti-Duplication, and Trust Tiers.

LAYER 1

Specification Layer (Open Knowledge Format v0.2)

Standardized YAML frontmatter and Markdown syntax defined by Google Cloud.

Get Started in 60 Seconds

Install globally via Homebrew and bootstrap any repository with a single command.

1️⃣

Install OKF CLI

Available globally on macOS (Apple Silicon / Intel) and Linux:

$ brew install okf-memory/tap/okf 📋
2️⃣

Bootstrap Any Project

Switch into your project and initialize memory:

$ okf bootstrap . 📋
3️⃣

Connect Your Agent

Connect Claude Code, Cursor, or Windsurf directly via the built-in stdio MCP server.

{
  "mcpServers": {
    "okf-memory": {
      "command": "okf",
      "args": ["mcp", "knowledge"]
    }
  }
}

Frequently Asked Questions

Everything you need to know about OKF Agent Memory, architecture, and deployment.

No. Google Cloud created and published the open Open Knowledge Format (OKF) v0.2 specification. OKF Agent Memory is an independent open-source Go implementation that standardizes OKF as a persistent memory layer for AI agents with sub-300µs BM25 search, CLI tooling, and an embedded Model Context Protocol (MCP) server.

Vector databases require background containers, Python runtimes, and costly API embedding calls for every write and query, adding 150ms–800ms of latency. OKF loads your repository's knowledge bundle directly into memory in <4ms and searches with BM25 in <300µs — with 0.00 € API costs and 100% offline predictability.

Flat markdown files inevitably grow into 20,000-token monoliths that blow your context window and degrade agent intelligence. OKF employs Progressive Disclosure: a structured graph of atomic, interlinked concept files (knowledge/). The agent queries the index and loads only the exact 300-token concept it needs. Plus, okf validate --drift continuously ensures links and summaries stay synchronized.

Tools like agentmemory run a local Node.js daemon that intercepts chat transcripts and attempts to summarize session logs with background LLM API calls. In contrast, OKF Agent Memory follows the Karpathy "LLM Wiki" principle: curated, high-signal architecture decisions authored directly into Git Markdown, version-controlled via Pull Requests, with strict Trust Tiers (verified: human vs. generated: agent) and zero running daemon overhead.

Yes, 100%. The Go single binary runs entirely on your local machine with zero external network calls and zero telemetry. It is especially effective for local 8B–14B models (e.g. Qwen 2.5 Coder, Llama 3) because it drastically reduces context prefill latency from 6+ seconds down to under 50ms.

In open-source, each repository manages its own self-contained memory bundle in knowledge/. For engineering teams with 50+ microservices, our upcoming OKF Cloud enables federated cross-repo search, visual graph exploration, and automated PR governance bots.

Need Cross-Repo Memory & Visual Graphs?

Join the OKF Cloud Private Beta. Connect 50+ microservices into a unified federated memory graph, with human-in-the-loop verification portals and automated PR compliance bots.

No spam. Early beta invitations & developer preview updates only.