inferwire
/
AI·2 min read

Memoryfields: Agent Memory as Plain Markdown Files

Cal Paterson proposes memoryfields, a portable agent-memory format of short Markdown pages plus an optional SQLite vector index, instead of graph databases and multi-stage pipelines.

TL;DR

  • Cal Paterson argues most agent memory systems fail because they treat memory as a process, and proposes "memoryfields", a file format of Markdown pages [^1].
  • Agents write memories as prose, and find them by semantic search in at most two tool calls instead of walking a knowledge graph [^1].

Background

Many model benchmarks start from a blank context window, but real agents work better starting with relevant information, Paterson writes [^1]. Paterson sees three kinds of memory systems failing: ones tied to a vendor's harness that mine conversation history, so most memories are about the user rather than the world; elaborate ones, such as a system needing pgvector, a Neo4j graph database and its own model to decide what to remember; and idealized graph-based ones that strip facts from their context [^1].

What happened

Paterson's alternative is a zip archive of Markdown pages, each with optional YAML frontmatter, plus an optional SQLite vector index for semantic search [^1]. The design rests on three decisions. First, use prose instead of chunks or extracted facts: an agent forming a memory can write it directly, so nothing needs to be chunked or summarized. Pages have a soft limit of about 8 KB, roughly 2,000 tokens, so they fit in a single embedding; more detail means more pages [^1].

Second, jump by semantic search instead of walking a graph [^1]. Paterson argues that hyperlinked wikis, like the "Karpathy wikis" built on Obsidian-style links, are slow because each hop costs a tool call, and unreliable because the agent can only judge relevance from link text and titles. With search, the agent finds all relevant pages by content and reads them in parallel, in at most two tool calls [^1]. Third, more model, less mechanism: let the model do the work instead of an elaborate pipeline [^1].

Why it matters

Memory is becoming a lock-in point: whoever holds an agent's accumulated knowledge controls where that agent can run. A plain, portable format that any harness can read would let memories move between tools. The broader argument is that as models get better at reading and writing text, simple files scale with them, while complex machinery built around older models' weaknesses gets in the way [^1].

Practical example

Say a research agent learns, over weeks, how a company's VPN is configured. Under memoryfields, it writes a short Markdown page about it. Months later, another agent in a different tool loads the same archive, searches for "VPN," gets that page and reads it in one step, without anyone building a graph or a pipeline [^1].

Related gear

We recommend this book because it provides foundational insights into state storage, serialization formats, and reliable data systems.

AdvertisementAmazon

Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems

Sources

  1. [1]Cal Paterson — Agent memory as a file format
  2. [2]Hacker News — Agent memory as a file format