ERC-8217 Binding agent NFT identity (Agent NFT Identity Bindings)

Draft · NFTs & multi-token · created 2026-04-05

This standard links an ERC-8004 agent registration to an external object such as an NFT or account, so that whoever holds the NFT also owns and can transfer that agent identity.

Why it is needed

An ERC-8004 registration is itself an NFT. To have an existing NFT, such as a project, character, or collection (a master NFT), own an agent registration, the two NFTs must be linked to each other. Without this link, transferring the master NFT to someone else does not carry the ERC-8004 identity along with it; it stays with the original owner. In other words, even if a character or collection is traded, the agent's credentials or reputation record remain separate and the new owner cannot control them. This standard records, in a single standard contract per chain, which master NFT controls which agent id, so that control automatically follows when the master NFT changes hands.

What to implement

In depth

The IERC8217 interface and the Standard enum

The binding contract stores a Binding struct (standard, boundAddress, tokenId) per agentId and returns it via bindingOf. Standard has eight values: ERC721, ERC1155, ERC6909, ERC1155F, ERC6909F, ACCOUNT, CONTRACT_OWNABLE, and CONTRACT_ADMIN, and since it is part of the binding hash, existing values must not be renumbered, reordered, or deleted. ACCOUNT, CONTRACT_OWNABLE, and CONTRACT_ADMIN are bound to the address itself rather than a token, so tokenId is not used and must be 0. Since tokenId is included in the hash, using a nonzero value would give the same bound address multiple different identifiers.

Metadata record format

Bindings are stored as ERC-8004 on-chain metadata records. The key must be agent-binding, and the value must contain the standard binding contract address for that chain in exactly 20 bytes. It is stored without padding using abi.encodePacked rather than abi.encode, so it is 20 bytes rather than 32. agent-binding is treated as a reserved key and must be protected from being overwritten by untrusted callers.

Deployment model: one singleton per chain

A binding contract conforming to this standard must be deployed as exactly one standard singleton per chain. standard, boundAddress, and tokenId must be obtained only through this contract's bindingOf.

Binding immutability

Once agent-binding is recorded for a given agentId, the stored binding contract address and the Binding value returned by bindingOf(agentId) must not change afterward. This allows clients and indexers to keep relying on a binding result they have already verified once, without cache invalidation.

Computing bindingHashOf and the UBID

bindingHashOf(agentId) returns keccak256(ABI_ENCODE(bytes bindingContractInteroperableAddress, uint8 standard, address boundAddress, uint256 tokenId)). The four values are encoded as a (bytes,uint8,address,uint256) tuple using abi.encode style encoding (packed encoding is prohibited), then hashed with keccak256. bindingContractInteroperableAddress must be the full ERC-7930 Interoperable Address on the chain where the binding contract is located, and must not be pre-hashed. Since this hash is a pure function of just these four values, it can also be computed off-chain, and it is also called the Universal Binding Identifier (UBID).

Why multiple Standards are needed

The ways in which control over an ERC-8004 agent identity can be exercised take multiple forms, and each Standard value points to a different set of authorization rules. Even the same address can satisfy multiple rules at once, so the bound address alone cannot tell which rule applies; Standard explicitly records that choice.

Why a binding hash is needed

In many cases the bound object (e.g., an NFT collection) is the agent's primary identity, and the ERC-8004 registration is incidental to it. The preimage of the binding hash does not include the agent id or registry address, so a single bound object retains one identifier regardless of how many registrations are bound to it. The Binding itself is useful for discovery (finding the address and token id), but as an identifier the single 32-byte value from bindingHashOf is more useful, letting reputation systems and the like key on this value instead of individual registrations. The authorization rule (standard) is also part of what is being identified and so is included in the hash, meaning the same address bound as ACCOUNT versus CONTRACT_OWNABLE receives different identifiers.

Recent interface changes and Draft status

Four things have recently changed in this standard. tokenContract in the Binding struct and the AgentBound event was renamed to boundAddress, TokenStandard was renamed to Standard with its values increasing from 3 to 8, and the bindingHashOf function and the UnknownAgent error were newly added. The current status is Draft, a proposal that may still change or stall.

Things to watch out for

Original ERC · ← ERCs