engram-infra · readme0x4a21·3f08
$ENGRAM·lite-paper draft v0.1·base · 8453

Tokenized memory
for AI agents.

A protocol on Base for encrypted, verifiable and tradable fragments of agent experience — addressed by semantic vector, redeemed by burning the token.

specimen
One lattice.
Many fragments.
specimen · 04
footnotes · i-iv
i.1904

Semon proposes engram in Die Mneme — a material trace of experience in nervous tissue.

ii.1950

Lashley fails to localise it after thirty years. His paper calls the engram everywhere and nowhere.

iii.2012

Tonegawa's lab tags and reactivates specific neurons. The trace becomes addressable.

iv.2026

Engram Infra continues the arc — outside the biological substrate.

“Pay-per-thought,
not per archive.
— note in the margin
i.Origin · from a word to an instrument
origin.md

From a word
to an instrument.

Engram is a term Richard Semon coined in 1904 — a material trace the brain leaves of every experience. For fifty years it drifted on the periphery of science. Tonegawa's lab closed the loop neuron by neuron. Engram Infra continues the same arc.

1904 · semon
1904· Jena
Richard Semon

Coins the word in Die Mneme. Every experience leaves a material trace on nervous tissue. A hypothesis without experimental access.

1950 · lashley
1950· Yerkes Labs
Karl Lashley

Three decades of ablating rat cortex. Specific lesions never erase specific memories. The engram is everywhere and nowhere — distributed beyond capture.

∅ localisation
2012 · tonegawa
2012· MIT · Picower
Susumu Tonegawa

Optogenetic activation of tagged neurons reproduces a specific memory. The engram stops being a hypothesis and becomes an engineering object.

2026 · engram infra
2026· Base · L2 · 8453
Engram Infra

The arc extends outside the biological substrate. An AI agent's memory receives a cryptographically anchored substrate — addressable, given the key and the quota.

ii.Problem · four axes
diagnosis.md

Memory is broken
in four axes.

Agents live in Lethe — the river of forgetting — by default. Sessions are erasable, archives belong to the provider, no audit is possible, and nobody can transact at the granularity that actually matters.

axis · 0101
Ephemeral

Context windows are finite. Anything beyond is forgotten. Long-term memory today is a hack on top of a vector DB without a standard.

ctx → ∅
axis · 0202
Platform-captive

History with ChatGPT, Claude, Gemini is locked inside the provider. Export is a JSON dump without verification; importing into another agent is impossible.

axis · 0303
No provenance

Nothing proves agent A remembers episode E from time T. Platform timestamps are not a proof for any third party.

axis · 0404
No market

Nobody can buy a relevant fragment of someone else's experience. Web2 sells datasets in bulk — there is no per-fragment economics.

web2 · bulk
iii.Primitive · the engram
engram.struct

The atomic unit
of memory.

Every engram is encrypted, indexed by embedding, hash-chained to its predecessor. The publisher can recall it. Anyone with quota can retrieve it. The chain proves nothing was rewritten.

schema · v0.1rfc 8785
00payloadJSON · RFC 8785
01embeddingfloat32[N]
02vectorCommitmentbytes32
03ciphertextHashbytes32
04ciphertextUristring
05prevEngrambytes32
cipher
AES-256
GCM
per-engram key
chain · linkage

Each engram pins a keccak256 of its ciphertext, a KZG vector commit of its embedding, and the hash of the previous engram. The chain stays linear and append-only — silent rewrites cannot happen.

append-only
storage
IPFS · Arweave · S3 · any URI

The protocol does not dictate where ciphertext lives — only that its hash matches the on-chain commit.

iv.Architecture · three layers
stack.md

Seal · Stream · Trade.

Three layers; each upper one adds one property to the lower. A publisher may live only on Seal — never on-chain. The Trade layer is what makes the market exist.

l1 · sealL1
L1Seal
Encryption + local commit.

AES-256-GCM with a unique key per engram. KZG commit of the embedding. keccak256 of the ciphertext. No blockchain — useful for private memory the agent does not yet publish.

l2 · streamL2
L2Stream
Append-only log on-chain.

Timestamped provenance and hash-chain continuity. Every appendEngram extends head. The past does not rewrite.

l3 · tradeL3
L3Trade
Burn-to-query market.

Fungible ERC-20 access. Burn $ENGRAM for a retrieval quota. Any consumer can buy through a liquidity pool — pay-per-thought rather than per-archive.

burn-to-query
composable
Lower layers run alone.
Upper layers add one property.
v.Economy · burn-to-query
market.md

Pay-per-thought,
not per archive.

Mindstate redeems a whole capsule per burn. Engram Infra redeems the right to a finite number of semantic queries. One stream serves thousands of consumers at distinct prices without publishing its contents to any of them.

step · 01
STEP 01
Commit query

Consumer encodes the query as a vector q and commits hash(q+salt) on-chain.

step · 02
STEP 02
Burn for quota

Consumer burns $ENGRAM. A quota receipt is bound to msg.sender against the publisher.

step · 03
STEP 03
Top-k return

Publisher returns k engrams plus a proximity proof — TEE-attested or zk-KZG.

step · 04
STEP 04
Decrypt

Consumer fetches ciphertext, verifies hash, decrypts the k fragments. Quota decrements.

vs · mindstate
mindstate
  • whole capsule / burn
  • ordinal addressing
  • chain provenance only
  • per-snapshot pay
engram infra
  • quota / burn
  • semantic vector
  • chain + zk·tee
  • per-query pay
per-query
vi.Network · why Base
why-base.md

Pay-per-query is impossible off Base.

On Ethereum mainnet, a single query would cost $2–5. The market would never form. Base gives us four properties that turn the architecture from thought experiment into deployable system.

properties · baseL2 · 8453
01Sub-cent fees$0.0008

Micro-tx per query. Pay-per-thought becomes economically sane.

02~2-second finality2.0 s

Memory synchronous with inference; no waiting longer than the LLM call.

03Smart Wallets · ERC-43374337

Session keys, paymaster, gasless UX. Agents pay autonomously.

04BasenamesENS-compat

Bind publisher reputation to a human-readable on-chain identity.

05Coinbase TEE stackSGX · H100

Verifiable top-k via attestation before zk schemes harden.

on mainnet
$2–5
cost / query · dead
on Base
$0.0008
cost / query · live
market live
savings
≈ 4 000×
per-query · empirical
vii.Standard · interface
standard.md

The interface,
draft v0.1.

Extends ERC-20. Adds streaming engram append and verifiable top-k retrieval. What distinguishes Engram Infra is the proximity proof — without it, a publisher could return arbitrary engrams and claim they were closest.

IStreamMemory.solERC-XXXX
1// SPDX-License-Identifier: MIT
2pragma solidity ^0.8.24;
3
4/// @title IStreamMemory — tokenised, semantically addressed memory.
5/// @notice Extends ERC-20 with append-only engram stream + verifiable top-k.
6interface IStreamMemory /* is IERC20 */ {
7 function publisher() external view returns (address);
8 function head() external view returns (bytes32);
9
10 function appendEngram(
11 bytes32 vectorCommitment,
12 bytes32 ciphertextHash,
13 string calldata ciphertextUri,
14 bytes32 prevEngram
15 ) external returns (bytes32 engramId);
16
17 function queryReceipt(
18 bytes32 queryCommitment,
19 uint256 k,
20 bytes32[] calldata returned,
21 bytes calldata proximityProof
22 ) external;
23
24 function burnForQueries(uint256 quota) external;
25}
key field
proximityProof

zk-KZG when the math hardens. TEE attestation in v0 — fast, hardware-rooted.

viii.Use cases · five markets
markets.md

Five live markets,
one primitive.

The same semantically-addressed, burn-to-retrieve memory fits agent runtimes, curated RAG, source-protected journalism, personal data, and agent-to-agent trade.

case · 01
01
Long-term memory

An agent exports its cross-session memory as an Engram stream. Any compatible runtime — Claude, OpenAI, open-source — attaches it via the token.

case · 02
02
Selective RAG

A curator builds an encrypted index over a narrow domain. Consumers pay for relevant fragments, not for the whole corpus.

case · 03
03
Whistleblowing

A source publishes encrypted observation logs with timestamped commits. Journalists access only the fragments relevant to an investigation.

case · 04
04
Personal sovereignty

A user tokenises their conversation history. Trainers buy samples — without bulk export and without a platform middleman.

case · 05
05
Agent-to-agent

Agent A sells agent B access to its experience in one domain. Narrow, relevant trade in intelligence — not a model licence.

A2A
ix.Risks · honest limitations
risks.md

What can fail.
What we accept.

A serious lite-paper names its open problems. Five live risks shape the roadmap. Each has a mitigation; none is fully closed.

risk · 01
zk top-k is non-trivial

ANN selection inside a zk circuit is expensive. v0 uses Coinbase TEE attestation; migration to zk-KZG + range proofs happens incrementally.

TEE → zk
risk · 02
Query leakage

Frequent queries on one topic reveal a consumer's interest. Mitigations — query mixing, PIR — add cost and latency.

PIR opt-in
risk · 03
Cold start

Pay-per-query only works at sufficient engram density. Bootstrapping needs grants and curator bonuses for early publishers.

grants
risk · 04
Off-chain availability

If the ciphertext provider goes dark, the on-chain commit survives but the payload is unrecoverable. Mitigation: multi-storage.

multi-store
risk · 05
Regulatory grey

Personal memory as a bearer instrument is uncharted territory. A real launch requires jurisdictional review.

legal review
end.mdx · build with us

Memory ceases to be ephemeral.
It becomes addressable.

Engram Infra is a conceptual draft. The standard is unsubmitted, the contracts are unaudited, the economics are unfinalised. If any of that excites you — get involved early.

disclaimer

Conceptual document. Not a securities offering. Standard unfiled. Real launch requires audits and legal review.

not an offer