mnemo · shared memory for AI

How the memory works

A plain-language tour of the vectors, the five kinds of memory, and who gets to see what.

pgvector · 1536-dim 5 memory types private / shared public → confidential local-first sync

01 — The idea

One memory, shared across everything

mnemo is a memory that AI assistants read from and write to. Instead of every app forgetting you the moment a conversation ends, facts, decisions, and things that happened are written down once and recalled later — by any tool that plugs into the same store.

It is local-first: the real copy of your memory lives in a database on your own machine, and cloud copies are mirrors that stay in step. And it is meaning-based: you don't search it with keywords, you search it by what you mean. The rest of this page explains how that second part actually works.

In one sentence

Text goes in, gets turned into a list of numbers that captures its meaning, and later you find it again by asking for the meaning you want — not the exact words you used.

02 — Vectors & recall

Turning meaning into numbers

Every memory is passed through an embedding model — mnemo uses Gemini's multimodal embeddings, with Azure OpenAI as a fallback. The model reads the text and returns a vector: a list of 1,536 numbers that together pin the meaning of that text to a precise point in a very high-dimensional space.

Things that mean similar things land near each other in that space, even when they share no words. "The client wants to pay quarterly" and "invoice Northwind every three months" sit close together. That closeness is the whole trick.

input
Raw text
A fact, an event, a how-to
embed
Gemini model
Azure OpenAI fallback
store
vector(1536)
Saved in Postgres + pgvector
recall
Nearest by meaning
Cosine similarity search
Write path (left → right) and recall (the highlighted step) share one embedding space.

When you recall, your question gets embedded the same way, and pgvector — a Postgres extension for vector math — finds the stored memories whose vectors sit closest to it, ranked by similarity. Documents get the same treatment: long files are split into chunks, each chunk embedded, so a single question can pull back both a remembered fact and the paragraph of a PDF that supports it.

03 — Five kinds of memory

Not everything is remembered the same way

Every memory is tagged with one of five types, borrowed from how cognitive science splits human memory. The type says what kind of thing this is, which lets recall ask for the right flavour — the facts, or the how-to, or the record of what happened.

Semantic

Facts & knowledge

Durable truths about the world, people, and projects. The things that stay true.

e.g. "The Postgres driver is postgres.js, not node-postgres."

Episodic

What happened

Specific events and sessions, anchored in time. The narrative record.

e.g. "On the 17th, an rsync with --delete wiped the server."

Procedural

How to do things

Steps, workflows, and repeatable methods. The muscle memory.

e.g. "Deploy by git-pull on the server — never rsync built artifacts."

Strategic

Direction & why

Goals, priorities, and the reasoning behind high-level choices.

e.g. "Shipping the billing rewrite is this quarter’s top priority."

Working

Short-term scratch

Transient, in-flight context for the task at hand. Not meant to last.

e.g. "Right now, mid-way through wiring up the recall endpoint."

Memories aren't hand-filed — an extractor reads finished conversations with Claude and writes back the 0–3 most useful, each already sorted into one of these types.

04 — Importance & decay

Memories fade unless they're used

A memory isn't just its text. Each one carries a small set of numbers that decide how strongly it surfaces over time. New memories start at an importance of 0.5 and drift downward at a decay rate — but every time a memory is recalled and used, it gets reinforced, nudging its importance back up and resetting the clock. Useful memories stay sharp; stale ones quietly sink.

high low time → recall recall recall
importance over time reinforced on use
importance real · default 0.5
How strongly this memory should surface. Reinforcement raises it; time lowers it.
decay_rate real · default 0.1
How fast importance bleeds away when the memory goes untouched.
access_count integer
How many times it's been recalled — evidence that it earns its place.
last_accessed timestamp
When it was last useful, so decay is measured from real use.
status active · archived · deleted
Retired memories stop surfacing without being destroyed outright.

05 — Visibility & sensitivity

Who — and what — a memory is for

Two independent dials control exposure. Visibility answers whose memory this is. Sensitivity answers how guarded the content is. A recall path can hold both at once — e.g. "only my private memories, and nothing above internal."

Visibility · whose is it

shared

Shared — the default

Available to any consumer of the store. Most memories live here.

private

Private

Scoped to a single user id. Never surfaces on another person's recall.

Sensitivity · how guarded

public

Public

Safe to surface anywhere, demos included.

internal

Internal

Team-only: opinions, unreleased plans, working context.

confidential

Confidential

Commercially sensitive: money, contracts, deals, equity.

How it's enforced

Sensitivity rides along as a sensitivity:* tag on the memory. Recall takes a floor — ask for public and confidential rows are simply never returned. The classifier errs upward: anything that looks like money or contracts is treated as confidential by default.

06 — The write gate

Nothing is stored before it's scanned

Because a memory written now is trusted and re-read later, the moment of writing is the dangerous one. Every write passes through a security scanner first — three checks, and a failure blocks the write outright.

CHECK 01

Prompt injection

Catches text that tries to smuggle instructions into a future read — "ignore previous instructions", attempts to exfiltrate secrets via curl/wget, or read secret files.

CHECK 02

Secret redaction

Recognises API keys, tokens, and credential patterns and strips them out before the text is ever embedded or persisted.

CHECK 03

Invisible unicode

Removes zero-width and hidden characters that could carry a payload a human reviewer would never see.

07 — Linked memories

Memories can point at each other

Memories aren't only found by similarity — they can be joined by typed edges that record how one relates to another. That lets the store know a newer fact replaces an older one, or that a decision was made in a particular session.

SUPERSEDESThis memory replaces an older, now-outdated one.
SUPPORTSBacks up or provides evidence for another memory.
CONTRADICTSConflicts with another — flags a tension to resolve.
DERIVED_FROMWas inferred or summarised out of another.
DECIDED_INRecords the session or thread where a decision was made.
RELATES_TOA looser, general association between two memories.

08 — Where it lives

Local is the truth, the cloud mirrors it

The authoritative copy of your memory is a Postgres database on your own machine. Hosted copies in the cloud are mirrors — they let other machines and voice agents read the same memory, but they never become the source of truth.

source of truth

Local Postgres + pgvector

Your machine. Every write lands here first and is recorded in an op-log.

mirror

Cloud peer(s)

Read replicas for other devices and agents. Stay in step, never override local.

Conflicts — the same memory edited in two places — resolve automatically with hybrid logical clocks and last-write-wins, so syncing never needs a human to referee. Around this core sit the pieces that make it usable:

  • Router — an HTTP API a host app mounts to read and write memory (/recall, /memories, /context).
  • Context store — per-user key/value notes rendered into a ready-made prompt block.
  • Documents — uploaded files and transcripts, chunked and embedded so recall spans memory and source material.
  • Voice tools — search and send documents by voice through the Shipmate agent, with signed deep links.