DeerFlow's memory is a local store called DeerMem that keeps each remembered fact as its own Markdown file. DeerMem extracts those facts by itself after a conversation has been quiet for 30 seconds, and it puts the facts with the highest confidence scores into the prompt of later conversations.

Around 1995, Daniel Bernstein's Maildir format gave every email message its own file in place of one shared mailbox.

DeerFlow stores facts the way Maildir stores messages, one file each. Everything below is from the DeerFlow repository at the commit of November 17, 2026 that the links point to, and it's one worked case of AI agent memory.

A conversation passes through fact extraction and then a write gate. Facts that pass are saved as one Markdown file each, and a later conversation has the highest-confidence ones injected into its prompt until a token budget is full.
DeerMem's default mode extracts facts after a quiet period, checks each against a write gate, stores one Markdown file per fact and injects the highest-confidence ones into later prompts.

How does DeerFlow store memory?

DeerFlow stores memory as plain files on your disk. The memory guide describes one memory.json per user, holding two summaries, and one Markdown file per fact under agents/{agent_name}/facts/.

The memory code's AGENTS.md, its notes for contributors, states the storage rule in one sentence: "Facts are one Markdown file each." The JSON file never holds facts or an index of them.

DeerMem's search uses a SQLite full-text index, and the contributor notes treat that index as derived data that can be rebuilt from the Markdown files at any time.

So the Markdown files are the memory, and you can open any fact in a text editor. If you edit a fact file by hand, DeerFlow doesn't see the change until you trigger a reload.

My page on the types of agent memory would call DeerMem's store semantic memory, plus the two summaries in memory.json. DeerMem keeps facts, and it doesn't keep a log of episodes.

What does DeerFlow write to memory, and when?

DeerFlow writes facts extracted from what the user said and from the assistant's final replies. A turn in which the assistant asked for a tool is left out, and the same AGENTS.md gives the reason as a rule: "Tool-call intent is not memory."

Extraction waits for a pause in the conversation. The guide gives a quiet period of 30 seconds by default, and extraction runs no later than 300 seconds after the first pending update, even if the conversation never pauses.

DeerMem's default mode then labels every proposed fact three ways: whether it belongs to the user or to a project, whether it will last beyond the task, and whether it describes the user or grants a one-time permission. A write gate made of fixed rules, not a model, reads those labels and decides whether the fact is stored, and that gate is the part I'd copy.

The gate accepts durable, descriptive facts about the user, say a preferred language. Temporary task state and one-off permissions stay in the conversation's own state, and duplicates are skipped when the update is applied.

DeerMem has a second mode that skips the write gate. With memory set to tool mode, the model writes and edits facts itself through memory tools, which the guide calls a separate, model-directed path.

How does DeerFlow decide what to forget?

DeerFlow's default is to forget the facts it's least confident about. When one pool of facts, such as one agent's, reaches the limit set in max_facts, the default policy evicts in order of confidence alone.

An optional policy called hybrid-v1 weighs three signals: confidence at 65%, how recently the user confirmed the fact at 25%, and how often searches returned it at 10%. Hybrid mode also reserves 10% of the slots, and no more than 10, for facts that correct an earlier fact.

A rule in the contributor notes matters more than those percentages. The notes say "Confirmation needs human evidence", which means only evidence from the user counts as confirming a fact, and a repeat by the model doesn't.

The confidence score itself still comes from the model that extracted the fact. My essay on evidence in agent memory argues for a neighbouring rule, that a note should carry its source.

How does memory get back into the prompt?

Memory gets back into the prompt through two separate paths, injection and search. Default injection adds the user's two summaries and then the agent's facts in order of confidence, until a token budget is full.

Search is a tool the model calls when it wants a fact that wasn't injected, and it ranks facts by a full-text score combined with time decay and confidence. DeerMem can also choose which facts to inject based on the current question, and that setting is off by default.

Injection can be switched off for the whole system or for one agent. When it's off for an agent, the guide says the previously injected block is removed from that agent's state before the next model call.

When a long session is compacted, a summary replaces its older messages. DeerMem takes a snapshot of the messages about to be removed and queues that snapshot for extraction, so their facts are saved before the messages are gone.

Memory compression covers what a summary can drop.

What other memory backends does DeerFlow support?

DeerFlow has optional backends for mem0, OpenViking and Honcho, as of this reading. DeerMem stays the default, and you switch backends with one line of configuration.

The repository also includes an empty backend as a template for writing your own.

Backend Where memory lives What the guide says about it
DeerMem Local files The default
mem0 The hosted mem0 platform or a compatible self-hosted server Opt-in
OpenViking OpenViking sessions Opt-in; the first integration supports a single DeerFlow user
Honcho A Honcho server, hosted or self-hosted Opt-in, with no fact editing from DeerFlow's settings page

I managed the writing team at Mem0 earlier this year, so weigh what I say about the mem0 row with that in mind. I'd start with DeerMem, the default, because you can open its fact files and read what the agent remembered.

What do I make of DeerFlow's memory?

DeerMem's default write path is the strictest I've read in an open-source agent project. The rules I'd study are about which facts may be written and who may confirm them, and retrieval is a plainer full-text search weighted by time decay and confidence.

DeerMem also has a lot of settings: the guide documents flags for deduplication, eviction, relevance ranking and shutdown.

DeerFlow calls itself an agent harness, and memory sits beside DeerFlow's sandboxes and sub-agents in the way agent harnesses describes.

FAQ

How does memory work in DeerFlow?

DeerFlow extracts facts from conversations after a quiet period, checks each against a write gate, stores accepted facts as Markdown files and injects the highest-confidence ones into later prompts. The default backend is called DeerMem.

Where does DeerFlow store its memory?

On local disk by default, as one memory.json of summaries per user and one Markdown file per fact. Optional backends store memory in mem0, OpenViking or Honcho.

Can you edit DeerFlow's memory by hand?

Yes, and DeerFlow needs a reload afterwards to see the edit. The fact files are Markdown and the search index is rebuilt from them, and the application also has a memory page in its settings.