Memnest
Start here

What Memnest is

Atomic facts, resolved against what is already known, with the history kept and a trace for every answer.

Memnest is a self-hostable memory engine for AI agents. A vector store returns text that resembles a question. Memnest extracts atomic facts, decides how each new fact relates to what is already known, keeps every version, and shows you why it answered the way it did.

The problem it solves

Facts change. Somebody moves, a service is migrated, a preference reverses. Stored as plain text, the old and new versions look equally relevant, so an agent gets both and picks one, often the wrong one. Memnest resolves each new fact against the ones it already holds:

new

Nothing similar is stored. Written as is, without a model call.

duplicate

Already known. The existing memory is reinforced and gains a source.

updates

Replaces a fact. The new version is served; the old one is kept as history.

extends

Adds detail. Linked with an edge; both stay current.

Only current facts are served. Superseded ones stay in the nest, visible and traceable, just off the live path.

Two paths

Write path · add() returns after step 2; the rest runs in a job
  1. add()chat turns, markdown or text
  2. redact + chunksecrets stripped, chunks indexed
  3. extractone model call per quiet session
  4. screendrop pronouns, secrets, low confidence
  5. resolvenew · duplicate · updates · extends
  6. writeone transaction, with provenance
Read path · search()
  1. query+ scope + token budget
  2. lexical ∥ vectorrun in parallel
  3. RRF fusek = 60
  4. filterlatest, not forgotten, not expired
  5. rerankoptional, LLM
  6. packmemories, then chunks, to budget

The live preview runs both paths in your browser, on the real engine.

Three ways to use it

What it needs

  • Nothing, to start. SQLite and keyword search work with no model and no database server.
  • A completion model to extract facts from raw conversations and resolve them: Ollama, or any OpenAI-compatible endpoint.
  • An embedding model, and Postgres + pgvector for semantic recall. Without them search still runs on keywords, and the trace says so.

See Models and providers.