Your agent forgets. Give it memory.
rememori is an embedded memory engine in pure TypeScript. Zero dependencies, zero servers, zero native bindings. One file on disk — or IndexedDB in the browser.
npm install rememori
v0.3.0 · 0 dependencies · ~8 kB core · MIT
Every session ends the same way.
The context window empties. The user's preferences, the decisions made, the names mentioned — gone. Fixing it usually means a vector database, an embedding pipeline and a retrieval service. All that, for a bot that needs to remember fifty things.
Memory should be a primitive, not a platform.
Three verbs.
That’s the API.
remember stores text with its embedding, tags and extracted entities. recall ranks by cosine similarity × importance × time decay — plus a graph bonus for shared entities. forget deletes. Everything else is an option, not a method.
Bring any embedder: Ollama for local privacy, any OpenAI-compatible endpoint, or your own function.
import { Memory } from 'rememori';
import { ollama } from 'rememori/embedders';
const mem = await Memory.open('./agent.mem', {
embedder: ollama('nomic-embed-text'),
});
await mem.remember('User prefers dark mode', {
tags: ['prefs'], importance: 0.8,
});
const hits = await mem.recall('UI settings?', {
limit: 5, halfLifeDays: 90,
});
await mem.forget(hits[0].id);
Don’t take our word for it.
This section runs rememori in your browser. The embedding model downloads once (~30 MB, cached), then everything — embeddings, storage, semantic recall — happens on your machine. Open DevTools → Network and watch it stay silent.
Downloads the MiniLM embedding model (~30 MB) from Hugging Face, once. Your memories never leave this page.
Ready.
Recall is more than similarity.
Every memory links to the entities it mentions — a bipartite knowledge graph, built automatically at write time. At recall, memories sharing entities with the query get a bonus:
(cosine + graph) × importance × decay
So when the words don't match but the who does, the right memory still surfaces. Entity extraction is pluggable; the built-in heuristic costs zero dependencies and zero API calls.
If it runs JavaScript,
it remembers.
- Node ≥ 18append-only file, one
npm i - Bunsame file format, same API
- BrowserIndexedDB via
idb://paths - Edge workersbring a KV adapter — it's one interface
- Electronno rebuild, ever
Native-binding memory engines compile per platform and stop at the browser's edge. Pure TypeScript ships everywhere the language does — this very page is the existence proof.
What would you build?
A support bot that remembers the customer
Last ticket, preferred tone, the promise a colleague made two weeks
ago. remember() every message, recall() before
replying. Telegram, Discord, Slack — three lines each.
A coding agent with cross-session memory
Decisions, conventions, “we already tried that”. One
.mem file next to the repo, versionable and greppable.
A local-first app with semantic search
Electron or Tauri note-taking, mail, research tools: recall by meaning without shipping your users' data to a server.
Assistants under compliance
Legal, health, finance. Memory that provably never leaves the device: IndexedDB storage plus local embeddings, auditable in the Network tab.
A home-automation brain on a Raspberry Pi
“Boiler serviced in March, technician was Rossi.” Nobody wants to run Postgres on a Pi.
NPCs that hold a grudge
Game characters that remember the player across saves — in-process, inside the game loop, zero infrastructure.