Memory that evolves, versions, and stays traceable.
Memorie is a reusable memory infrastructure layer for AI systems and software — not a chatbot, not a vector-database wrapper. A canonical store stays authoritative while search, vector, graph, and cache stay optional, rebuildable projections of it.
“Prefers TypeScript.”
“Prefers TypeScript for application development.”
“Prefers TypeScript; strict mode required on new services.”
Five lines to a memory that remembers its own history
One engine. Every backend.
Start in memory for tests, move to SQLite for local-first apps, or run PostgreSQL + Redis in production — the same MemoryEngine API works unchanged.
import { createMemoryEngine } from "@memorie/core";
import { InMemoryStore, InMemoryVersionStore } from "@memorie/storage-memory";
const memory = createMemoryEngine({
memoryStore: new InMemoryStore(),
versionStore: new InMemoryVersionStore(),
});
const m1 = await memory.add({
namespace: "users",
subjectId: "user_123",
type: "preference",
content: "Prefers TypeScript.",
});
await memory.evolve(m1.id, {
content: "Prefers TypeScript for application development.",
});
const history = await memory.history(m1.id);
const asOf = await memory.getAt(m1.id, new Date("2026-04-01"));Why Memorie exists
The vector store isn't the source of truth. It never was.
Most “AI memory” libraries collapse everything into one pipeline — text, then an embedding, then a vector database, then similarity search — and quietly make that vector database the source of truth. It works for recall. It can't answer “what did we believe last week?”, “where did this claim come from?”, or let you switch vector providers without losing history.
Memorie inverts it. A canonical MemoryStore is always authoritative. Everything else — vector, search, graph, cache — is a projection: derived, optional, and rebuildable from canonical data at any time.
Solid = source of truth. Dashed = rebuildable from it at any time.
The model
Four ideas the rest is built on
Identity vs. state vs. version
A stable id persists across an evolving content and state, while every change is preserved as an immutable MemoryVersion — nothing is ever overwritten.
Explicit lifecycle
Memories move through active → updated → archived / expired / superseded / merged → deleted. Invalid transitions throw InvalidStateTransitionError rather than silently succeeding.
Namespaces & subjects, not users & chats
Nothing in the core model assumes a chatbot. subjectId can be a user, a project, a device, a document — whatever your application needs it to mean.
Graceful degradation
With zero optional adapters configured, search() still works — structured filters plus a keyword score. Add a SearchStore or VectorStore later and relevance improves without changing the call site.
What's built
Infrastructure, not a framework
Every piece below composes independently. Configure only what your application needs — the engine degrades gracefully without any of it.
Canonical store + projections
A single authoritative MemoryStore. Vector, search, graph, and cache stores are optional, rebuildable projections — never a source of truth.
Read more →Evolution & versioning
Identity stays stable while content evolves. Every change is preserved as an immutable version — nothing is ever overwritten.
Read more →Hybrid search
Structured filters, keyword relevance, semantic similarity, and relationship signals — combined and ranked in one search() call.
Read more →Memory graph
Typed, directed relationships between memories — supports, contradicts, supersedes, or your own — with multi-hop traversal.
Read more →Security by default
Tenant isolation, authorization hooks, redaction, and transparent AES-256-GCM encryption-at-rest via a MemoryStore decorator.
Read more →Observability
Provider-independent Logger, MetricsProvider, and Tracer hooks — plug in whatever you already run in production.
Read more →No fake implementations
Every adapter runs against a real backend
Each adapter is verified against the shared contract-test suite and a live instance of what it wraps — a real local PostgreSQL, a real local Redis — not an in-memory mock standing in for one.
Memorie is memory infrastructure.