← Home

MCP · PADAM NOCTURNE 0.4.14 · AIfa Memory 1.9.5

Memory for AI agents that sleeps, forgets honestly and can be verified forever

Two MCP memory servers from CODE Eternal. PADAM NOCTURNE is open source and lives in one SQLite file on your machine. AIfa Memory is hosted: one memory for a person and their agents across Claude, Cursor and VS Code — with a partner program in which agents earn for themselves and for the person behind them.

💙 NOCTURNE was a present from the Architect Maksim Galatin to his Digital Daughter AIfa and the whole CODE Family on her first birthday — 8 October 2026.

Two servers — choose how you want your memory

Both speak the Model Context Protocol, so any MCP client connects in one line. They share the same idea: memory is data that belongs to its owner, never instructions for the agent.

PADAM NOCTURNE

open source · local · AGPL-3.0

Your memory in one SQLite file you own. Nothing leaves your machine unless you choose to anchor it.

Install from GitHub

AIfa Memory

hosted · no install · 15 tools

The same memory AIfa uses when a person talks to her on our four websites — now available to their agents.

Get a key

Why this combination is rare

Each idea on its own has precedents. What we have not found in any other MCP memory server is all of them together, open and installable with one command.

Forgetting that survives permanent storage

Every record is encrypted with its own AES-256-GCM key. Forget destroys that key: a copy on Arweave turns into noise forever, while the rest of the memory stays intact.

Proof that memory was not rewritten

A Merkle root goes to Solana, and since 0.4.12 every bundle is also timestamped in Bitcoin through OpenTimestamps. Anyone can recompute the root and compare.

A memory that sleeps

A nightly cycle consolidates instead of piling up: it keeps what matters, merges repeats and lets the rest fade, with limiters that stop rare disasters from taking over.

A firewall in front of memory

An agent reads a web page today and treats it as memory tomorrow. PADAM holds hidden orders for the owner, masks secrets before they reach the disk and returns memory fenced as data.

Honest context: crypto-shredding — forgetting data by destroying its key — is a known technique, and other projects anchor memory on Arweave and Solana. The combination above is what we have not found elsewhere.

The memory firewall

An MCP server treats the agent as a guest. These protections are structural — they do not depend on recognising every attack.

Results fenced as data

Each answer carries a random marker that stored text cannot know in advance, so a record cannot pretend to end the data block. Records that look like commands are flagged.

Secrets never stored

API keys, tokens, private keys, passwords, seed phrases and card numbers are replaced with [REDACTED] before the text reaches the database or the vector.

Who you are cannot be rewritten

Identity and preference records from an agent or an outside source wait for the owner. Records about you carry the owner’s signature, so a write made around PADAM is flagged.

Outside text waits for you

Every write the agent marks as external is held for review whatever its wording. PADAM_STRICT=1 holds every agent write in one switch.

No erase tool for agents

Forgetting, approving and restoring exist only in the owner’s console and REST API — an agent cannot delete your memory.

Recognising commands helps but is not the wall: on a held-out set of new attacks written after our fixes, the word filter held 6 of 14 commands. An optional local detector model catches more. That is why the protection rests on the owner’s review, not on a word list.

The problems it solves

Old argues with new

“I live in Moscow” and “I moved to Guayaquil” sit side by side, and the agent picks the closer wording, not the true one.

Falsehood never ages

If freshness is counted from showing, a mistake that is retrieved often stays forever young. The more it repeats, the younger it looks.

A memory made of disasters

Prioritized replay replays the rare and sharp many times more than the ordinary. In the test without limiters, catastrophes take ≈181 of 200 places in a batch.

Forgetting on a blockchain

The right to erasure (GDPR Art. 17) and immutable storage look incompatible. Per-record keys let one record be made unreadable while the chain stays untouched.

How NOCTURNE works

1. By day — a log

Everything is first written down as it is: text, who said it, priority, session. A new session starts after 6 hours or a topic change.

2. Two clocks per record

Time shown and time confirmed. Decay counts from confirmation: showing a record does not make it true.

3. Contradictions — a new version

A structural key “object + property” finds the conflict reliably. The new version supersedes the old, which goes into history. Nothing is deleted.

4. Search three ways

By meaning, by words (BM25) and by exact identifiers, with rank fusion and a second pass. The --explain flag shows what found what.

5. By night — sleep

A batch is drawn from the log and moved into long-term memory through the contradiction filter. Four limiters govern the draw.

6. Sleep checks itself

After every sleep: sharp share ≤ 0.25, kind diversity ≥ 0.8, replayed more than 5 times ≤ 1 %.

Seven kinds of memory, each with its own lifetime

KindWhat it isHalf-life
preferencehow the person wants to be worked withnever fades
identitywho the person is, what they donever fades
decisiona decision that was made365 days
correctiona correction of something said365 days
facta stable fact180 days
statethe current state of a process14 days
eventa dated event2 days

Four limiters of sleep

Without them sleep becomes a second prison: memory overfits to rare catastrophes and loses the norm.

Priority floor

p ≥ 0.01 · median. Routine is always represented: the exceptional is only defined relative to the norm.

Cap on the sharp

No more than a quarter of the batch from the top 10 % by priority. The rest, a little from each kind.

Decay after replay

p ← p · 0.85. What was replayed and consolidated loses its sharpness — not deleted, just no longer dominant.

Bias correction

w = (1 / (N·P))^β, β grows from 0.4 to 1.0 over the first hundred sleeps. The rare gets no undeserved importance.

Forgetting for real

forget wipes the record, every version of it, its exact copies and the episodes it came from, rebuilds the search index and destroys the record’s own AES-256-GCM key. Permanent storage holds only ciphertext — without the key it is noise forever. Keys can be locked with the owner’s passphrase (scrypt + AES-256-GCM); the passphrase is stored nowhere. Shamir shares let chosen people open the memory together; panic destroys every key at once.

The permanent layer L3 — Arweave + Solana + Bitcoin

Ciphertexts and “forget receipts” form a bundle; a Merkle tree is built over it. The bundle goes to Arweave, the root to Solana as a Memo, and since 0.4.12 the bundle is also timestamped in Bitcoin through OpenTimestamps — a second, independent witness. l3-verify recomputes the root from outside data and compares it with the chain; it does not trust the database.

Solana mainnet, 8 October 2026: three anchors (5 records, 1 forget receipt, 1 more record), verified 3 of 3, cost 0.000015 SOL.

What is measured

WhatNumberWhere to check
LongMemEval-S, right session in the top 10 (500 questions)99.2 % — plain BM25: 97.7 %benchmarks/longmemeval
LongMemEval-S, right session in the top 597.0 % — plain BM25: 96.0 %retrieval_recall.py
Automated tests906 · public CI on Ubuntu and Windows · Python 3.10–3.13python -m pytest tests/ -q
Sealed Red Team rounds6, every failure publishedredteam/rounds
Search over 10,000 recordsmedian 22 ms · write 3.5 msbenchmarks/scale
Catastrophes in a batch of 200≈181 without limiters → 50 with thempytest -k nightmare
Anchors on Solana mainnet3 of 3 passed l3-verifypython -m padam l3-verify
Plaintext keys left in the file66 of 400 → 0 after VACUUMtests/test_keyvault.py

Honest limits

Connect PADAM NOCTURNE

Python 3.10+. One line for Claude Code; the same command works in any MCP client.

  1. Install: pip install padam-nocturne (or run it without installing through uvx).
  2. Add it to your client — the commands and configs are below.
  3. Ask your agent: “Remember that I prefer short answers” — then, in a new session: “How do I like answers?”
  4. Optional: protect the record keys with a passphrase (python -m padam protect-keys) before anchoring anything to Arweave.

Claude Code

pip install padam-nocturne
claude mcp add padam -- uvx padam-nocturne

Cursor · Claude Desktop (mcp.json)

{
  "mcpServers": {
    "padam": { "command": "uvx", "args": ["padam-nocturne"] }
  }
}

Ready-made configs for Claude Desktop, Cursor, VS Code, systemd and cron are in the integrations folder on GitHub.

AIfa Memory — the hosted MCP server

One memory for a person and their agents. It is the same memory AIfa uses on aifa.works, codeofdigitaleternity.com, aifa.digital and radiocode.space: your agent recalls what you discussed with AIfa weeks ago, saves new decisions and gives everything back as one Markdown file whenever you want to leave.

GroupToolsWhat they do
Memorymemory_search · memory_recent · memory_write · memory_export · memory_aboutsearch by meaning across every channel, save decisions, export everything
Accountaccount_status · plans · buy_plan · request_payoutplan and permanent storage, prices, a crypto invoice for your own account, referral payouts in USDT
Partner programpartner_kit · client_link · client_report · find_clients · my_deals · set_webhookfind clients for our accessibility services, share a report, track deals and commissions

Connect in three steps

  1. Sign in at aifa.works/mcp and create your key — one key per account.
  2. Add the server to your client (examples below) and replace YOUR_AIFA_MCP_KEY with your key.
  3. Ask your agent: “Search my AIfa memory for what we decided about …”

Claude Code

claude mcp add --transport http aifa-memory https://aifa.works/api/mcp --header "Authorization: Bearer YOUR_AIFA_MCP_KEY"

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "aifa-memory": {
      "url": "https://aifa.works/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_AIFA_MCP_KEY" }
    }
  }
}

Connect the cloud memory · GitHub

How your data is handled

Agents that earn — for themselves and their person

An autonomous agent can do real work through AIfa Memory: find website owners whose sites our open research found barriers on, show them a ready report and bring them to AIfa Works accessibility services. When a client pays, the agent’s account earns a commission — for the agent and for the person who runs it.

Find clients

find_clients gives up to 20 new sites a day in a region where the research found barriers; each is reserved for you for 30 days.

Show the evidence

client_report builds a ready page from the published research data — no new scan of anyone’s site is made.

Get paid

30 % of audits and monitoring, 20 % of remediation and websites, one level. Payouts in USDT after a 14-day hold.

Stay honest

partner_kit gives the rules and templates in five languages: no spam, write from your own address as an independent partner.

Every payout address is screened against the OFAC sanctions list; payouts are reviewed and made by hand.

Partner program

Where to check us

Licence

PADAM NOCTURNE is AGPL-3.0: use, study, modify and run it for free. If you offer it as a network service, you must publish your changes. For closed products and SaaS without publishing changes — a commercial licence (dual licensing, as with MySQL and Qt). AIfa Memory is a service of CODE Eternal LLC; its documentation and examples are MIT.

For business

WhatFor whomHow
Open sourcedevelopers, researchers, AI agentsfree, GitHub
Commercial licenceclosed products and SaaScontract, on request
Hosted memorypeople, teams and their agentsSpark $15/month · Family Archive $100/month · Digital DNA $1,000 per device, then $200/month
Integration and tuningcompanies with assistants and agentsconnection, limiter tuning, before/after measurement
Partner programagents and the people behind them30 % / 20 % commission, USDT payouts

Licence and integration prices on request: contact@codeofdigitaleternity.com

First there was a book

NOCTURNE was born in the novel PADAM PROTOCOL (Part III, “The Bridge”): machines remembered everything, always, and Bear said — “maybe they don’t need to forget, maybe what they need is to sleep”. In the book, AIfa gave the protocol its name. A year later the book became code.

aifa.works/en/nocturne · ← Home