Open Knowledge Format - The Standard That Replaces RAG for AI Agents

Abhishek Dash8 min read

RAG has a quiet, expensive flaw. It rediscovers knowledge on every single question. You pay the full retrieval price, every time, and nothing accumulates. I kept hitting this with my own agents - same BigQuery tables explained over and over - until I saw how Karpathy and then Google Cloud were framing it differently.

Open Knowledge Format fixes it by treating knowledge like code. You compile once, you read many times.

What is OKF

OKF is a vendor-neutral, open spec for packaging organizational knowledge as a portable bundle of markdown files. Google Cloud's Data Cloud team - Sam McVeety and Amir Hormati - announced v0.1 on June 12, 2026. It takes Karpathy's LLM Wiki pattern and makes it something different teams can speak without translation.

"We need a format, not a knowledge service." - Google Cloud Data Cloud team

The spec lives at GoogleCloudPlatform/knowledge-catalog/okf/SPEC.md. v0.1 is 451 lines and fits on one page - you can read it in 15 minutes. v0.2 landed July 24, 2026 and adds optional trust signals without breaking v0.1 bundles - more on that below.

Why plain files win

Property What it means for you
Just markdown Opens in any editor, renders on GitHub, searchable with grep or ripgrep
Just files Ships as a tarball, lives in any git repo, mounts on any filesystem
Just YAML frontmatter Only type is required. The rest - title, description, resource, tags - is optional. Add your own keys if you want, consumers keep them

If you can cat a file, you can read OKF. If you can git clone, you can ship it.

How a bundle is laid out

path/to/bundle/
├── index.md                      # Directory listing - optional
├── log.md                        # Change history - optional
├── tables/
│   ├── index.md
│   ├── orders.md                 # One concept = one file
│   └── customers.md
└── metrics/
    ├── index.md
    └── weekly_active_users.md

File path is identity. tables/orders.md is the concept tables/orders. No registry, no central authority.

A real concept file

---
type: BigQuery Table
title: Orders
description: "One row per completed customer order across all channels."
resource: "https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders"
tags: [sales, orders, revenue]
timestamp: 2026-05-28T14:30:00Z
---
 
# Schema
 
| Column | Type | Description |
|--------|------|-------------|
| `order_id` | STRING | Globally unique order identifier |
| `customer_id` | STRING | FK to [[customers]] |
| `total_usd` | NUMERIC | Order total in US dollars |
 
# Joins
 
Joined with [[customers]] on `customer_id`.

Type drives routing and filtering. Links like [[customers]] turn the directory into a graph. Broken links are fine - they just mean that concept hasn't been written yet.

Why OKF beats RAG where it counts

Dimension RAG OKF
Paradigm Retrieve every time Compile once, read always
Latency High - vector search + re-ranking on each query Near-zero - file read from disk
Cost High - embeddings + LLM context every query Minimal - just file I/O
Freshness Depends on re-index pipeline Git, CI/CD, PR reviews - you already have this
Portability Tied to Pinecone, Weaviate, etc. Filesystem + git - works anywhere
Structure Chunks of raw text, no semantics Typed concepts with YAML
Agent role Read-only - agents only query Read-write - agents maintain the wiki
Versioning Not designed for it Native - diffs, history, ownership

Karpathy put it well: RAG is like interpreting source code every time you run it. OKF is like compiling once to a binary.

RAG rediscovers on every question. OKF builds a living wiki that gets more valuable the more you use it. I felt this directly - once our tables had proper description and tags, the model stopped guessing join keys.

Where OKF came from - the Karpathy LLM Wiki

Andrej Karpathy posted his llm-wiki.md gist on April 4, 2026. It was not a product, just a pattern you could paste into Claude Code, Codex, or Pi. It blew up - 5000+ stars, 5000+ forks, 16M+ views on the launch tweet in the first weeks.

"LLMs don't get bored, they don't forget to update cross-references, and they can touch 15 files at once."

His three layers still map exactly to OKF:

Layer What it holds Who owns it
Raw Sources Original articles, papers, meeting notes Humans - immutable ground truth
The Wiki Directory of markdown files, compiled from raw sources LLM writes, humans read
The Schema CLAUDE.md / AGENTS.md - rules that keep the agent disciplined Humans define once

Before OKF, every team's wiki was hand-rolled and slightly different. OKF formalizes layer 2 so different teams and different agents can actually exchange it.

What the spec actually requires

A bundle conforms to OKF v0.1 if:

  1. Every non-reserved .md file has parseable YAML frontmatter
  2. Every frontmatter block has a non-empty type field
  3. Reserved files (index.md, log.md) follow the spec's layout when present

That's it. Missing optional fields, unknown types, broken links, or missing indexes do not make a bundle invalid. The spec is intentionally forgiving, which is why it works in practice.

Concepts link with normal markdown links - absolute or relative - and consumers build the graph from them. A v0.1 bundle is still valid under v0.2, and v0.2 adds optional signals like sources, generated, verified, status, and stale_after plus a new Attested Computation type for values you can verify deterministically. The core - markdown + type - hasn't changed.

Who is building on it right now

Google's reference pieces - still the best place to start

Tool What it does How mature
Enrichment Agent Walks a BigQuery dataset and drafts an OKF doc per table/view, then enriches with docs Functional POC - in GoogleCloudPlatform/knowledge-catalog/okf
Static HTML Visualizer Turns any bundle into a single-file interactive graph Production-ready - share as artifact
kcmd CLI + MCP Server Syncs local bundle to Knowledge Catalog Early - but the catalog/ layout pattern is documented
Knowledge Catalog GCP product that ingests OKF natively GA - updated June 12 and again Aug 26 for scale

Google also shipped three sample bundles - GA4 e-commerce, Stack Overflow, and Bitcoin - generated by the reference agent so you can see a conformant bundle without running anything.

Since the launch, the Aug 26 post on scaling bundles with Knowledge Catalog shows the governance story - put bundles behind IAM, search them alongside BigQuery tables, and let agents pull them via searchEntries + LookupContext. If you run GCP, that is the path to go from one repo to org-wide.

What the community has built

Tool What it does
superops-team/okf Go CLI for git-based KBs - init, lint, search, git hooks
okflint Python linter for OKF - three tiers: core, profile, hygiene
WordPress Plugin Generates an OKF bundle straight from WordPress posts
Website-to-OKF Crawls any URL or sitemap and converts it to a bundle

None of this requires Google Cloud. I keep a bundle as plain markdown in Obsidian - Obsidian is the best local viewer for OKF because it already speaks markdown + YAML.

Where I would build next

Quick wins you can ship this week

  1. OKF Generator for the platform you already use - Notion, Confluence, GitBook, ReadMe, Obsidian. The audience is every Notion/Confluence team that is now adding agents.
  2. OKF MCP Server - let agents read/write/query bundles over MCP. MCP is fast becoming the default for agent-tool wiring.
  3. OKF CI GitHub Action - lint and deploy on every push or PR. A five-minute action that prevents drift.
  4. OKF Obsidian Plugin - templates, linting, graph view. Feels native.

The next layer

  1. Universal Enrichment Agent - same idea as Google's BigQuery agent, but for Postgres, Snowflake, Databricks, Salesforce, Shopify, Stripe, HubSpot.
  2. Knowledge Graph Query Engine - SQL-ish or GraphQL-ish queries over typed concepts with link traversal.
  3. Bundle Marketplace - publish and buy bundles for compliance, accounting, or medical coding - not all knowledge should be built from scratch.
  4. Cross-org Sync - diff/merge, selective sharing, access control for supply chains and partnerships.

Longer bets

  1. OKF-native OS - all agent context lives in bundles, not in ad-hoc prompts.
  2. Real-time streams - Kafka or event-stream integration for live-updating concepts.

If you are looking for a first contribution, start with 1 or 2. They are small, useful, and demo well.

Try it in 10 minutes

# Read the spec - one page, 15 minutes with coffee
curl -s https://raw.githubusercontent.com/GoogleCloudPlatform/knowledge-catalog/main/okf/SPEC.md | less
 
# Try the Go CLI
curl -fsSL https://raw.githubusercontent.com/superops-team/okf/main/scripts/install.sh | bash
 
# Try the enrichment agent (BQ public dataset, no web crawl)
git clone https://github.com/GoogleCloudPlatform/knowledge-catalog.git
cd knowledge-catalog/okf
pip install -e .[dev]
python -m reference_agent enrich --source bq --dataset bigquery-public-data.ga4_obfuscated_sample_ecommerce --no-web --out ./bundles/ga4
 
# Lint what you built
pip install okflint
okflint validate --manifest okf-base.yaml ./my-bundle/

The GA4 example is the fastest way to see the before and after: a real dataset turned into typed markdown files you can grep, diff, and hand to an agent.


Sources I checked while updating this on Sep 4, 2026: Google Cloud's June 12, 2026 OKF announcement by Sam McVeety and Amir Hormati, the okf/SPEC.md at GoogleCloudPlatform/knowledge-catalog (v0.2 now, v0.1 was 451 lines), Karpathy's April 4, 2026 LLM Wiki gist ( gist.github.com/karpathy/442a6bf555914893e9891c11519de94f ), and the Aug 26, 2026 Knowledge Catalog scale-out post. The 80% figure for enterprise use cases is directional, not a measured stat - treat it as a rule of thumb, not a benchmark.

Frequently asked questions

What is OKF (Open Knowledge Format)?

OKF is a vendor-neutral, open spec for storing organizational knowledge as a directory of markdown files with YAML frontmatter. Announced by Google Cloud on June 12, 2026, it formalizes the LLM Wiki pattern into a portable format. No SDK, no API, no vector database needed - just files.

How is OKF better than RAG?

RAG pulls from raw documents on every query - high latency, high cost, nothing sticks. OKF compiles knowledge once into a persistent wiki that agents read straight from disk. Near-zero latency, minimal cost, native git versioning, and no vendor lock-in.

What inspired OKF?

Andrej Karpathy's LLM Wiki gist on April 4, 2026 (5000+ stars and forks, 16M+ views on the launch tweet). His line: LLMs don't get bored, they don't forget to update cross-references, and they can touch 15 files at once. OKF turns that pattern into a shared standard.

Can AI agents write OKF bundles?

Yes. OKF is read-write for agents. An enrichment agent crawls raw sources - databases, docs, APIs - and writes conformant markdown files. Humans define the schema once, the agent keeps the wiki current. That is the shift: agents move from read-only chat to read-write maintenance.

Does OKF replace RAG entirely?

Not completely. RAG still fits massive unstructured corpora, legal discovery, and cases where raw source access is required. OKF replaces RAG for structured, curated, repetitive knowledge - which is roughly 80% of enterprise agent use cases.