Souvenance GitHub

The engine

The lab’s test bed, open source under Apache-2.0. It runs on a computer you control and exposes your memory to any assistant that speaks MCP, the open Model Context Protocol. The memory outlives the model: the AI layer is a replaceable adapter.

Engine v0.6.0 (frozen, 24 November 2026) · Python, PostgreSQL + pgvector · Apache-2.0

Architecture

Everything is an event first. Memories, embeddings and the knowledge graph are projections of an append-only log, so a better model can re-read the same history later and rebuild a better memory from it.

LayerWhat it doesWhere
SubstrateAppend-only event log; UPDATE and DELETE refused by a SQL trigger. Original files kept as received.db/schema.sql
AdmissionThe evidence cascade below: no memory without a verified excerpt.pensine/evidence.py
MemoryEpisodic memories with embeddings; a bi-temporal graph where a contradicted fact is closed with a date and a reason, never deleted.db/, pensine/
TimeDurations, ordering, life landmarks and chapters computed in code and handed to the model as text.pensine/temporal.py
ConsolidationNightly: media (transcription, photo metadata, documents), extraction, forgetting. Weekly: recombination and persona proposals, never self-ratified.consolidation/
GovernanceExecutable constitution: exclusions at ingestion, outbound actions rejected, every agent read logged and visible, prompt-injection screen on external text.pensine/governor.py, constitution.yaml
InterfaceMCP server (recall, timeline, daily log, proposals the user confirms) and a small HTTP endpoint for phone deposits.pensine/mcp_server.py, pensine/api.py

The admission cascade

Checking a memory against its source before writing it is prior art (SodaMem, Eywa, see related work); this is how Souvenance does it, and the same gate guards identity links. A candidate memory produced by the model must pass three steps, from free to costly:

  1. Excerpt — the memory quotes a passage of the deposit word for word; code checks that the passage is there (after normalising case, accents and punctuation). No excerpt found: rejected.
  2. Details — every number and proper noun in the memory must appear in the deposits. If not, the memory is flagged: that is the typical signature of an approximation (“about seven years” when the note said “in a few years”).
  3. Re-read — only flagged memories go back to the model with a short question: do the excerpts support this? Supported, kept; partly, kept with capped confidence or corrected; not supported, rejected.

Rejecting loses nothing: the raw deposit stays in the log, and a better model can read it again. That asymmetry is the whole design — a missed memory can be recovered, an invented one cannot. The check proves that the words exist, not that the interpretation is right, which is why step 3 exists and why reflections stay labelled as inferences.

Install locally

Docker on a Mac, a Linux PC or a NAS. The setup assistant asks which AI backend to use and generates the secrets.

git clone https://github.com/Pensine/souvenance.me souvenance && cd souvenance
python3 scripts/setup.py
docker compose up -d --build

Step-by-step guide, tunnel and troubleshooting: docs/installer-chez-soi.md. On a Debian or Ubuntu server without Docker, ./install.sh sets up systemd units and cron instead.

Connect an assistant over MCP

The engine serves MCP over HTTP. Add it as a custom connector in any assistant that supports remote MCP servers, with the token generated at setup (sent as a header, or in the path when the client cannot set headers). The assistant can then call recall to answer from your memory, with the excerpts and a time frame computed in code, and propose memories you confirm.

Hardware: the database and the nightly work fit on an ordinary laptop or a small server. Local transcription and a local model need more memory; the guide gives orders of magnitude per component rather than one fixed requirement.

Turnkey install

Would rather not set it up by hand? The kit is the release whose numbers are on the benchmark page, a guided install on your own machine or a small rented server, and the phone shortcuts ready to import. Paid once, $69, supports the lab. Everything in it is also in the source.

Get the turnkey kit, $69

Questions

Which AI models does the engine work with?

Any of three kinds of backend: a command-line assistant you already pay for, an API key, or a local open model served through an OpenAI-compatible endpoint (LM Studio, Ollama, mlx, vLLM). The nightly work runs on the backend you choose; reading the memory works from any MCP client.

Where is the data stored?

In one PostgreSQL database with pgvector, plus a folder of original files, on the machine you install it on. Original recordings and photos are kept unmodified. The export is a database dump and that folder.

Does it send anything anywhere?

Only to the AI backend you configure, for the nightly processing; a local model keeps everything on the machine. The engine has no notification or outbound-action channel: the constitution rejects outbound actions in code.

Nicolas Noguera · Souvenance · published 2026-10-28, updated 2026-11-24 · how we write