LLM Long-Term Memory

llm-long-term-memory · SQLite + FTS5 · MIT

GitHub Docs

Memory that knows what is still true

A temporal memory layer for LLM agents.

connecting… ·encoder ·no language model is called on this page
Templates
Write 0
This closes the previous value on the same key
A per-fact verdict, not a per-key one.

Memory state
Retrieve
</> Developer
nothing yet
70.0%
Held-out accuracy
heldout100 · one frozen run
1,468
Median context tokens
whole transcript is 109,260
+20pp
Recovered by the raw archive
structured memory 50.0% → final 70.0%

How it works

01

Facts expire

A new value closes the old one’s window.

02

Compression is lossy

Extraction keeps the gist and drops the artifact.

03

It says what it skipped

Rejected memories come back too, with the reason.

Measured, not just demonstrated

70.0%
held-out accuracy
1,468
median context tokens
+20pp
recovered by the raw archive

Two limits matter as much as the numbers. These 100 informed no decision.

Evaluation methodology →

Built for developers

REST API
six endpoints
MCP Server
five tools
SQLite + FTS5
one file, no service dependency
Local embeddings
384-dim, never leaves the machine
560 tests
CI on three platforms
Reproducible
source, config and data hashed file by file
Source and design decisions →