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
- With only files, agents invented their own methods, such as perl bulk replaces or inline CSV queried with SQLite.
- The claim is that memory use improves as models improve.
- Security: only share context with trusted parties
- Never share your context, including via memories, with parties you don't trust.
- The zip format lets you review and pin received files with sha256sum, but agents still can't tell a good prompt from an evil one.
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
- One commenter stored session turns in sqlite-vec, exposed search via MCP and had the agent write md notes.
- They found it simpler but better, and notes let the user correct false lessons.
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
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques