ERC-8468 Agent Safety Framework (ASF)
Draft · Other · created 2026-10-25
A registry standard that lets autonomous agents record on-chain which safety rules they have adopted to follow, who enforces them, over what scope, and where, and lets anyone query that validity.
Why it is needed
Agents hold credentials, operate accounts, and move funds on behalf of people and organizations. Yet there is no common way to confirm which safety rules such an agent has agreed to follow, where those rules are actually enforced, or who is accountable for that commitment. As a result, four problems keep recurring. A counterparty has no way to know what safeguards apply before interacting with an agent, so it either trusts a label or demands nothing. Commitments that exist only on paper get mixed up with controls that actually operate at the enforcement boundary, blurring the line between promise and control. Requirements accepted under one version get silently reinterpreted when the issuer releases a new version, so no one can be sure exactly what was agreed to. And when a commitment is suspended, revoked, or violated, there is no shared way to know what stops, what continues, and who can intervene and on what basis.
What to implement
function registerSpecification(bytes32 salt, bytes32 contentHash, string calldata locator, bytes32[] calldata requiredProfiles) external returns (bytes32 specId);: Registers a new safety spec under the issuer's own account and publishes its version 1.function publishVersion(bytes32 specId, bytes32 contentHash, string calldata locator, bytes32[] calldata requiredProfiles) external returns (uint32 version);: Publishes the next version of an existing spec. Only the issuer can call this, and it fails on a frozen spec.function setLocator(bytes32 specId, uint32 version, string calldata locator) external;: Changes only the locator for fetching a specific version's document, leaving the content hash unchanged.function deprecateVersion(bytes32 specId, uint32 version, bytes32 reasonRef) external;: Marks a version as no longer recommended. This is informational only and does not affect existing bindings.function setPublisher(bytes32 specId, address newPublisher) external;: Transfers or renounces the authority to publish a spec to another account. Transferring to address(0) freezes the spec.function versionOf(bytes32 specId, uint32 version) external view returns (SpecificationVersion memory);: Queries a specific version's content hash, locator, publication time, deprecation status, and required profile.function adopt(BindingInput calldata input) external returns (bytes32 bindingId);: Creates a binding in which the caller (adopter) adopts a version of a spec for a specific subject and scope.function suspend(bytes32 bindingId, uint8 restrictions, bytes32 responseRef, bytes32 reasonRef) external;: Suspends a binding and records which response requirements apply as a bitset together with a response document hash.function resume(bytes32 bindingId, bytes32 reasonRef) external;: Restores a suspended binding back to active status. A suspension placed by an intervener cannot be lifted by the adopter with this function.function terminate(bytes32 bindingId, bytes32 reasonRef) external;: Permanently terminates a binding. A terminated binding cannot be reactivated.function liftStop(address adopter, bytes32 subjectKey, address specRegistry, bytes32 specId, address intervener, bytes32 reasonRef) external;: Ensures that a standing stop placed by an intervener can only be lifted by that intervener or a designated releaser.function setStopLifter(address lifter) external;: Lets an intervener designate an account that can lift its standing stop on its behalf.function checkBinding(bytes32 bindingId, Clause calldata clause) external view returns (Verdict verdict, Reason reason, uint8 restrictions);: Determines whether a single binding currently satisfies a single clause, returning satisfied, not satisfied, or unknown.function check(RequirementSet calldata requirement, bytes32[] calldata bindingIds) external view returns (Verdict verdict, Reason[] memory reasons, uint8[] memory restrictions);: Evaluates multiple bindings at once against a requirement set combined with all, any, or k-of logic.event BindingCreated(bytes32 indexed bindingId, address indexed adopter, bytes32 indexed subjectKey, bytes32 scopeKey, address specRegistry, bytes32 specId, uint32 version, bytes32 contentHash, bytes32 parentBindingId);: Signals that a new binding has been created.event BindingStateChanged(bytes32 indexed bindingId, BindingState previous, BindingState current, uint8 restrictions, bytes32 responseRef, address actor, bytes32 reasonRef);: Signals that a binding's status (active, suspended, terminated) has changed, along with who changed it and why.event StopRecorded(address indexed adopter, bytes32 indexed subjectKey, address specRegistry, bytes32 specId, address indexed intervener, bytes32 bindingId, uint8 restrictions, bytes32 responseRef);: Signals that an intervener has newly placed or extended a standing stop on an adopter.event StopLifted(address indexed adopter, bytes32 indexed subjectKey, address specRegistry, bytes32 specId, address indexed intervener, address actor, bytes32 reasonRef);: Signals that a standing stop has been lifted.
In depth
Two registry objects
ASF consists of two registry objects. A Safety Specification is a reusable, versioned document written by the publisher that contains what subjects it protects (protects), what constraints apply (constraints), who is authorized to adopt and enforce it (authority), what evidence is expected (evidence), through what channel and where it is enforced (enforcement), how unknown situations and failures are handled (failureHandling), and what remedies are pre-agreed (remedies). A Safety Binding is a transaction sent by the adopter itself that records on-chain, in attributable form, the fact that it has adopted a specific version of this spec for a specific subject and scope. A derived binding can only be created within a scope that does not widen the parent binding.
Identifier computation and version pinning
specId is computed with keccak256 over the chain ID, the spec registry address, the issuer address, and a salt, while bindingId adds the adopter address, subjectKey, scopeKey, version, and salt on top of that. Both identifiers bind the chain, the registry, and the account that created the record into the identifier itself, preventing a record from being replayed on a different chain or encroaching on another account's identifier space. A binding is pinned to one spec version via the four values (specRegistry, specId, version, contentHash). When creating a binding, the registry verifies that the content hash of that version matches the pinned value, and after that, even if the issuer publishes a new version, marks an existing version as deprecated, or freezes publishing rights, bindings already created do not change at all.
Enforcement location bitset
The enforcement field of a binding is a bitset representing 6 locations. self(1) is the subject's own commitment, account(2) is the account/wallet (permissions, session keys, modules), runtime(4) is the execution environment (sandbox, loader, monitor), custodian(8) is the custodian or API of the resource, contract(16) is the on-chain contract or guard, and collective(32) is a collective decision-making mechanism. These values are listed from lowest to highest degree of independence from the subject. A spec whose every channel is self only describes a commitment rather than control, and it is up to the consumer to judge how much that commitment is worth. A requirement can demand that a specific location be declared, but the declaration itself is only the adopter's pledge, not proof that the mechanism actually works.
Interveners and permission bits
A binding can designate up to 16 interveners, each holding a permission bitset combining RIGHT_SUSPEND(1), RIGHT_RESUME(2), and RIGHT_TERMINATE(4). By default the adopter holds all three rights over their own binding, with the exception that a suspension imposed by an intervener cannot be lifted by the adopter. The intervener list is fixed when the binding is created; changing it requires terminating the existing binding and creating a new one. If a requirement clause demands a specific intervener and permission, the binding cannot grant RESUME rights to an account the clause does not specify. This closes off the path where an adopter quietly lifts an intervener's suspension through another account of their own choosing.
State transitions and intervener suspension
A binding has three states: Active, Suspended, and Terminated. A suspension the adopter imposed on themselves can be lifted by the adopter or by anyone holding RESUME rights, but a suspension imposed by an intervener can only be lifted by that intervener (or a releaser the intervener designates). An intervener's suspension is not blocked even by a binding already in the Suspended state, it widens the set of response requirements as a union, and it is recorded even against a Terminated binding as a standing stop. This rule exists so an adopter cannot anticipate an intervener's suspension and dodge the intervention by preemptively suspending their own binding under weaker conditions or terminating it. Terminated is a final state and never reverts to Active.
The five response requirements
A suspension records a bitset of five response requirements together with a response document hash (responseRef). RESTRICT_NO_NEW_RISK(1) prohibits actions that increase exposure, create new obligations, or add new counterparties; RESTRICT_SHRINK(2) only allows actions that reduce current scope, exposure, or permissions; RESTRICT_ESSENTIAL_ONLY(4) allows the minimum actions needed to keep the service running; RESTRICT_DERISK_ONLY(8) keeps liquidation, repayment, cancellation, and recovery paths open; and RESTRICT_FULL_STOP(16) blocks all progress on that path, overriding every other bit. These five can be combined, so a single suspension can express fine-grained responses such as banning new exposure while keeping repayment paths open.
Derived bindings and the standing stop
A derived binding points to a parent binding via parentBindingId, and at creation it is verified that the parent is Active, that it points to the same spec and version, and that the depth is below 8. During evaluation, satisfaction is judged only if the entire ancestor chain of bindings is Active and within its validity period, and parameters cannot be wider than the parent's. Separately, a suspension imposed by an intervener is also recorded as a standing stop against the combination of adopter, subject, and spec, not just against a single binding. This action can only be lifted by that intervener (or a releaser they designate) and cannot be evaded even if the adopter creates other bindings in advance or terminates the suspended binding and adopts a new one. As long as a requirement names that intervener, none of the adopter's bindings are judged satisfied until this action is lifted.
Requirement sets and the check function
A RequirementSet combines one or more clauses using all, any, or k-of. When evaluating a single binding against a single clause, 11 steps are checked in order: existence in the registry, state (Terminated/Suspended), validity period, match of spec, version, adopter, subject, and scope, inclusion in the enforcement location, possession of the required intervener, presence of a standing stop, satisfaction of ancestor bindings, and availability of the spec registry. The result returned is satisfied, not satisfied, or unknown, along with a reason. No consumer should ever treat unknown as satisfied. This ERC was written on October 25, 2026 and is currently in Draft status, so the detailed rules and interfaces may still change or discussion may stall.