QuoteMem is a local service that provides long-term memory for AI agents, and its design focus is to let every memory retain an exact quote of its source original text. Each memory is a short statement bound by byte range to the original message that produced it, so the memory content can be traced back to what was specifically said.
Main capabilities
-
Original-text quotes: every memory stores an exact quote from its source message; the program verifies whether the quote can be found in the stored messages, quote groups that cannot be found are discarded, and facts with no remaining quote groups are rejected.
-
Updates retain old versions: when a fact changes, the new memory supersedes the old one; the old memory is not deleted but marked as past and linked to the new memory, with the link recording when the change took effect.
-
Forgetting mechanism: a forgetting request deletes the memory stating that fact, or rewrites the memory to remove the forgotten details; the removed original words are withheld and will no longer be shown in any read. A tombstone record is also kept, and subsequently added memories are compared against the tombstone: new facts on the same topic with the same wording (ignoring case, spaces and sentence-ending punctuation) are rejected, and close facts go to review to determine whether they restate the forgotten content. Search also uses the forgetting records (forgotten names, topic words and vectors) to filter out hits related to forgotten facts.
-
Review mechanism: under the default standard review mode, facts that may duplicate, update or correct an existing memory are handed to a judge model; when the answer would replace or correct an existing memory, two consistent answers are required before the change is executed. The input of every decision is saved for inspection and replay.
-
Multi-tool sharing: the plugins of all tools communicate with the same local service; information told in one tool can be recalled in other tools, and a forgetting initiated in one tool also affects the shared memory. By default all tools use the same user ID (QUOTEMEM_USER_ID, defaulting to the operating system username), and different users' memories are isolated from each other.
Usage
Node 20.3 or later is required, as well as uv in PATH. The default preset uses an Alibaba Cloud Bailian (DashScope) API Key. The installation command is npm install -g quotemem, then run quotemem setup for one-time configuration, following the prompts to choose a preset (press Enter to use the default), a review mode (press Enter to use standard) and enter the key; for script scenarios you can use quotemem setup --yes --preset default --review standard, and reads the key from the DASHSCOPE_API_KEY environment variable.
Install a specific tool plugin, for example Cursor: quotemem install cursor --write, which writes ~/.cursor/hooks.json and ~/.cursor/mcp.json and prints the rules that need to be copied into each project. quotemem doctor can check the configuration. The service runs on 127.0.0.1:8765 by default; a custom port can be used by setting QUOTEMEM_URL in ~/.quotemem/env. quotemem status shows the service status, and quotemem stop stops the service.
It can also be used from code: the HTTP service reads the bearer token from the data folder; any MCP client can use the memory tools (search, add, history, forget). Without Node, you can run quotemem serve via uvx quotemem serve or after pip install "quotemem>=0.3".
Data storage and rebuilding
Storage consists of two SQLite files in the service workspace folder; memories, versions, quotes, and review decisions are kept in memory.db, and vectors are also stored inline. To back up, stop the service and back up the entire data folder. Saved messages and forget records are the data source; memories, versions, and review records are generated from them; the stored Add mode, review, and embedding model are fixed at creation time. quotemem export exports messages and forget records as a log, and quotemem rebuild replays them with the current code into a new empty data folder (--from <old directory> --to <new directory>), thereby changing settings or upgrading versions.
Use cases and limitations
Suitable for scenarios that need to share long-term memory across multiple AI programming tools or MCP clients and require memories to be traceable, updates auditable, and forgetting enforceable. In the official Agent Memory Leaderboard (AMLB) Cycle 2 results, QuoteMem scored 59.83 overall in the Textual Memory · Closed-source Methods category,ranking 23rd among 125 entries. The project uses the MIT license, and the included HeavenBase is likewise MIT licensed. CI runs ruff, pyright, service smoke tests, and build checks on Python 3.12, 3.13, and 3.14, and runs Node tests on Node 20 and 24. The default preset depends on an Alibaba Cloud Bailian API Key; the service retains the proxy settings of the tool or shell that started it, and if the proxy is only used for downloads, the model host needs to be added to NO_PROXY.