Give your AI agents a
memory that lasts.
Mnemo stores what an agent learns and hands back the context that still matters. Fresh facts rise, stale ones fade, and conflicts are flagged instead of silently overwritten.
Where does Pranav live?
Embedded locally, matched against 3 memories in the default namespace, then re-ranked by relevance.
Pranav lives in Bengaluru importance 4
Over-fetched 12 candidates, re-ranked in Python, returned the head of the list.
Decay is floored at 0.7, so the recency penalty is capped at 30%, so an old memory can never bury a clearly better match.
Similarity gate passed at 0.87, then a negation marker was found on exactly one side. No LLM call.
- Postgres + pgvector
- 384-d local embeddings
- all-MiniLM-L6-v2
- No managed vector DB
Every write and every search moves through the same six steps.
A small, self-contained memory service: not another vector database to assemble.
A memory service for agents
Mnemo is a small HTTP service that stores facts an AI agent learns and hands them back later. It is not a chatbot and not a vector database you have to assemble. It is one FastAPI app over Postgres + pgvector with an API you can call in three lines of curl.
Context windows forget
An agent that only sees the current conversation re-learns the same things forever, and a naïve memory store has the opposite problem: it answers with whatever is nearest, even if that fact is stale or contradicts a newer one. Mnemo ranks by relevance (similarity × decay × importance) and flags conflicts instead of silently overwriting them.
Read, run, or poke it
Try the interactive playground to see a store and a recall, read the developer guide for the exact API, or run the whole stack locally with docker compose up.
From a fact to a recall.
Nothing gets lost, nothing goes stale.
Store what the agent learns.
A fact goes in with a namespace and an optional importance. Mnemo embeds it in-process with all-MiniLM-L6-v2 and writes the 384-dimensional vector straight into Postgres. No embedding API key, no second store to keep in sync.
a sentence in → an embedded, addressable memory out
“Pranav is allergic to peanuts”
Recall by meaning, not keywords.
A question like “Where does Pranav live?” still lands on “Pranav lives in Bengaluru”, matched on meaning, not a substring. Vectors are L2-normalised so a dot product equals cosine similarity, matching pgvector's vector_cosine_ops index. Every query is filtered by namespace.
a question in → the nearest memories out
Fresh facts win ties. They never hijack relevance.
Ranking is similarity × decay × importance, not raw vector distance. Decay is exponential with a 180-day half-life, floored at 0.7, and importance stays in a deliberately narrow 0.9 to 1.1 band, so recency reorders comparably-relevant memories without overriding a clearly better match.
candidates in → the most relevant memory out
Conflicts are flagged, never silently overwritten.
Detection is deterministic and two-stage: a cosine gate at 0.82 establishes that two memories are about the same thing, then a negation-marker check looks for a polarity flip on exactly one side. No LLM call. Resolution names a winner, and the loser is soft-deleted so the audit trail survives.
a conflicting write in → a flag for human review out
Pranav lives in Bengaluru
Pranav no longer lives in Bengaluru
Similar content (sim=0.87) with opposing polarity; negation marker(s) on one side only: no longer.
Other memory layers remember everything.
Mnemo decides what still matters.
Dropping every conversation chunk into a vector store is easy. The hard part is ranking, decaying and refusing to silently overwrite, so an agent's own history never becomes its worst input.
Other memory layers
- ✗Nearest-neighbour search by raw vector distance
- ✗Stale facts outrank fresh ones
- ✗Conflicting writes overwrite silently
- ✗Hard deletes, no audit trail
MnemoOpen source
- ✓Ranked by similarity × decay × importance
- ✓Fresh facts win ties, bounded at 30%
- ✓Contradictions flagged, never auto-resolved
- ✓Soft-delete keeps the audit trail
Memory that forgets is memory you can trust. Mnemo ranks by relevance, not recency, and when two memories disagree, it flags the conflict instead of quietly picking a winner.
Give your agents something to remember.
One self-contained memory service: Postgres + pgvector, embeddings computed locally, and a ranking function you can read end to end.
The simplest next step
Migrations run on boot; the API answers on localhost:8000. Full steps in the quickstart.