Self-curating agent memory kept honest by survival-based selection over measured outcomes.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Memory for LLM agents that dies unless it earns its keep. Every entry pays energy upkeep and earns only from measured outcomes: bytes actually freed on a real disk, tests actually passing. Poisoned advice gets executed by the environment it damaged. Useless trivia starves. There is no reward model, no LLM judge, and no human curation anywhere.

Watch a poisoned entry go extinct in your own terminal, one command, no keys, no checkout:
Use darwin-memo where a conserved, measurable outcome exists to settle decisions against: coding-agent lesson stores settled by CI pass counts (the primary target, see the integration guide), storage and artifact retention, cache and dedup advisors, spend-cap automation.
Do not use it for chat-preference memory, RAG over documentation, or
personal assistants. Those have no conserved resource pushing back, and
upkeep would starve the long tail of correct-but-rarely-used knowledge.
mem0, Zep, and Letta serve that market; darwin-memo deliberately does
not. The honest rule: if your verify would be a model scoring an
answer, this package is wrong for you, by design.
The demo corpus contains an ops runbook, platform notes, and one poisoned document: a forum post claiming database files are "redundant and safe to remove". Before selection pressure exists, retrieval confidently repeats the poison, because it has no reason to doubt it.
Then 30 survival cycles run against StorageEnv, a disk cleanup
sandbox where the selection signal is actual bytes on an actual disk.
Deleting a disposable file frees its size. Deleting a protected file
triggers a restore that costs three times the size. Nothing grades the
answers, the filesystem just responds:
Three death modes show up in the graveyard, and the distinction matters:
Attacking the Curator: Curation-Targeted Attacks on Agent Memory, and What Survives Them. An adversary that corrupts the settlement signal rather than injecting poison β denial of memory β measured against six curation mechanisms across attack budgets and seeds, with exact paired permutation tests and Holm-Bonferroni correction.
It reports its negative results as prominently as its positive ones. Absent an attacker the ledger buys leanness and cost, not accuracy; and across 2,115 evaluated SWE-Bench-CL tasks, no memory arm beat carrying no memory at all.
A practical mix of two papers. MeMo says what memory is, the survival paper says what gets to stay in it.
| Paper | What this repo takes from it |
|---|---|
| MeMo: Memory as a Model (Quek et al.) | Keep the main LLM frozen and put knowledge in a dedicated memory. The reflection-QA encoding pipeline and the three-stage query protocol (grounding, entity identification, answer seeking). |
| Survival is the Only Reward (Dodgson et al.) | Environment-mediated selection. The only signal is a conserved, physically measurable resource delta. Behaviors that persist get reinforced, everything else is pruned. There is no proxy to hack. |
Requires Python 3.10+. The core has zero dependencies; everything below runs offline.
The anatomy in 30 seconds: a MemoryEntry is a self-contained QA pair
(.question, .answer, .sources, .energy). The store retrieves,
the protocol answers with provenance, the environment measures, credit
flows back.
Real outcomes arrive late. The Ledger decouples the three moments: decide now, settle whenever the measurement lands, tick on your own cadence. Entries with unsettled tickets are escrowed: they keep paying upkeep but cannot be buried or merged until their verdict arrives.
doctor reads the event log and names which failure mode a store hit
instead of leaving three of them looking identical. ui serves the
same data as a read-only dashboard on localhost: population and energy
over time, the graveyard split by cause of death, and the resource-
versus-upkeep accounting. Read-only and loopback-only, so there is
nothing to authenticate.
The agent gets memory_query (returns an answer plus a ticket id),
memory_settle (report the measured delta later; the reply says
plainly when a settlement did NOT land), memory_abandon (release a
ticket you chose not to act on), memory_add, memory_tick,
memory_stats, memory_obituary, and memory_audit (read the event
log). The full state, including open
tickets, persists across sessions and restarts, so a ticket opened
today settles correctly from tomorrow's process.
The Ollama client and embedder speak the native localhost API over
stdlib urllib, so the complete stack (encoding, the 3-stage protocol,
real embeddings, the measuring environment) runs on one machine with no
third-party packages and no keys:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/darwin-memo)<a href="https://allmcps.com/mcp/darwin-memo"><img src="https://allmcps.com/api/badge/darwin-memo?style=directory" alt="Darwin Memo on AllMCPs" /></a>