Model or dataset
buildingjoshbetter/TrueMemory avatar
buildingjoshbetter/TrueMemory

TrueMemory: Local SQLite Memory for Claude Code, Cursor and Codex CLI

The memory your AI should have had from the start. Automatic capture, automatic recall, 100% local. One SQLite file, zero cloud. Works with Claude Code, Claude CLI, Cursor, Codex CLI, Gemini CLI.

380 stars48 forksPythonAGPL-3.0

At a glance

What is it?
TrueMemory is an AGPL-3.0 Python memory layer that captures and recalls agent context into a single local SQLite file. The design is sound for offline single-machine use, but the tiering is confusing and the benchmark claims need independent reproduction before you trust them.
Who is it for?
Adopt TrueMemory if you run Claude Code, Cursor, Codex CLI or Gemini CLI on one machine, want memory to stay in a local SQLite file, and are willing to accept AGPL-3.0 terms. Do not adopt it if you cannot supply an LLM API key for the Pro tier and need the 93.0% LoCoMo or 92.0% LongMemEval figures, because Base tops out at 92.0% and 84.1% in the same table.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 14 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The amnesia problem TrueMemory is aimed at

Every agent session starts blank. The README frames this with a concrete example: an agent asking "What framework are we using?" for the twelfth time in a week because it has no record of the previous eleven answers. TrueMemory's stated goal is to remove that repetition without the user tagging, filing or searching anything by hand. The intended audience is narrow and identifiable: developers running Claude Code, Claude CLI, Cursor, Codex CLI or Gemini CLI who want the agent to remember stack choices, preferences and corrections across sessions. The README gives the shape of that memory: FastAPI as the framework, Pydantic v2 as a preference, auth middleware under src/auth/. Those are the kinds of facts the project claims to capture and re-inject automatically. It is not a general document store, and it is not a retrieval library you call from your own application, although a Python API is exposed for that second use.

Automatic capture, automatic recall, one SQLite file

The architecture described in the README is a three-stage loop: capture, consolidation, injection. Capture happens passively from conversations, which is why the README says there is no manual tagging and no prompt engineering. Consolidation is the part worth scrutinising. The README states that TrueMemory resolves contradictions when a preference changes, updates stale facts and consolidates what it knows, and that behaviour is why the v0.7.5.0 release is titled Deterministic Memory Triggering. Deterministic triggering suggests the decision to write or update a memory is rule-driven rather than left to a model's judgement, though the README does not spell out the rules. Storage is a single SQLite file on the local machine, and the topics list names embeddings and vector-search, so recall is semantic rather than keyword-only. Retrieval then injects the selected memories into the next session. The whole path stays on-device, with one stated exception: anonymous usage telemetry that never includes memory content and that a single environment variable disables. The README does not name that variable, which is a gap worth closing before you install.

Installing TrueMemory and choosing a tier

For the CLI integrations, the README gives a one-line installer: curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh | sh. Windows users get the PowerShell equivalent, irm https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.ps1 | iex. The README states the installer uses an isolated environment, needs no sudo, and downloads roughly 1.5GB of AI models, with a suggested wait of three to five minutes. After installation you quit the AI tool completely and reopen it, then type "Set up TrueMemory" and pick a tier. Tier switching is conversational too: "switch to Pro" or "switch to Base". For library use, pip install truememory exposes a Memory class with add and search, as in m.add("Prefers dark mode and TypeScript", user_id="alex") followed by m.search("preferences", user_id="alex"). Note the user_id argument on both calls: memory is namespaced per user, not global. The README does not document the on-disk path of the SQLite file, the telemetry environment variable name, or how to back the file up, so plan to locate those yourself after install.

Why the three tiers are the weakest part of the pitch

Edge, Base and Pro share one architecture but differ in model weight and capability. Edge ships an 8MB embedding model and a 22M-parameter reranker, runs on CPU only, and scores 89.6% on LoCoMo. Base moves to a 600MB embedding model and a 149M-parameter reranker, needs 4GB or more of RAM, and scores 92.0% on LoCoMo. Pro keeps Base's models and adds HyDE search, which the README says requires an LLM API key, and reaches 93.0% on LoCoMo, 92.0% on LongMemEval and 76.6% on BEAM-1M. The problem is that the headline "100% local, no API keys needed" claim holds for Edge and Base but not for Pro, which is the tier the comparison table uses when it lists TrueMemory against Mem0, Supermemory, MemOS and ReadAgent. The 93.0% figure belongs to a configuration that makes outbound LLM calls. That is a legitimate design, but the marketing collapses two different products into one row. A reader comparing TrueMemory Pro's 93.0% against Mem0's 61.4% is not comparing like with like unless Mem0's number was also produced with query expansion.

Where TrueMemory is the wrong tool

The local-first design has a hard boundary: memory lives on one machine in one SQLite file. There is no described sync, no shared team memory and no server mode. If two developers want a shared record of project decisions, or if you work across a laptop and a desktop, TrueMemory as documented does not solve that, and a hosted option such as Supermemory, which the README marks as not local-first, would fit the requirement better. The Pro tier also breaks the offline promise: HyDE search needs an API key, so the highest-scoring configuration sends query text to an LLM provider. Beyond deployment shape, there is the question of what automatic capture does to context quality. The README claims TrueMemory "figures out which ones actually matter and throws away the rest", but it does not describe a review step, a confidence threshold or a way to inspect what was captured before it is injected. For a codebase where a wrong remembered fact is worse than no memory, that absence matters. The README does not document a command for auditing or deleting individual memories, so treat that as unverified.

TrueMemory against Mem0 and MemOS

The README's own comparison table is the most useful part of the material because it states each system's approach, not just a score. Mem0 is Apache-2.0 and marked as only partially local-first, with no auto-capture, which means you decide what goes into memory. MemOS is Apache-2.0, fully local, and also lacks auto-capture. TrueMemory's differentiator is precisely that column: capture happens without an explicit write call. That is the trade-off in one line. Mem0 and MemOS give you a library you call at the points you choose; TrueMemory gives you a background process that decides for you. The licence difference is equally concrete. Apache-2.0 permits closed redistribution; AGPL-3.0 does not, so if you intend to ship a product that embeds this memory layer, the licence, not the benchmark, is the deciding factor. ReadAgent appears in the table as a research system and is not local-first, so it is not a practical alternative for the same use case.

Licence, upgrade cost and what to verify

TrueMemory is AGPL-3.0. If you run it as a local developer tool, the network-copyleft clause is unlikely to be triggered, but if you embed it in a service other people reach over a network, AGPL-3.0 obliges you to offer the corresponding source. That is the general shape of the licence, not legal advice; get your own review before shipping anything built on it. Upgrade cost is visible in the release history: v0.7.5.0 introduced deterministic triggering on 2026-06-08, and two hardening releases, v0.7.6.1 and v0.7.6.2, followed within three days, both titled BLAST OFF. That cadence suggests a project still settling its core behaviour, and the 1.5GB model download means a tier or model change is not a trivial update on a metered connection. Before adopting, check three things in the repository itself: the benchmarks/ scripts, which the README says are self-contained and run on Modal, and which are the only way to confirm the LoCoMo, LongMemEval and BEAM-1M numbers under your own judge and answer model; the telemetry environment variable, which the README references but never names; and the AGPL-3.0 terms against how you plan to deploy.

Editorial conclusion

Adopt TrueMemory if you run Claude Code, Cursor, Codex CLI or Gemini CLI on one machine, want memory to stay in a local SQLite file, and are willing to accept AGPL-3.0 terms. Do not adopt it if you cannot supply an LLM API key for the Pro tier and need the 93.0% LoCoMo or 92.0% LongMemEval figures, because Base tops out at 92.0% and 84.1% in the same table. Before installing, verify three things: that the pip package name truememory resolves on PyPI, that the benchmarks/ scripts actually run under your own answer model and judge, and that your tooling tolerates the roughly 1.5GB of model weights the install script downloads.

Official sources

  1. buildingjoshbetter/TrueMemory on GitHub
  2. License: AGPL-3.0
  3. Project website
  4. README
  5. Releases
Community notes

Community notes