llms.txt vs AGENTS.md vs OKF: three kinds of "markdown for AI" that solve different problems
Lately there is a pile of "markdown for AI": llms.txt, AGENTS.md, CLAUDE.md, OKF. I happen to use all three across my site and repo, and the question I get most is the same one: "if I have one of these, do I still need the others?"
It is a bit like the question from my last piece — "is OKF replacing RAG?" It is confusing because it puts things from different layers side by side. The difference is not which is better, but who each one talks to.
Here is the conclusion up front: llms.txt is for external LLMs reading your website, AGENTS.md/CLAUDE.md instruct the agent working inside your repo, and OKF is the structured knowledge that agent uses. Three layers, not three choices.
Same framing, previous piece: OKF vs RAG vs vector databaseThe real difference: who they talk to
To put them back in place, just ask three questions: who does it talk to, what does it contain, and when is it read?
| llms.txt | AGENTS.md / CLAUDE.md | OKF | |
|---|---|---|---|
| Who | External LLMs (reading your public site) | The coding agent working in your repo | An agent that needs knowledge |
| What | A curated map / index of the site | Behavior, rules, and pointers | The structured knowledge itself |
| Scope | One file, site level | One file, repo level | A directory of linked concepts |
| Contains | Key page links + blurbs | Conventions and where to look | Concepts, relationships, decisions |
| Read when | An LLM reads your site | The agent starts working | The agent needs a piece of knowledge |
llms.txt: presenting the site to LLMs
llms.txt is a markdown map at your site root (spec at llmstxt.org) that lets LLMs such as ChatGPT, Perplexity, and Claude — the ones reading your public site — quickly find your key content and cite it correctly instead of crawling blindly. Its audience is external models reading your site.
The key point: it is not there to instruct your coding agent, and it is not a knowledge base. It is an outward-facing map. I added one to this site, generated from the article data so it updates automatically when I publish.
AGENTS.md / CLAUDE.md: instructions, not knowledge
AGENTS.md (for Codex) and CLAUDE.md (for Claude Code) are the entry files a coding agent loads by default when it enters your repo. They describe how to work: project conventions, common commands, rules, and where to find things. They do not hold knowledge; they hold behavior and pointers.
First-hand: I use them as the entry point that sends the agent to my OKF knowledge base — "read the relevant node in /knowledge before you work." Without this layer, the knowledge base just sits there and no one reads it.
OKF: the knowledge itself
OKF is the thing being pointed to: structured, traversable, versionable knowledge — a directory of typed markdown, concepts linked into a graph. It answers "what should knowledge look like," not "how to behave" and not "how to be found from the outside."
Go deeper on OKF: Will Google OKF replace RAG and vector databases?How they compose (not replace each other)
In my actual setup the three coexist, each with its own job: AGENTS.md/CLAUDE.md is the entry instruction that points the agent to the OKF bundle; llms.txt goes the other way, outward, to the LLMs reading my site. The first two face inward, at the dev agent; llms.txt faces outward. None of them replaces another.
See it in practice: a repo as an OKF bundle for agent memorySo which one do you need?
Match to your need: a public site you want LLMs to read and cite correctly → add llms.txt. A coding agent working in your repo → write AGENTS.md/CLAUDE.md. A body of structured knowledge an agent uses repeatedly → put it in OKF. The answer is often "all of them," but do not use one as if it were another.
"Markdown for AI" is not one thing; it is three layers. Once you know who each one talks to and when it is read, the real question is no longer which to pick. It is whether you have covered all three.