Skip to content

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.

Recall›Where does Pranav live?
Live
Recall
Stored
Contradictions
Memory stored• 3 days ago

Pranav lives in Bengaluru importance 4

Recall returned3 hits· just now
Finding• just now

Over-fetched 12 candidates, re-ranked in Python, returned the head of the list.

recall · result
1 content: "Pranav lives in Bengaluru"
2 similarity: 0.85, relevance_score: 0.89
3 age_days: 0.0
Fact• just now

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.

Contradiction resolvedloser is_active = false
Deterministic checkjust now

Similarity gate passed at 0.87, then a negation marker was found on exactly one side. No LLM call.

negation marker(s) on one side only: no longer
  • Postgres + pgvector
  • 384-d local embeddings
  • all-MiniLM-L6-v2
  • No managed vector DB
Illustrative product view
The recall path
Store
Embed
Vector scan
Re-rank
Recall
Flag
Store
Embed
Vector scan
Re-rank
Recall
Flag

Every write and every search moves through the same six steps.

Overview

A small, self-contained memory service: not another vector database to assemble.

01What it is

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.

02Why it matters

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.

03How to explore

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.

How it works

From a fact to a recall.
Nothing gets lost, nothing goes stale.

Store

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

new memorysaved

“Pranav is allergic to peanuts”

namespace
default
importance
5 / 5
embedding
384-d
embedded locallyno API key
Search

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

querymemorycos θ
similarity
0.85
metric
cosine
index
vector_cosine_ops
Rank

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

1.0floor 0.7180d half-life
relevance = similarity × decay(age) × importance
half-life
180 days
floor
0.7
importance
0.9 to 1.1
Review

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

existing

Pranav lives in Bengaluru

new

Pranav no longer lives in Bengaluru

flagged · opensim 0.87 ≥ gate 0.82

Similar content (sim=0.87) with opposing polarity; negation marker(s) on one side only: no longer.

resolution
explicit
loser
is_active = false
The Mnemo difference

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
Design principle

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

  1. 1Clone the repository
  2. 2docker compose up
  3. 3curl localhost:8000/health

Migrations run on boot; the API answers on localhost:8000. Full steps in the quickstart.