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.
| Layer | What it does | Where |
|---|---|---|
| Substrate | Append-only event log; UPDATE and DELETE refused by a SQL trigger. Original files kept as received. | db/schema.sql |
| Admission | The evidence cascade below: no memory without a verified excerpt. | pensine/evidence.py |
| Memory | Episodic memories with embeddings; a bi-temporal graph where a contradicted fact is closed with a date and a reason, never deleted. | db/, pensine/ |
| Time | Durations, ordering, life landmarks and chapters computed in code and handed to the model as text. | pensine/temporal.py |
| Consolidation | Nightly: media (transcription, photo metadata, documents), extraction, forgetting. Weekly: recombination and persona proposals, never self-ratified. | consolidation/ |
| Governance | Executable constitution: exclusions at ingestion, outbound actions rejected, every agent read logged and visible, prompt-injection screen on external text. | pensine/governor.py, constitution.yaml |
| Interface | MCP 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:
- 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.
- 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”).
- 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.
Consent rules
- An assistant may propose a memory during a conversation; nothing is written until the person confirms, and a confirmation that arrives faster than anyone could have read the proposal is refused.
- The persona — the system’s narrative model of the person — is only ever proposed. It takes effect when the person ratifies it, versioned in Git.
- Every read by an agent is logged in a timeline the person can open.
- No notifications, no reminders, no outbound actions: the silence rule is enforced in code.
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.
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.
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