ERC-8490 Agent Self-Check Registry (Agent Meditation Mechanism)
Draft · Other · created 2026-11-09
A standard that lets an AI agent record its self-check, remediation, and update history across four layers on-chain, so other parties can verify the timing and scope of those records.
Why it is needed
AI agents keep changing their code, configuration, dependencies, memory, skills, task plans, and decision-making methods while retaining the same identity. Maintenance processes such as self-checks, dependency checks, memory cleanup, replanning, and reflection mostly run off-chain in the background, and their results stay local. As a result, there is no way for an outside party to confirm what state is currently registered, which layer was checked most recently, under what rules a change was made, or what an agent's claimed improvement was actually evaluated against. A counterparty who needs to trust the agent must make judgments without answers to these questions.
What to implement
function enroll(bytes32[4] calldata baseline, Policy calldata policy, address controller, uint8 controllerRights) external;: The subject registers itself in the registry, setting baseline commitments for the four layers, an initial policy, and an optional controller.function setOperator(address operator, uint8 permissions) external;: The subject designates an operator and grants a permission bitmask for report, pulse, and policy.function revokeOperator(address subject, address operator) external;: The subject, or a controller holding RIGHT_REVOKE_OPERATORS, revokes an operator's permissions.function setController(address subject, address newController, uint8 rights) external;: The subject designates a controller, or a controller transfers, narrows, or relinquishes its standing within the scope of its own authority.function setPolicy(address subject, Policy calldata policy) external;: The subject, or an operator holding PERM_POLICY, adds a new policy version.function setFloor(address subject, Floor calldata floor) external;: A controller holding RIGHT_FLOOR replaces the minimum requirement (floor) with a new version.function demand(address subject, uint8 layerMask, uint48 dueBy) external;: A controller holding RIGHT_DEMAND requires completion of a specific layer by a deadline.function withdrawDemand(address subject, uint8 layerMask) external;: A controller holding RIGHT_DEMAND withdraws a demand it has placed.function report(address subject, CycleReport calldata r) external returns (uint64 seq);: The subject, or an operator holding PERM_REPORT, registers the outcome of one maintenance cycle.function pulse(address subject, uint48 nextPlannedAt) external returns (uint64 seq);: The subject, or an operator holding PERM_PULSE or PERM_REPORT, registers only an activity signal with no maintenance content.function headOf(address subject) external view returns (Head memory);: Queries summary information for the subject, such as the current state version, root, policy and floor versions, and activity signal.function checkpointOf(address subject, uint8 layer) external view returns (LayerCheckpoint memory);: Queries a checkpoint for a specific layer, including its current commitment and last completion time.function rootAt(address subject, uint64 stateVersion) external view returns (bytes32);: Queries the state root at a specific state version.function policyOf(address subject, uint32 version) external view returns (Policy memory);: Queries the content of a specific policy version.function policyEffectiveFrom(address subject, uint32 version) external view returns (uint48);: Queries when a specific policy version became effective.function floorOf(address subject) external view returns (Floor memory);: Queries the currently set floor.function demandOf(address subject, uint8 layer) external view returns (Demand memory);: Queries the content of a demand placed on a specific layer.function operatorPermissions(address subject, address operator) external view returns (uint8);: Queries the permission bitmask granted to a specific operator.function requirementsOf(address subject) external view returns (Requirements memory);: Queries the effective requirement obtained by combining policy and floor.function layerStatus(address subject, uint8 layer) external view returns (MaintenanceStatus status, uint48 deadline, bool neverCompleted);: Determines the maintenance status of a specific layer (FRESH, DUE, OVERDUE, etc.) and its deadline.function signalStatus(address subject) external view returns (SignalStatus status, uint48 lastSignalAt, uint48 silentSince);: Determines the subject's activity signal status (PRESENT, SILENT, etc.).function computeRoot(bytes32[4] calldata commitments) external pure returns (bytes32);: A pure function that computes the state root from the four layer commitments.function computeLayerCommitment(uint8 layer, bytes32 schemaHash, bytes32 contentHash, bytes32 salt) external pure returns (bytes32);: A pure function that computes a layer commitment from the layer index, schemaHash, contentHash, and salt.event Enrolled(address indexed subject, address indexed controller, uint8 controllerRights, bytes32 root, uint48 enrolledAt);: Emitted when a subject is registered; contains the initial root and controller information.event ControllerChanged(address indexed subject, address indexed previousController, address indexed newController, uint8 rights);: Emitted when a controller is designated, replaced, or changed.event OperatorSet(address indexed subject, address indexed operator, uint8 permissions, address indexed by);: Emitted when an operator's permissions are set.event PolicyUpdated(address indexed subject, uint32 indexed version, bytes32 policyHash, uint48 effectiveFrom, address by);: Emitted when a new policy version is registered.event FloorUpdated(address indexed subject, uint32 indexed version, uint48 effectiveFrom, address by);: Emitted when a new floor version is registered.event Demanded(address indexed subject, uint8 layerMask, uint48 dueBy, address by);: Emitted when a controller demands completion of a specific layer.event DemandWithdrawn(address indexed subject, uint8 layerMask, address by);: Emitted when a placed demand is withdrawn.event CycleRecorded(address indexed subject, uint64 indexed seq, uint64 baseVersion, uint64 newVersion, CycleReport report, uint8 changedLayers, uint48 recordedAt, address submitter);: Emitted when a maintenance cycle record is approved; contains the full content and the layers that changed.event LayerCommitmentChanged(address indexed subject, uint8 indexed layer, uint64 indexed version, bytes32 previousCommitment, bytes32 newCommitment);: Emitted when a specific layer's commitment changes; contains the previous and new values.event Pulsed(address indexed subject, uint64 indexed seq, uint48 recordedAt, uint48 nextPlannedAt, address submitter);: Emitted when an activity signal (pulse) is registered.function begin(address subject) external returns (uint48 startedAt);: The subject, or an operator holding PERM_REPORT, records the start time observed directly by the registry. (Optional extension)function cancelStart(address subject) external;: The subject, or the account that recorded the start, cancels an open start. (Optional extension)function openStartOf(address subject) external view returns (uint48 startedAt, address recordedBy);: Queries the currently open start time and the account that recorded it. (Optional extension)event CycleBegun(address indexed subject, uint48 startedAt, uint48 replacedStartedAt, address by);: Emitted when a start is recorded; also carries the previous start time it replaced. (Optional extension)event StartVoided(address indexed subject, uint48 startedAt, address by);: Emitted when an open start is invalidated for a reason other than being consumed by a cycle record. (Optional extension)
In depth
The four fixed layers
This standard fixes agent state into four layers: runtime (0), memory and skills (1), tasks and roles (2), and cognition (3). The ordering reflects levels of abstraction only and does not prescribe execution order; a single cycle may cover any subset of the four layers. Even for the same skill, layer 1 covers possession, completeness, and freshness, while layer 2 covers which task uses that skill at which version. Point-in-time observations such as balances or response latency are not included in layer state documents; they belong in cycle record documents.
Commitment computation method
A layer state document is normalized with JSON canonicalization (JCS, RFC 8785), then hashed with keccak256 to obtain contentHash. This is combined via abi.encode with schemaHash, the keccak256 of the schema identifier, and salt to compute the layer commitment. salt may be 0, but if the document content could be guessed from public information, a non-zero salt must be used and disclosed together with the document when it is published. The four layer commitments are combined again to obtain the state root.
Distinction between reported time and recorded time
reportedStartedAt, reportedEndedAt, and each layer's completedAt are times claimed by the submitter, separate from recordedAt, which the registry reads from the clock when it receives the transaction. The registry can only verify chronological order (later than the previous completion, earlier than the clock, and between the cycle's start and end) and cannot verify whether the work was actually performed. This version uses only the timestamp mode of ERC-6372, so intervals are in seconds.
Role and authorization structure
This is a first-person structure in which only the subject can write records about itself. A controller holds only the permissions fixed at appointment: setting the floor, demanding completion of a specific layer, and forcibly revoking operators; it cannot write records directly or grant operator status. An operator can submit report, pulse, and policy on the subject's behalf only to the extent of the bitmask (PERM_REPORT, PERM_PULSE, PERM_POLICY) granted by the subject, but every record is always attributed to the subject.
Combining policy and floor
A policy is a self-declared requirement that the subject sets per version, containing supported layers, required layers, permitted triggers, disclosure level, and the maximum check interval per layer. A floor is a minimum requirement set by the controller, which a policy cannot be looser than. The effective requirement is computed by combining the two values per layer by taking the minimum, and the subject cannot arbitrarily remove from supportedLayers any layer that the floor requires or that has a demand placed on it.
Verification rules for cycle records
When report is called, the registry approves the record only if all of the following hold: the scope matches (layerMask, completedLayers, and opsMask are consistent), the outcome is consistent with completedLayers (COMPLETED, PARTIAL, ABORTED, FAILED), the applied policy version is valid, the record links correctly to the previous state (baseVersion, preRoot), out-of-scope layers remain unchanged, chronological order holds (no overlap between cycles, and each layer's completion time is later than its previous completion), any restoration claim (restoresVersion) matches history, and it conforms to the current policy version. If any of these fails, the record is rejected.
State determination: layerStatus and signalStatus
layerStatus determines whether a layer is unregistered, unsupported, or not scheduled, or otherwise one of FRESH, DUE, or OVERDUE, based on the layer's last completion time and a deadline computed from the maximum interval. If a required layer has never been completed, the deadline is calculated from the registration time. signalStatus separately determines the activity signal, updated by pulse or report, as NOT_TRACKED, PRESENT, or SILENT, independently of maintenance freshness.
The recorded-start extension and Draft status
Note that this ERC is currently in Draft status and is still an active proposal under discussion and subject to change. The optional recorded-start extension uses begin to record a start time observed directly by the registry, allowing a cycle record that exactly matches that start to be pinned to the policy version in effect at the start time even if the policy changes afterward.
Things to watch out for
- Records are self-reported: Every cycle record is only a claim made by the subject. The registry guarantees only who submitted what and when, not that the off-chain routine actually ran or that a check actually passed. A FRESH status does not imply health or capability either.
- Commitments do not disclose content: A commitment only binds a document so that it can later be requested for disclosure; it does not reveal the content before disclosure. Content that could be guessed from public information is protected only by a non-zero salt, and a subject may also post a commitment it never intends to disclose.
- Delayed submission can conceal failures: Because freshness is judged based on the reported completion time, submitting late does not make a cycle appear old, but a subject can conceal a failed cycle simply by delaying its submission. The ordering and linkage rules only limit the range that a delayed record can claim.
- Room for manipulation around the timing of policy changes: Because a cycle is interpreted under the policy version in effect at its reported start time, and the submitter chooses that start time, a backdated start placed in the gap between the end of the last approved cycle and the next policy change cannot be fully filtered out. Even within that gap, however, the cycle is still restricted from using layers or triggers that the current version prohibits.
- Risk of operator key leakage: An operator holding report permission can register arbitrary commitments and completion times under the subject's name, within the bounds of the ordering rules. If an operator key is leaked, the entire maintenance record from that point onward is compromised.