Agent memory as a file format
TL;DR Highlight
Storing agent memory as Markdown plus a SQLite vector index cut retrieval to two tool calls.
Who Should Read
Backend developers who want long-term agent memory but find pipelines with pgvector and graph databases too heavy.
Core Mechanics
- Memory is data, not a pipeline
- Existing memory systems are multi-stage processes that extract information from conversations.
- The author defines memory as a data format and drops the process.
- A memoryfield is md files plus SQLite in a zip
- It holds Markdown pages (optional YAML frontmatter) and an optional SQLite vector index.
- The example index uses nomic-embed-text-v1.5.
- Agents write prose directly, no chunking
- The agent writes the memory in Markdown at creation time, so no chunking or summarizing is needed.
- Pages are capped at about 8kb (~2000 tokens); add more pages for more detail.
- Semantic jump instead of graph walking
- Walking a graph needs N+1 tool calls for depth N, at roughly 2-3 seconds each.
- Semantic search plus parallel reads needs at most 2 tool calls (one search, one read).
- Leave access patterns to the model
Community Reactions
- Experience of skipping memory entirely
- One commenter said a single poisoned line hurts everything downstream, so they use per-agent temp folders and prune constantly.
- They treat information that can be inferred as noise and keep it out of documents.
- Opinion that a good AGENTS.md beats memory
- One commenter found a really good AGENTS.md almost always gives better results than enabling memory.
- Pushback on "irrelevant material never surfaces"
- Commenters said past dead ends or wrong conclusions still look semantically relevant and keep surfacing.
- Another said pure vectors can fail keyword lookup, so hybrid search is still useful.
- Suggestion to use a git repo
- A commenter proposed a git repo of Markdown pages for incremental writes, commit pinning and diffs instead of regenerating a zip.
- They said to gitignore SQLite as a rebuildable cache.
- Experience with a similar setup
How to Apply
- Try the sample memoryfield to see the search flow
- Install ollama, uv and npx, run ollama pull nomic-embed-text, then install the CLI and skill.
- Open the author's soapstones.memoryfield.zip and check whether your agent searches then reads in parallel.
- Migrate existing agent memory to md pages
- Rewrite fact lists as prose pages under 8kb with title, summary, uuid and date frontmatter.
- Add source URLs to each page so it can be verified later.
- Count tool calls in your graph-based memory
- Check logs for how many tool calls one question triggers in your current graph or wiki setup.
- Switch to one search plus parallel reads and compare call count and latency.
- Pin and review memories from outsiders
- Open and read any zip shared with you.
- Pin it with sha256sum and connect only trusted sources to your agent.
Try It
# Run in a terminal for Claude Code (install steps as in the original)
# Requires: ollama, uv, npx
ollama pull nomic-embed-text
uv tool install git+https://github.com/calpaterson/memoryfield-tool
npx skills add calpaterson/memoryfield-skill -g -y
# After installing, ask Claude Code something like:
# "Using the memoryfield skill, create ./my-memories.memoryfield.zip and save what I learned today about {{topic}} as Markdown pages under 8kb, with source URLs."
# Next: download soapstones.memoryfield.zip, ask how to search Reddit, and count the tool callsTerminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.