HomeArticle

Losing memory as soon as the conversation ends: MindForge develops the on-device Agent memory bank

氪友efJH2026-11-09 11:19
An 18-year-old secondary vocational school student spent 7 months developing MindForge, a local-first open-source AI long-term memory project.

How long can an AI Agent remember you? The answer from most products is: until the end of this conversation.

On November 8, the open-source project MindForge released v6.4.0, which aims to solve exactly this problem: equipping Agents with a set of memories that can be stored for a long time, accessed on demand, and kept entirely on the local device. The project is maintained solely by Gu Fengyu, who was born in January 2008, is 18 years old this year, and is currently studying at a secondary vocational school. Since the project was initialized on March 30, the core package has 59,000 lines of Python code, totaling 83,000 lines including tests.

The amnesia of Agents is not caused by insufficiently intelligent models

There are two common approaches currently: stuffing historical conversations into the context window, or hosting memories in a cloud vector database. The problem with the former is computational cost — the longer the conversation, the more tokens are carried in each request, and no matter how large the window is expanded, there is a hard limit. The problem with the latter is not technical, but locational — the facts about the user leave the user's device, and each recall requires an extra network round trip.

What's more troublesome is that memory retrieval is not the same as knowledge base retrieval. RAG searches for "which piece of material can answer this question", while memory needs to answer "which facts about this person still hold true at the moment". Facts expire and contradict each other: someone lived in Yancheng last month and moved to Nanjing this month; someone considered raising a cat three months ago but gave up later due to allergies. If only similarity sorting is performed, the system will serve up expired and conflicting memories together.

Therefore, MindForge does not focus on "storing more", but on "managing the life cycle" — what to remember, what to forget, and which memory to trust when two memories conflict.

Keep memories on the local device: four-layer structure, multi-path retrieval, one SQLite file

Its first design principle is local priority. Storage uses SQLite plus FTS5, and the entire memory library is a single file that can be migrated across environments; without relying on the cloud, there is no network latency and no additional data hosting costs.

In terms of structure, memories are divided into four layers: sensory, short-term, long-term, and permanent. New content first enters the short-term layer, then gradually gets promoted or decays along the Ebbinghaus Forgetting Curve according to its importance and access frequency; high-value entries are repeatedly strengthened before entering the long-term or even permanent layer, while low-value entries fade out naturally. This layering mechanism determines "what should be forgotten", instead of laying all content flat in one vector index.

The retrieval side also does not use single vector search. According to the design, results from vector search, FTS5 full-text search, TF-IDF, fuzzy matching, query expansion and Cross-Encoder reranking are fused into one sorted list, which is then superimposed with weights of coverage, importance, access frequency and time decay. It provides four sets of interfaces externally: MCP, Python SDK, command line and REST — 87 tools are registered under MCP alone, and there are more than 200 subcommands on the command line, so Agent clients can connect without modifying their architecture. The memory body is encrypted and written to disk with AES-256-GCM, and the key derivation algorithm was changed from PBKDF2 to scrypt in v6.3.1; privacy is divided into four levels, and STRICT-level memories will not be returned in normal retrieval.

On a cloud host with 2-core CPU and 3 GB memory (Python 3.12, no optional vector extensions installed), the system delivered the following metrics: 1219 items passed and 1 item skipped in the full test, taking 208 seconds, which is consistent with the 1220 items marked in the repository; batch writing of 10,000 memories takes 396 milliseconds, equivalent to about 25,000 memories per second; on a library with a scale of 100,000 entries, the median single write is 11.8 milliseconds, the median retrieval is 4.7 milliseconds, and P95 retrieval latency is 66 milliseconds; the entire library file is 52.8 MB, with an average of 553 bytes per memory.

Another set of tests focuses on retrieval accuracy: 300 customer records with unique contract numbers are written, then 50 queries are initiated using the numbers, and all top 10 results hit the target. After marking a memory as STRICT, the same retrieval no longer returns it — privacy classification is not just a statement in the document, but an actual filter on the retrieval path. Cross-session facts can also be recalled: first record "considering raising a British Shorthair but worrying about hair shedding", then ask "what was the name of the previous project" after several sessions, the system can dig out from old records that "the project has been renamed MindForge, and its previous name was ClawMemory".

It also has clear shortcomings. When vector extensions are not installed, only three paths of retrieval are available, so you cannot get the recalled result if you rephrase the question — when using "what to pay attention to when raising a cat" to query the above British Shorthair memory, the result is empty. Entity extraction for colloquial Chinese is also unstable: when it is asked to extract a knowledge graph from four memories, the number of entities extracted is 0; when you change "lived in Yancheng" to "moved to Nanjing", the conflict detection does not report any anomaly. These capabilities are all present in the code, but the coverage of Chinese common sense reasoning is still insufficient. The author has marked the recall limitations of the zero-dependency mode in the documentation, and does not list "six-path retrieval" as a default capability.

A notable detail is latency. The project's own benchmark shows that the median write latency for direct calls inside the engine is 2.0 milliseconds, and the median retrieval latency is 2.9 milliseconds, but the latency will rise to 698 milliseconds when using command line subprocesses, and almost all the extra latency comes from Python interpreter startup. Therefore, v6.4.0 adds a resident daemon process to keep the engine in a long-lifecycle process, reducing the latency of a single request to 2.5 milliseconds. This kind of problem cannot be exposed in the feature list, and is only discovered and solved in real usage scenarios.

Seven months of work by one person, and a not-yet-implemented business plan

The timeline is very clear: the project was initialized on March 30, 2026; the first public commit was submitted on July 17, when the project was still named ClawMemory; at the end of August, the author deleted the experimental downgrade encryption he wrote, on the grounds that security standards do not allow it to exist; the project was renamed MindForge on October 2; v6.0 released on October 31 formalized the multi-Agent memory space; v6.4.0 was released on November 8. There was no team or financing throughout the whole process.

Gu Fengyu's background is not particularly outstanding: he is a current student at a secondary vocational school, not graduated from a top university, and has no work experience at large tech companies. He wrote directly on the project homepage — "Education cannot define the upper limit of a person, but code can prove a person's attitude". This sentence is full of youthful spirit, but the content in the repository is verifiable: continuous integration, 1220 tests, reproducible benchmark scripts, and a set of control methods specially designed to identify measurement artifacts such as "encrypted writing is faster".

The target users are also clear: Agent teams working on end-side or private deployment, industry customers that require data not to leave the internal network, and independent developers who do not want to purchase an extra set of cloud services for memory. The business model is still in its early stage: it is open source under the MIT license, with core functions free of charge, and the possible charging directions are enterprise private deployment and technical support, but no paid product has been formed yet; there is no financing at the current stage, and the priority is to complete the first release on PyPI, then supplement the vector database backend, Web dashboard and plugin ecosystem.

The hardest part of a memory system has never been "storing things down", but judging "what is worth remembering and when to forget". An 18-year-old developer spent seven months building this into an installable, testable system that can be directly called by Agents. It is still far from a mature commercial product, but it at least proves one thing: to equip Agents with memory, we do not have to assume that users are willing to hand over everything to the cloud.