# Knowledge as Code: The Memory File Just Got a Spec

DevFeed: [Knowledge as Code: The Memory File Just Got a Spec](<https://devfeed.tech/articles/knowledge-as-code-the-memory-file-just-got-a-spec-19010.md>)

Original publisher: [Read original article](<https://www.pulumi.com/blog/knowledge-as-code-the-memory-file-just-got-a-spec/>)

Author: Engin Diri

Published: 2026-07-14T00:00:00Z

Content type: opinion

Language: en

Sources: [Pulumi](<https://devfeed.tech/sources/pulumi.md>)

Topics: [Wiki](<https://devfeed.tech/topics/wiki.md>), [Markdown](<https://devfeed.tech/topics/markdown.md>), [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [context window](<https://devfeed.tech/topics/context-window.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [google](<https://devfeed.tech/tags/google.md>), [google-cloud](<https://devfeed.tech/tags/google-cloud.md>), [knowledge-base](<https://devfeed.tech/tags/knowledge-base.md>), [memory](<https://devfeed.tech/tags/memory.md>), [perspectives](<https://devfeed.tech/tags/perspectives.md>), [platform-engineering](<https://devfeed.tech/tags/platform-engineering.md>), [rag](<https://devfeed.tech/tags/rag.md>), [schema](<https://devfeed.tech/tags/schema.md>)

## AI overview

The article argues that agent memory files need a shared format so knowledge bases can be exchanged between people and agents. It describes Google's LLM wiki pattern as an approach using interlinked Markdown pages, summaries, change logs, and entity pages, contrasting it with repeatedly retrieving and re-deriving information from raw documents.

## Source excerpt

Five weeks ago I wrote that the least glamorous piece of an agent loop is also the one that decides whether it compounds: memory. A markdown file outside the context window that holds what is done, what is next, and what was learned, because the model forgets all of it between runs. Write the memory file before the loop. What I left open, because there was nothing to point at, was the format. My memory file looked nothing like yours, and neither of our agents could read the other's. Three days after that post went live, Google shipped an answer. The pattern everyone copied Andrej Karpathy published a gist in April he called the LLM wiki, and it collected thousands of stars and forks. It's meant to be pasted straight into a coding agent. Instead of indexing your documents for RAG and re-deriving answers from raw text on every query, the agent builds a wiki and keeps it current: interlinked markdown pages, an index.md with a one-line summary per page, a log.md recording every change, entity pages that grow as sources come in. Drop in a meeting transcript and the agent reads it, updates a dozen existing pages, fixes the cross-references, and appends to the log in one pass. It took off for the same reason wikis usually die. A knowledge base is valuable in exact proportion to the bookkeeping nobody wants to do: summarizing, linking, reconciling contradictions, pruning stale claims. Karpathy's line, which Google now quotes back in its own announcement, is that LLMs "don't get bored, don't forget to update a cross-reference, and can touch 15 files in one pass." The human curates sources and asks questions. The agent does the janitorial work that made every previous wiki rot. A wiki only your agent can read Then everyone built one, and every one is a dialect. Mine links related pages in the frontmatter; yours links them at the bottom of the body. Mine has a tags field; yours calls it categories. None of this matters while the wiki serves one person, because the schema lives