Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
When an AI agent remembers a user's preferences or previous actions, the information is typically stored in a service provider's private database. However, when switching providers or conducting a later audit, third parties cannot independently determine which updates produced the current memory.
ERC8350 defines a standard for verifying that authorized memory updates form an uninterrupted linear history without publishing the memory contents to Ethereum. This article explains the data structures, permissions, signatures, state transitions, and official reference implementation, with code examples.
Overview
Consider a travel-planning AI agent that learns from a user that they prefer window seats. The service provider can store that preference in a private database. However, recording only a hash of the stored contents on Ethereum does not establish which history it follows, who authorized the update, or whether intermediate updates were omitted.
ERC8350 establishes a namespace for a single memory history. Each update includes its position in the history, commitments to private data, an interpretation profile, and a commitment to its storage location. The registry verifies authorization and checks that the update advances exactly one step from the previous state before advancing the head. Raw memory, encryption keys, and private storage locations are not submitted to the registry.
Using disclosed evidence, an auditor can verify that an update was authorized by the registered authority and appended immediately after a known point in the history. The mechanism does not establish whether the recorded contents are true, whether the AI actually used the memory, or whether the private data remains retrievable.
Maintaining a linear history
Each memory history begins with an empty head at sequence zero, followed by its first transition at sequence one. It also maintains a cumulative value representing the preceding history. The standard calls this single linear agent memory history a Memory Space. A new update is accepted only when its sequence is exactly one greater than the stored sequence and its previous-state value matches the current value.
These conditions reject updates that skip intermediate positions or roll back to an old point. Branching histories and merging concurrent updates later are outside the scope of the standard.
Verifying updates without revealing their contents
The registry stores fixed-length commitments derived from secret values rather than raw preferences or conversations. A commitment allows a verifier to check whether subsequently disclosed data and a secret value match what was committed at registration.
The update contents, provenance, and storage location have separate commitments. This separation allows selective disclosure, such as revealing an update's contents to an auditor while keeping its storage location private.
From initialization to verification
First, a controller registers a memory space and designates the account authorized to approve routine updates. The agent operator constructs commitments from private data and obtains a signature covering them and the current position in the history. A submitter sends the signed update to the registry, which verifies authorization and continuity before advancing the head.
An auditor reads the events and current state and independently reproduces the computations. When needed, the auditor compares private data disclosed by the operator with its commitments.

Motivation
When moving AI agent memory to another provider, the receiving provider cannot independently determine whether the supplied data is the latest version or whether it has been substituted along the way. Publishing a single hash does not establish who authorized it, which state was advanced, or whether different implementations derive the same identifier.
Publishing raw prompts, user preferences, embeddings, and operational policies on Ethereum would expose their contents and increase storage costs. ERC8350 restricts publication to fixed-length declarations and signatures, leaving content storage and interpretation to off-chain systems.
What a simple hash does not establish
Comparing a simple hash, a linear registry, and a branching history illustrates their different purposes.
| Approach | Authorization verification | Link to previous state | Number of successors | Suitable use cases |
|---|---|---|---|---|
| Simple hash | Requires a separate mechanism | Not established | Not defined | Check only whether contents have changed |
| ERC8350 | Records the controller and authorizer | Verifies the preceding root and sequence | One | Maintain an auditable linear history |
| Branching history | Depends on the design | Manages multiple parent-child relationships | Multiple | Histories requiring concurrent editing and merging |
ERC8350 focuses on sequential advancement of a single committed head, rather than an arbitrary history model.
Why private memory remains off-chain
Prompts and user preferences may contain personal information. Storage URIs may also contain provider names, tenant IDs, or access tokens.
ERC8350 keeps raw data private and includes only its respective commitments in the signed data. This prevents a relayer submitting an authorized update from substituting different storage-location or update-content commitments.
Reproducing the same result across implementations
If different identifiers are derived from the same update, auditors and registries cannot refer consistently to the same history. ERC8350 specifies the type strings, field ordering, hash formulas, and signature domain.
The official test vectors include inputs, commitments, type hashes, transition IDs, updated state roots, and signing digests. Implementers can compare their computed results with the official values to detect discrepancies in encoding or field order.
When to adopt the standard and possible alternatives
ERC8350 is suitable when updates must be committed individually and their ordering and authorization verified later. Use simpler records when a one-off file hash is sufficient, or another history model when concurrent branches must be merged.
The standard does not prescribe an AI model, vector database, or retrieval mechanism. If the truthfulness or availability of memory contents must also be established, combine it with separate data availability, provenance, or proof mechanisms.
Specification
ERC8350 defines memory-history identifiers, update declarations, history-chaining calculations, authorization, signatures, and an interface. As of October 15, 2026, the proposal was in Draft status.
MemorySpace
A MemorySpace is a namespace isolating one memory history.
Derive its spaceId from the initial controller and a 32-byte salt using the following formula.
MEMORY_SPACE_TYPE =
"MemorySpace(address initialController,bytes32 salt)"
spaceId = keccak256(abi.encode(
keccak256(bytes(MEMORY_SPACE_TYPE)),
initialController,
salt
))| Input | Purpose |
|---|---|
initialController |
The account initially responsible for the space and its authorization configuration. Must not be the zero address. |
salt |
A 32-byte value allowing one controller to create multiple spaces. It can remain private until registration. |
spaceId |
The memory-space identifier derived from the controller and salt. |
Including the controller in the derivation prevents a third party from preemptively registering the same space merely by reusing the salt. The salt is included in registration calldata and is not intended to remain secret after registration.
ExperienceDelta
An ExperienceDelta is a fixed-width declaration representing one memory update.
The operator constructs it, the authorizer signs it, and the registry and auditors interpret the same fields.
struct ExperienceDelta {
bytes32 spaceId;
uint64 sequence;
bytes32 prevStateRoot;
bytes32 deltaCommitment;
bytes32 provenanceCommitment;
bytes32 profileId;
bytes32 locatorCommitment;
}| Field | Value and meaning | Requirement |
|---|---|---|
spaceId |
Identifies the memory space to update. | Must identify a registered space. |
sequence |
The update's position within that space. | Starts at 1 and must be exactly one greater than the current value. |
prevStateRoot |
Represents the history immediately preceding the update. | Zero for the first update; must match the current root thereafter. |
deltaCommitment |
Represents the private update contents or ciphertext. | Must be nonzero. |
provenanceCommitment |
Represents the update's provenance, such as inputs or inference attestations. | Zero if omitted. |
profileId |
Identifies the commitment construction and private-data interpretation rules. | Must be nonzero. |
locatorCommitment |
Represents the private storage location. | Zero if omitted; does not contain the raw URI. |
The declaration does not contain raw memory, commitment salts, encryption keys, or raw locators. It also omits self-reported author and timestamp fields. Authorization is handled through signatures, and observation time through on-chain records.
Transition ID
The Transition ID is an implementation-independent identifier for one ExperienceDelta.
Calculate it using abi.encode with the exact type string's hash and seven fields, without converting the data to a format such as JSON.
ExperienceDelta(bytes32 spaceId,uint64 sequence,bytes32 prevStateRoot,bytes32 deltaCommitment,bytes32 provenanceCommitment,bytes32 profileId,bytes32 locatorCommitment)transitionId = keccak256(abi.encode(
EXPERIENCE_DELTA_TYPEHASH,
delta.spaceId,
delta.sequence,
delta.prevStateRoot,
delta.deltaCommitment,
delta.provenanceCommitment,
delta.profileId,
delta.locatorCommitment
));In the first official test vector, transitionId is 0xdd00dd6e...91e7f4e5.
The transition ID itself is chain-independent.
The signing digest, by contrast, includes the chain and registry, so these two values must not be conflated.
State Root
The State Root is a cumulative value representing the sequence of updates accepted so far.
Calculate the updated root from the preceding root and the current transition ID.
MEMORY_STATE_TYPE =
"MemoryState(bytes32 prevStateRoot,bytes32 transitionId)"
nextStateRoot = keccak256(abi.encode(
keccak256(bytes(MEMORY_STATE_TYPE)),
prevStateRoot,
transitionId
))| Check | Acceptance condition | Failure behavior |
|---|---|---|
| Sequence | sequence == currentSequence + 1 |
Reject skipped, duplicate, or outdated sequence numbers. |
| Previous root | prevStateRoot == currentStateRoot |
Reject updates based on another branch or an outdated head. |

On success, store transitionId, nextStateRoot, and sequence within the same transaction.
If any check fails, the entire transaction reverts and the head remains unchanged.
Authorization model
Each space has a controller responsible for administration and an authorizer responsible for approving routine memory updates.
| Role | Authorized actions | Impact of compromise |
|---|---|---|
controller |
Replace the controller and authorizer together. | An attacker can replace both authorities. |
authorizer |
Approve subsequent ExperienceDelta objects. |
An attacker can append fabricated updates that satisfy the required format. |
relayer |
Submit signed transactions. | Cannot modify signed values, but can withhold submissions or create contention. |

Authorization updates include a value exactly one greater than the current configNonce in the signed data.
Reusing a signature for an old authorization configuration fails because its nonce no longer matches the required next value.
Signature domain
Space registration, authorization updates, and state transitions use the EIP712 domain for signatures. EIP712 defines a format that allows wallets and contracts to hash the same typed structured data. The signature domain contains the chain ID and registry address. This prevents a signature for the same struct from being reused on another chain or registry.
For more about EIP712, see the following article.
[EIP712] Understanding Typed Structured Data Hashing and Signing
| Field | Value | Separation provided |
|---|---|---|
name |
AgentMemoryState |
Distinguishes signatures used for other purposes. |
version |
1 |
Distinguishes incompatible signature formats. |
chainId |
Current chain ID | Prevents cross-chain replay. |
verifyingContract |
Registry address | Prevents replay across registries. |
The signing digest is keccak256(0x1901 || domainSeparator || structHash).
An independently verifiable transition reference includes the chain, registry address, spaceId, and transitionId.
Immutability of enforcement logic
The guarantee of a linear history comes from the code enforcing acceptance conditions, not merely from the stored data. An upgradeable proxy could replace its implementation with code that no longer enforces sequencing or signature checks.
A conforming registry cannot be placed behind an upgrade mechanism capable of replacing the logic enforcing linearity, root chaining, and signature verification. Reproducing official vector hashes and ensuring that a deployment will continue enforcing the same acceptance conditions are separate verification tasks.
Common proxy implementations use standardized storage slots.
Examine those slots and the published source to determine whether authority to replace the enforcement logic remains.
Deployment audits should inspect the published source and bytecode, owners, administrators, initializers, upgrade functions, arbitrary delegatecall paths, ERC1967 slots, and custom proxy mechanisms.
Empty standard ERC1967 slots do not prove that no custom upgrade path exists.
For more about ERC1967, see the following article.
[ERC1967] Understanding Smart Contract Upgrade Storage Slots
IAgentMemoryState
The standard interface defines one struct, three events, and six mandatory functions. The reference implementation also provides optional read and computation helpers for auditing and integration.
ExperienceDelta
struct ExperienceDelta {
bytes32 spaceId;
uint64 sequence;
bytes32 prevStateRoot;
bytes32 deltaCommitment;
bytes32 provenanceCommitment;
bytes32 profileId;
bytes32 locatorCommitment;
}A declaration representing one update submitted to the registry.
Field ordering is part of the v1 wire format; reordering the fields changes transitionId.
- Fields
| Field | Description |
|---|---|
spaceId |
Memory Space being updated. |
sequence |
Update sequence number within the space. |
prevStateRoot |
State root immediately before the update. |
deltaCommitment |
Commitment representing the private update contents. |
provenanceCommitment |
Optional commitment representing the update's provenance. |
profileId |
Identifies the interpretation rules for commitments and private witnesses. |
locatorCommitment |
Optional commitment representing the private storage location. |
The core registry does not define profile ID derivation, collision avoidance, registration location, governance, or distribution of profile definitions. A verifier obtains the relevant profile definition through a separate channel and checks the private witness using its encoding and validation rules.
SpaceRegistered
event SpaceRegistered(
bytes32 indexed spaceId,
address indexed controller,
address indexed authorizer
);Announces successful registration of a new memory space.
Immediately after registration, transitionId, stateRoot, sequence, and configNonce are zero, although these values are not included in the event.
- Fields
| Field | Description |
|---|---|
spaceId |
Registered Memory Space. |
controller |
Initial controller. |
authorizer |
Initial state transition authorizer. |
The event alone cannot reconstruct the salt used to derive spaceId or the controller's authorization.
An independent audit also examines the registration transaction calldata and sender or signature.
SpaceAuthorizationUpdated
event SpaceAuthorizationUpdated(
bytes32 indexed spaceId,
address indexed controller,
address indexed authorizer,
uint64 configNonce
);Announces the result of updating the controller or authorizer.
Both addresses and configNonce reflect the updated values.
An auditor follows events from registration onward to reconstruct the authorizer effective at each state transition.
- Fields
| Field | Description |
|---|---|
spaceId |
Memory Space whose authorization was updated. |
controller |
Updated controller. |
authorizer |
Updated authorizer. |
configNonce |
Updated authorization configuration nonce. |
TransitionCommitted
event TransitionCommitted(
bytes32 indexed spaceId,
bytes32 indexed transitionId,
uint64 indexed sequence,
bytes32 prevStateRoot,
bytes32 nextStateRoot,
bytes32 deltaCommitment,
bytes32 provenanceCommitment,
bytes32 profileId,
bytes32 locatorCommitment,
address authorizer
);Announces that a state transition has been accepted and the head updated. Auditors can retrieve the preceding and updated roots, commitments, profile, and authorizer at acceptance. The event does not contain signature bytes. Verifying a nonempty signature requires the transaction calldata. For an empty signature, inspect the transaction sender or applicable direct caller.
- Fields
| Field | Description |
|---|---|
spaceId |
Updated Memory Space. |
transitionId |
Identifier of the current update. |
sequence |
Accepted update sequence. |
prevStateRoot |
Root immediately before the update. |
nextStateRoot |
Root after the update. |
deltaCommitment |
Commitment representing the private update contents. |
provenanceCommitment |
Optional commitment representing the update's provenance. |
profileId |
Identifier of the interpretation profile. |
locatorCommitment |
Optional commitment representing the private storage location. |
authorizer |
State transition authorizer at acceptance. |
deriveSpaceId
function deriveSpaceId(address initialController, bytes32 salt)
external pure returns (bytes32 spaceId);Computes spaceId from the initial controller and salt.
Clients and registries use this function to derive the same identifier before registration.
-
Check the controller
Verify that
initialControlleris not the zero address. -
Compute the identifier
ABI-encode the type hash, controller, and salt, then apply
keccak256.
- Parameters
| Parameter | Description |
|---|---|
initialController |
Address initially managing the space. |
salt |
A 32-byte value distinguishing the space. |
- Return value
| Return value | Description |
|---|---|
spaceId |
Identifier derived from the type hash, controller, and salt. |
-
Execution requirements
-
This is a
purefunction that does not modify state and may be called by anyone. -
It fails if
initialControlleris the zero address.
registerSpace
function registerSpace(
bytes32 spaceId,
address controller,
address authorizer,
bytes32 salt,
bytes calldata controllerSignature
) external;Registers a new memory space and stores its initial controller and authorizer.
When a relayer submits the registration, it supplies the controller's signature over SpaceRegistration.
The type string and struct hash used for signing are shown below.
SpaceRegistration(bytes32 spaceId,address controller,address authorizer)keccak256(abi.encode(
SPACE_REGISTRATION_TYPEHASH,
spaceId,
controller,
authorizer
))-
Check the inputs
Check nonzero values, consistency with the derived
spaceId, and absence of a previous registration. -
Verify controller authorization
Verify authorization through a direct call by the controller or its signature.
-
Store the initial state
Store the controller and authorizer and initialize the head and nonce to zero.
-
Announce the registration
Emit the
SpaceRegisteredevent.
- Parameters
| Parameter | Description |
|---|---|
spaceId |
Identifier of the space to register. |
controller |
Address managing the authorization configuration. |
authorizer |
Address approving state transitions. |
salt |
Value used to derive spaceId. |
controllerSignature |
EIP712 signature from the controller. In the official reference implementation, it may be empty for a direct call by the controller. |
- Emitted events
Emit SpaceRegistered on success.
-
Execution requirements
-
The specified space must not already be registered.
-
Both the controller and authorizer must be nonzero addresses.
-
The derived space ID must match the supplied
spaceId. -
Controller authorization must be valid.
-
Acceptance of a direct call with an empty signature is optional (MAY). The reference implementation accepts it only if
msg.sender == controller.
updateSpaceAuthorization
function updateSpaceAuthorization(
bytes32 spaceId,
address newController,
address newAuthorizer,
bytes calldata controllerSignature
) external;Verify authorization from the current controller and replace the controller and authorizer within one transaction. To retain either role, supply its existing address as the corresponding new value.
The type string and struct hash used for signing are shown below.
SpaceAuthorization(bytes32 spaceId,address newController,address newAuthorizer,uint64 nonce)keccak256(abi.encode(
SPACE_AUTHORIZATION_TYPEHASH,
spaceId,
newController,
newAuthorizer,
nonce
))-
Read the space
Read its registered
SpaceRecordand currentconfigNonce. -
Hash the update
Include both new addresses and
configNonce + 1in the signed data. -
Verify controller authorization
Verify a direct call from the current controller or its signature.
-
Update both roles together
Store both addresses and the nonce, and emit the event.
- Parameters
| Parameter | Description |
|---|---|
spaceId |
Space whose authorization is being changed. |
newController |
Updated controller. |
newAuthorizer |
Updated authorizer. |
controllerSignature |
Signature authorizing the new addresses and successor nonce by the current controller. |
- Emitted events
Emit SpaceAuthorizationUpdated on success.
-
Execution requirements
-
The space must already be registered.
-
Both new addresses must be nonzero.
-
Authorization from the current controller must be valid.
-
Acceptance of a direct call with an empty signature is optional (MAY). The official reference implementation accepts it only when
msg.sendermatches the current controller. -
A transaction failing these conditions reverts without changing either address or
configNonce.
commitTransition
function commitTransition(
ExperienceDelta calldata delta,
bytes calldata authorizerSignature
) external returns (bytes32 transitionId, bytes32 nextStateRoot);Advances the head of a registered space by exactly one state transition. After verifying authorization from the current authorizer, stores the individual transition and updated head.
-
Check the space and required values
Verify registration and nonzero
deltaCommitmentandprofileIdvalues. -
Check the link to the preceding history
Verify that the sequence is exactly one greater than the current value and that
prevStateRootmatches the current root. -
Verify the update and signature
Calculate
transitionId, check for duplicates, and verify the authorizer's approval. -
Update both storage locations
Store the individual transition and update the space's head, root, and sequence.
-
Announce the committed result
Emit
TransitionCommittedand return the two calculated values.
- Parameters
| Parameter | Description |
|---|---|
delta |
Update declaration containing seven fields. |
authorizerSignature |
Signature from the current authorizer over the signing digest derived from transitionId. In the official reference implementation, it may be empty for a direct call by the authorizer. |
- Return value
| Return value | Description |
|---|---|
transitionId |
Identifier derived from the current declaration. |
nextStateRoot |
Updated root derived from the preceding root and transitionId. |
- Emitted events
Emit TransitionCommitted on success.
-
Execution requirements
-
The space must already be registered.
-
deltaCommitmentandprofileIdmust be nonzero. -
The sequence must be exactly one greater than the current value, and
prevStateRootmust match the current root. -
Authorization from the current authorizer must be valid.
-
Acceptance of a direct call with an empty signature is optional (MAY). The official reference implementation accepts it only if
msg.sendermatches the current authorizer. -
The official reference implementation also rejects an already stored
transitionId.
head
function head(bytes32 spaceId) external view returns (
bytes32 transitionId,
bytes32 stateRoot,
uint64 sequence
);Returns the last accepted update and current position in the specified space's history.
Immediately before constructing a new update, a client reads these values and includes sequence + 1 and the current stateRoot in the new declaration.
-
Check the space
Retrieve the registered record corresponding to
spaceId. -
Return the current head
Return the head's
transitionId,stateRoot, andsequence.
- Parameters
| Parameter | Description |
|---|---|
spaceId |
Memory space to query. |
- Return value
| Return value | Description |
|---|---|
transitionId |
Update currently at the head. |
stateRoot |
Cumulative value of the history so far. |
sequence |
Last accepted sequence number. |
-
Execution requirements
-
Any caller may read the information.
-
The normative interface does not prescribe a return behavior for unregistered spaces.
-
The official reference implementation reverts with
UnknownSpacefor an unregistered space.
spaceAuthorization
function spaceAuthorization(bytes32 spaceId) external view returns (
address controller,
address authorizer,
uint64 configNonce
);Returns the specified space's current authorization configuration. This identifies whose approval is needed when creating or verifying a signature.
-
Check the space
Retrieve the registered record corresponding to
spaceId. -
Return the authorization configuration
Return the controller, authorizer, and
configNonce.
- Parameters
| Parameter | Description |
|---|---|
spaceId |
Memory space to query. |
- Return value
| Return value | Description |
|---|---|
controller |
Current controller. |
authorizer |
Current state transition authorizer. |
configNonce |
Current authorization configuration nonce. |
-
Execution requirements
-
Any caller may read the information.
-
The normative interface does not prescribe a return behavior for unregistered spaces.
-
The official reference implementation reverts with
UnknownSpacefor an unregistered space.
Additional considerations
An integration should implement commitment construction, external references, reconstruction from events, and retry handling separately from the registry's acceptance conditions.
Commitments to private data
The recommended baseline uses separate domain tags for different purposes and combines a hash of the original data, the profile, and a secret salt.
The domain tags fixed in v1 are derived from the following strings.
DELTA_DOMAIN = keccak256(bytes("AgentMemoryState.deltaCommitment.v1"))
PROVENANCE_DOMAIN = keccak256(bytes("AgentMemoryState.provenanceCommitment.v1"))
LOCATOR_DOMAIN = keccak256(bytes("AgentMemoryState.locatorCommitment.v1"))deltaCommitment = keccak256(abi.encode(
DELTA_DOMAIN,
profileId,
deltaSalt,
keccak256(payloadBytes)
))
provenanceCommitment = keccak256(abi.encode(
PROVENANCE_DOMAIN,
provenanceSalt,
keccak256(provenanceBytes)
))
locatorCommitment = keccak256(abi.encode(
LOCATOR_DOMAIN,
locatorSalt,
keccak256(bytes(locator))
))The profileId used in these calculations identifies the private-witness encoding and verification procedure.
Because the core registry does not distribute profile definitions, verifiers obtain the relevant definitions from operators or profile maintainers through a separate channel.
Use independent random 32-byte values for the three salts. Adding a public salt to a value with few possible candidates does not prevent targeted dictionary attacks that test each candidate. Keep the salt secret, or commit to data encrypted using a fresh key and nonce.
Verifiable transition references
Because spaceId derives only from the controller and salt, the same value can be used on multiple chains.
The histories on those chains advance independently, so spaceId and transitionId alone cannot uniquely identify the verification target.
When referencing a transition in external documents or audit reports, record the chain, registry address, spaceId, and transitionId.
Without the first two values, the EIP712 domain cannot be reconstructed and the signature cannot be verified independently.
Reconstructing the history and retrying on contention
After waiting for sufficient confirmations, an auditor processes registration events, authorization updates, and transitions in block and log order.
Also retrieve transaction calldata to verify the registration salt and controller authorization, subsequent controller authorizations, and transition authorizations from the authorizer.
Verify nonempty signatures using the signature bytes in calldata. For empty signatures, verify that the direct caller was the controller or authorizer effective at the time, inspecting call traces where needed.
For each transition, recompute the type hash, transitionId, and updated root, and check the sequence and previous root.
flowchart TD
A[Read registration transaction after confirmations] --> B[Verify salt and controller authorization]
B --> C[Initialize controller and authorizer]
C --> D{Subsequent events and transactions}
D -->|Authorization update| E[Verify authorization and configNonce from calldata and caller]
E --> D
D -->|State transition| F[Check sequence and prevStateRoot]
F --> G[Recompute transitionId and nextStateRoot]
G --> H[Verify authorizer authorization from calldata or caller]
H --> D
D -->|End| I[Compare head with recomputed result]
I --> J{Reorg detected?}
J -->|Yes| A
J -->|No| K[Finalize audit result]
If a reorganization occurs before sufficient confirmation, the indexer rolls back to the block preceding the divergence and rereads the events and transactions. The standard does not specify confirmation depth or resynchronization methods; clients and indexers define these operational requirements.
If two relayers read the same head and prepare different successor updates, only the one committed first is accepted.
The later update reverts because its previous root or sequence no longer matches.
The client rereads the latest head, constructs a declaration with the new values, and obtains a new authorization signature.
Recovery and termination are not guaranteed
The controller can replace the authorizer, but the standard does not define a separate recovery authority or waiting period if access to the controller itself is lost. There is also no standard state representing termination, freezing, or relinquishment of authorization.
Deployments requiring recovery or suspension can use a multisignature or policy contract as controller and define operational procedures outside the registry. However, the registry's enforcement logic must not be replaceable through upgrade authority.
Capacity and execution costs
ExperienceDelta is fixed-width, but the standard does not impose a separate numerical limit on the number of spaces or transitions.
Both sequence and configNonce are uint64: very large in practice, but finite.
If either reaches the maximum uint64 value, subsequent + 1 operations revert through Solidity's checked arithmetic in the official reference implementation.
The standard does not define migration, termination, or restart procedures after reaching these limits.
The reference implementation stores part of each transition in storage and records additional details in events. Long-term operations should account for storage writes, event retrieval, indexer costs, and archival-node costs.
Observation time and out-of-scope functionality
An implementation may store block.timestamp as the time a transition was observed on-chain.
Update ordering must not be determined by timestamps supplied by applications.
Agent identification, raw memory storage and retrieval, data availability, inference correctness, branching and merging, deletion proofs, payments, tokenization, and cross-chain migration are outside the scope.
Test cases
Recomputing the official vectors
The official test vectors fix three type hashes derived from type strings, together with the transitionId and nextStateRoot derived from the supplied inputs.
experienceDeltaTypehash = 0x4f020f86bc06d852f1fde17853b4d92a70214eeab8e09718028124af097d070d
memoryStateTypehash = 0xf3148762556cbf851baf4b9a205e18ff4e6b366a58a3a1ef58e8626ba41beadb
memorySpaceTypehash = 0x9ae5478f084ad3b841da58a9cb2354d153cddec59ee64d0cb741fa9d08884531
transitionId = 0xdd00dd6eb3aec704b5455502647a0caacf23be6c724eda4a60d9645291e7f4e5
nextStateRoot = 0x9684a8d3571c5cd9c1e3abb1b0c0797b9fef6965e9002aeefba91e8cb1163754
domainSeparator = 0xc8e1b4a128b4de377427c24ccea92cac6d7c77f8fe55f4b2984432bbc3b3d5b9
signingDigest = 0xaa76377b6dc395d65e2c346a4ff3176bcbe3d27223e01b68be450f81f0f5f494
registrationId = 0x7bea30aa6018c9c8a3e66bd9573377af482dc791994af8c50698e3fc9d4e5d64
authorizationId = 0xa1fef7a8e52a533f7839f51962fa6e3ef9f8a8081efbac1eb13651801f4d1a92The JSON inputs correspond to the following computations.
| JSON input | Computation | Value to compare |
|---|---|---|
types.experienceDelta, types.memoryState, types.memorySpace |
Encode each string as UTF-8 bytes and compute keccak256. |
The three type hashes in expected. |
Seven fields of delta |
ABI-encode in the same order as hashExperienceDelta. |
expected.transitionId. |
delta.prevStateRoot and computed transitionId |
ABI-encode in the same order as computeNextStateRoot. |
expected.nextStateRoot. |
eip712 name, version, chainId, verifyingContract |
Encode the EIP712 domain. | eip712.domainSeparator. |
Computed domain separator and transitionId |
Prefix with 0x1901 and hash. |
eip712.signingDigest. |
spaceAuthorization controller, authorizer, spaceSalt |
Compute deriveSpaceId and then the registration struct hash. |
spaceAuthorization.registrationId. |
Same space, two new authorization addresses, updateNonce |
Compute the authorization-update struct hash. | spaceAuthorization.authorizationId. |
The machine-readable vectors are available below.
https://eips.ethereum.org/assets/eip-8350/test-vectors-v1.json
Failure conditions and limitations
An implementation should verify at least the following cases.
| Check | Expected result |
|---|---|
| Correct type strings and field order | Reproduce the official transitionId and nextStateRoot. |
| First update | Accept only sequence = 1 and prevStateRoot = 0. |
| Sequence, previous root, required fields | Reject skipped sequences, outdated roots, and zero required values. |
| Direct calls in the reference implementation | Accept an empty signature only from the authorized direct caller. |
| Contract and EOA signatures | Correctly recognize the magic value and canonical 65-byte ECDSA signatures. |
| Old signatures after an authorization update | Reject signatures from the former authorizer when no longer authorized. |
| Failed transaction | Leave both the individual transition and head unchanged. |
Matching the official vectors establishes that encoding and hashing conform to v1. It does not establish correct authorization management, data availability, or immutability of the deployed registry.
Compatibility
ERC8350 adds a new registry without modifying existing interfaces. However, changing the type strings or domain tags fixed by v1 produces different identifiers from the same data.
Values fixed in v1
| Fixed element | Effect of changing it |
|---|---|
ExperienceDelta type string and field order |
Changes transitionId. |
MemoryState type string |
Changes nextStateRoot. |
| EIP712 domain name and version | Changes the signing digest. |
| Baseline commitment domain tags | Changes the commitments. |
When introducing an alternative format, identify its version and migration checkpoint explicitly rather than implicitly mixing it into a v1 history.
Migrating from an older prototype
An older prototype using JCS-derived identifiers, unsigned URIs, fixed memory categories, and a previousDelta pointer is not wire-compatible with v1.
For migration, record the old history's final value as an external checkpoint and start a v1 history in a new MemorySpace.
Do not assume that mechanically mapping old values into v1 fields reproduces their identifiers.
Draft status and adoption
ERC8350 was in Draft status as of October 15, 2026. The Ethereum Magicians discussion identifies a Sepolia registry deployment, but the specification does not mandate any particular deployment. An official reference implementation or a proposal author's Sepolia deployment does not establish third-party production adoption. The original article had not identified third-party production adoption as of October 15, 2026.
Whether to require the baseline commitment construction and who should govern profileId remain subjects of discussion in the version reviewed.
Before adopting the standard, check the latest specification, the target registry's bytecode and permissions, the relevant profile definition and its source, and the audit status.
Profile ID derivation, collision avoidance, registration location, and governance are determined outside the registry.
Reference implementation
The official reference implementation consists of IAgentMemoryState.sol, AgentMemoryStateRegistry.sol, and a minimal ECDSA.sol.
The following traces the order of input validation, storage operations, and revert conditions rather than merely listing files.
AgentMemoryStateRegistry
The registry stores each space's current state and individual transitions in separate mappings. The constructor caches the chain ID at deployment and the domain separator in immutable values.
Two stored record types
struct SpaceRecord {
address controller;
address authorizer;
bytes32 transitionId;
bytes32 stateRoot;
uint64 sequence;
uint64 configNonce;
}
struct StoredTransition {
bytes32 spaceId;
bytes32 nextStateRoot;
uint64 sequence;
uint64 committedAt;
}
mapping(bytes32 spaceId => SpaceRecord) private _spaces;
mapping(bytes32 transitionId => StoredTransition) private _transitions;| Storage | Key | Stored contents | Purpose |
|---|---|---|---|
_spaces |
spaceId |
Current authorization configuration, head, sequence, authorization nonce | Determine whether a subsequent update can be accepted. |
_transitions |
transitionId |
Associated space, updated root, sequence, observation time | Retrieve individual committed updates later. |
committedAt is an observation timestamp added by the reference implementation, not a mandatory field of the standard.
Registration and authorization updates
The registration function checks zero values, the derived spaceId, duplicate registration, and controller authorization in order.
bytes32 expectedSpaceId = deriveSpaceId(controller, salt);
if (spaceId != expectedSpaceId) {
revert InvalidSpaceId(expectedSpaceId, spaceId);
}
if (_spaces[spaceId].controller != address(0)) {
revert SpaceAlreadyRegistered();
}
bytes32 registrationId = keccak256(
abi.encode(
SPACE_REGISTRATION_TYPEHASH,
spaceId,
controller,
authorizer
)
);
_requireAuthorization(
controller,
_digest(registrationId),
controllerSignature,
true
);After authorization, store the controller and authorizer and initialize the head, sequence, and configuration nonce to zero. A failure prevents the storage changes from taking effect.
The authorization-update function includes configNonce + 1 in the signed data.
After signature verification, it updates both addresses and the nonce together, preventing an observable intermediate configuration in which only one role has changed.
Committing state transitions
The transition function checks the inputs and current head before verifying hashes and signatures, then updates both mappings.
SpaceRecord storage space = _space(delta.spaceId);
if (delta.deltaCommitment == bytes32(0)) {
revert ZeroDeltaCommitment();
}
if (delta.profileId == bytes32(0)) {
revert ZeroProfileId();
}
uint64 expectedSequence = space.sequence + 1;
if (delta.sequence != expectedSequence) {
revert BadSequence(expectedSequence, delta.sequence);
}
if (delta.prevStateRoot != space.stateRoot) {
revert BadPreviousState(space.stateRoot, delta.prevStateRoot);
}
transitionId = hashExperienceDelta(delta);
if (_transitions[transitionId].spaceId != bytes32(0)) {
revert TransitionAlreadyExists();
}
_requireAuthorization(
space.authorizer,
_digest(transitionId),
authorizerSignature,
true
);TransitionAlreadyExists is a defensive check added by the official reference implementation.
Beyond the standard's linearity requirements, it explicitly prevents overwriting a key in the individual-transition mapping.
After successful signature verification, compute the updated root, store the individual transition, update the head, and emit the event. EVM transactions are atomic: a later revert also rolls back earlier storage writes.

Signature verification order
A conforming registry does not distinguish EOAs from contract signers solely by the presence of code. If the signer has code, attempt ERC1271 verification first, then check for a canonical 65-byte ECDSA signature if that attempt fails. This order is a normative requirement intended to avoid incorrectly rejecting signatures made with the underlying key of an EOA that has delegated code.
Accepting a direct call with an empty signature is optional (MAY). The reference implementation adds this optional path first, trying direct-call authorization, ERC1271, and ECDSA in that order.
if (
allowDirectCall &&
msg.sender == signer &&
signature.length == 0
) return;
if (
signer.code.length != 0 &&
_isValidERC1271Signature(signer, digest, signature)
) return;
if (signature.length != 65) {
revert InvalidAuthorization();
}
if (ECDSA.recover(digest, signature) != signer) {
revert InvalidAuthorization();
}For contract signers, invoke the signature verification function through a static call.
Accept the signature under the contract's policy only if the specified magic value is returned.
ERC1271 defines how a contract account reports successful signature validation using the isValidSignature magic value.
The reference implementation accepts the contract-signature path only when STATICCALL succeeds, the return data is at least 32 bytes long, and its leading bytes4 equals 0x1626ba7e.
For more about ERC1271, see the following article.
[ERC1271] Verifying Signatures through Smart Contracts
An address with code is not necessarily a contract-only signer.
If contract signature verification fails, continue by checking a valid canonical EOA signature.
An EOA with EIP7702 delegation has code.length != 0, but its delegation target may not implement ERC1271.
Falling back to ECDSA after unsuccessful ERC1271 verification allows valid signatures from the underlying key to be accepted.
For more about EIP7702, see the following article.
[EIP7702] Delegating EOA Execution to Smart Contract Code

Canonical ECDSA signatures
The official ECDSA.sol decomposes a 65-byte signature into r, s, and v and performs ecrecover.
if (signature.length != 65) {
revert InvalidSignatureLength();
}
if (
uint256(s) >
0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0
) {
revert InvalidSignatureS();
}
address signer = ecrecover(digest, v, r, s);
if (signer == address(0)) {
revert InvalidSignature();
}Restricting s to the lower half of the secp256k1 curve order prevents the corresponding signature malleability.
Recovery to the zero address also fails.
If the library reverts, the entire state transition reverts without changing storage.
Optional read and computation helpers
The reference implementation exposes the following functions in addition to the mandatory interface.
| Function | Result and purpose |
|---|---|
transition |
Returns an individual transition's space, next root, sequence, and observation time. |
hashExperienceDelta |
Computes the same transitionId as a conforming client. |
computeNextStateRoot |
Computes the updated root from the previous root and transitionId. |
hashSpaceRegistration |
Computes the registration struct hash. |
hashSpaceAuthorization |
Computes the authorization-update struct hash. |
signingDigest |
Returns the signing digest for the current chain and registry. |
computeDomainSeparator |
Computes a domain separator for the specified chain and registry. |
computeSigningDigest |
Computes a signing digest for the specified domain. |
domainSeparator |
Returns the current domain separator. |
These functions assist integration and verification but are not mandatory for conformance.
Distinguishing errors
The AgentMemoryStateRegistry contract uses 11 custom errors to distinguish rejection reasons.
The custom errors from ZeroSpaceId through ZeroProfileId cover failures in inputs, registration, lookups, authorization, and history continuity.
| Category | Error | Rejection condition |
|---|---|---|
| Input | ZeroSpaceId |
Registration with a zero space ID. |
| Input | ZeroAddress |
Required authorization address is zero. |
| Registration | InvalidSpaceId |
Value does not match the identifier derived from the controller and salt. |
| Registration | SpaceAlreadyRegistered |
Space is already registered. |
| Lookup | UnknownSpace |
Attempted read or write of an unregistered space. |
| Authorization | InvalidAuthorization |
None of the three authorization paths succeeds. |
| History | BadSequence |
Sequence is not the immediate successor. |
| History | BadPreviousState |
Previous root does not match the current state root. |
| History | TransitionAlreadyExists |
The same transition ID is already stored. |
| Input | ZeroDeltaCommitment |
Update-content commitment is zero. |
| Input | ZeroProfileId |
Interpretation profile ID is zero. |
A failed transaction does not update the space, transition, nonce, or head.
Security
ERC8350 verifies authorized updates and linear history. It does not automatically guarantee the confidentiality, availability, or truthfulness of the underlying private data.
Dictionary attacks and metadata leakage
Simply hashing a value with few possible candidates using keccak256 allows an attacker to test candidates.
This is a dictionary attack against low-entropy plaintext.
Keep deltaSalt secret or commit to ciphertext produced with a fresh key and nonce.
A public deltaSalt can impede precomputation but does not prevent targeted guesses.
Even when contents remain private, update timing, frequency, relationships between spaces, and profileId are public.
Reusing salts, ciphertext, or locator witnesses can also reveal patterns or identical commitments.
Compromised authorities and signature verification
Compromise of the authorizer allows an attacker to append formally valid updates. Compromise of the controller allows replacement of both the controller and authorizer.
For valuable memory spaces, use appropriate multisignature arrangements, threshold policies, rate limits, and operational recovery procedures.
The underlying key remains valid even after EIP7702 delegation.
Do not treat the delegation policy as the only security boundary; protect the underlying key to the same standard.
Do not accept a contract signature solely because STATICCALL succeeds; check for 0x1626ba7e in at least 32 bytes of return data.
Replay and relayers
The EIP712 domain protects against signature replay on other chains and registries.
Its chainId and verifyingContract bind the signature to the designated deployment.
Because the signed data includes spaceId, sequence, prevStateRoot, and the locator commitment, a relayer cannot substitute a different space, history position, or storage-location commitment.
A relayer can still withhold a valid transaction or cause it to contend with another submission. Operators should provide alternative submission paths, such as multiple relayers or direct submission where supported. When two updates compete for the same head, only the first committed update remains valid. The other needs a new authorization for the new head.
Availability and truthfulness
A valid commitment does not prove that the corresponding data remains retrievable. A valid signature does not establish that the contents are factual or that an AI used them during inference.
Use separate verification mechanisms when data availability, proof of storage, proof of inference, or truthful provenance is required. ERC8350 establishes that the configured authorizer approved an update at the specified position in the history.
Limits of deletion
Destroying an encryption key or issuing a deletion attestation cannot establish that all copies already made by third parties have been erased. A deletion extension must specify the storage location and custodian to which an attestation applies.
Auditing upgrades
An upgradeable registry could change its hashing or authorization rules after a user has signed an update. Reproducing official vectors does not guarantee that future code will enforce linearity.
An audit should inspect not only ERC1967 slots but also published source, deployed bytecode, owners, administrators, initializers, beacons, custom proxies, and delegatecall paths.
Examine every path leading to upgrade authority, not just standardized slots.
Establish at the deployment level that the logic enforcing sequence linearity, root chaining, and signature verification cannot be replaced.
Conclusion
ERC8350 does not prove the contents of an AI agent's private memory on Ethereum. It publishes fixed-length commitments and history positions, while a controller manages permissions and an authorizer approves each update.
The registry checks sequence numbers, preceding roots, and authorization, accepting only the immediate successor to the current head. This creates a common reference for cross-provider checkpoints, selective audits, and detection of rollbacks from known heads.
When integrating the standard, separately verify commitment confidentiality, data availability, key security, contention handling, and immutability of the registry's enforcement logic.
I also publish articles on the following platforms.





