Every AI agent forgets everything when the session ends. Fixing that usually means wiring up a vector database, an embedding pipeline and a retrieval service — a platform, with servers to run and backends to choose. I wanted the other thing: a primitive. npm install, one file on disk, done. The SQLite of agent memory.
So I built rememori: an embedded memory engine in pure TypeScript with zero runtime dependencies. This post is about the three design decisions that turned out to matter — the scoring formula, the entity graph, and an HNSW index that taught me a lesson about benchmarks.
Three verbs
The whole API:
import { Memory } from 'rememori';






