{"eip":7857,"title":"AI Agents NFT with Private Metadata","description":"AI agent NFTs, enabling secure management of private metadata with verifiable data transfer","authors":["Ming Wu (@sparkmiw)","Jason Zeng (@zenghbo)","Wei Wu (@Wilbert957)","Michael Heinrich (@michaelomg)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2025-01-02","discussionsTo":"https://ethereum-magicians.org/t/erc-7857-an-nft-standard-for-ai-agents-with-private-metadata/22391","repo":"ERCs","label":"ERC-7857","officialUrl":"https://eips.ethereum.org/EIPS/eip-7857","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7857.md","url":"https://eips.huatuo.xyz/eip-7857/","tldr":{"en":"An NFT standard for AI agents whose valuable metadata (model, memory, persona) stays encrypted off-chain, with TEE or ZK proofs verifying that it was correctly re-encrypted for each new owner.","ja":"価値あるメタデータ（モデル、メモリ、ペルソナ）をオフチェーンで暗号化したまま保つ AI エージェント向けの NFT 標準。TEE または ZK 証明が、新しい所有者向けに正しく再暗号化されたことを検証する。","ko":"가치 있는 메타데이터(모델, 메모리, 페르소나)를 오프체인에서 암호화한 채 유지하는 AI 에이전트용 NFT 표준. TEE 또는 ZK 증명이 새 소유자를 위해 올바르게 재암호화되었음을 검증한다.","zh":"面向 AI 智能体的 NFT 标准，其有价值的元数据（模型、记忆、人设）在链下保持加密，并由 TEE 或 ZK 证明验证其已为每位新所有者正确地重新加密。"},"tags":["nft","ai-agents","privacy","tee","zk"],"explainers":{"en":{"lang":"en","tldr":"An NFT standard for AI agents whose valuable metadata (model, memory, persona) stays encrypted off-chain, with TEE or ZK proofs verifying that it was correctly re-encrypted for each new owner.","tags":["nft","ai-agents","privacy","tee","zk"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7857/","markdown":"## What problem does it solve?\n\nAn NFT can prove who owns something, but its metadata is normally public and static. For an AI agent, the metadata *is* the asset: model weights, memory and character definitions. Publishing it would give it away, and simply moving an [ERC-721](/eip-721/) token does not move the ability to decrypt private data.\n\nERC-7857 defines how to transfer an agent NFT so that:\n\n1. the encrypted data really is handed over and the transfer is verifiable on-chain,\n2. only the new owner can decrypt it, and\n3. an execution environment can check ownership before loading the agent.\n\n## How it works\n\nOnly hashes and sealed keys go on-chain. The actual data is stored encrypted off-chain.\n\n**Verifier.** An on-chain `IERC7857DataVerifier` checks proofs produced by an off-chain *prover*. The proof system can be a Trusted Execution Environment (TEE) or zero-knowledge proofs (ZKP). `verifyTransferValidity` checks that the prover knew the original data, decrypted it with the old key and re-encrypted it with a new key, encrypted that new key to the receiver's public key, that the new ciphertext hashes match, and that the receiver (or their delegated *access assistant*) signed to confirm the data is available in storage.\n\n**Metadata.** `intelligentDataOf(tokenId)` returns a list of `{ dataDescription, dataHash }`.\n\n**NFT operations.**\n\n- `iTransfer(to, tokenId, proofs)`: transfer ownership together with re-encrypted data.\n- `iClone(to, tokenId, proofs)`: give a copy of the data to a new token without giving up the original.\n- `authorizeUsage(tokenId, user)` / `revokeAuthorization`: let someone *use* the agent without seeing its data. This relies on a \"Sealed Executor\" (a trusted party, TEE or FHE) that runs requests on the user's behalf; it is out of scope for the standard.\n- Familiar `approve`, `setApprovalForAll`, `ownerOf`, plus `delegateAccess(assistant)` for signing data-availability confirmations.\n\nEvents include `Transferred`, `Cloned`, `Authorization`, and `PublishedSealedKey`, which carries the new sealed keys for the receiver.\n\n## Sample code\n\nTransferring an agent once the prover has produced proofs (ethers v6; ABI abbreviated):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst agentNft = new Contract(nftAddr, [\n  \"function iTransfer(address to, uint256 tokenId, tuple(tuple(bytes32 oldDataHash, bytes32 newDataHash, bytes nonce, bytes encryptedPubKey, bytes proof) accessProof, tuple(uint8 oracleType, bytes32 oldDataHash, bytes32 newDataHash, bytes sealedKey, bytes encryptedPubKey, bytes nonce, bytes proof) ownershipProof)[] proofs)\",\n  \"function intelligentDataOf(uint256 tokenId) view returns (tuple(string dataDescription, bytes32 dataHash)[])\",\n  \"event PublishedSealedKey(address indexed to, uint256 indexed tokenId, bytes[] sealedKeys)\",\n], signer);\n\n// proofs: one TransferValidityProof per data item, generated off-chain by the TEE/ZK prover\nconst tx = await agentNft.iTransfer(buyer, tokenId, proofs);\nawait tx.wait();\n\nconst data = await agentNft.intelligentDataOf(tokenId); // new data hashes\n```\n\nThe buyer then reads the sealed key from `PublishedSealedKey` and decrypts it with their private key.\n\n## Things to know\n\n- Status is **Final**.\n- It does not inherit ERC-721; implementations may add ERC-721 for marketplace compatibility.\n- TEE and ZKP differ: with ZKP the prover (the sender) knows the re-encryption key, so the new owner should re-encrypt on the next update or the previous owner can still read it.\n- Security rests heavily on the off-chain prover, storage and Sealed Executor, none of which the standard defines. Verify replay protection and proof checks carefully.\n- Usage authorization does not reveal the data to the user; it only works if a trustworthy executor enforces it.\n"},"ja":{"lang":"ja","tldr":"価値あるメタデータ（モデル、メモリ、ペルソナ）をオフチェーンで暗号化したまま保つ AI エージェント向けの NFT 標準。TEE または ZK 証明が、新しい所有者向けに正しく再暗号化されたことを検証する。","tags":["nft","ai-agents","privacy","tee","zk"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7857/","markdown":"## 何を解決するのか\n\nNFT は誰が何を所有しているかを証明できますが、そのメタデータは通常、公開されていて静的です。AI エージェントの場合、メタデータこそが資産です。モデルの重み、メモリ、キャラクター定義がそれにあたります。これを公開すれば手放すことになり、また [ERC-721](/eip-721/) トークンを動かすだけでは、プライベートなデータを復号する能力は移りません。\n\nERC-7857 は、次のようになるようにエージェント NFT を移転する方法を定義します。\n\n1. 暗号化されたデータが確かに引き渡され、その移転がオンチェーンで検証できる。\n2. 新しい所有者だけが復号できる。\n3. 実行環境が、エージェントを読み込む前に所有権を確認できる。\n\n## 仕組み\n\nオンチェーンに置かれるのはハッシュと封印された鍵だけです。実際のデータは暗号化してオフチェーンに保存されます。\n\n**Verifier。** オンチェーンの `IERC7857DataVerifier` が、オフチェーンの*プルーバー*が作った証明を検証します。証明方式には、Trusted Execution Environment（TEE）またはゼロ知識証明（ZKP）を使えます。`verifyTransferValidity` は、プルーバーが元のデータを知っていたこと、古い鍵で復号して新しい鍵で再暗号化したこと、その新しい鍵を受信者の公開鍵で暗号化したこと、新しい暗号文のハッシュが一致すること、そして受信者（またはその委任された*アクセスアシスタント*）がデータがストレージで利用可能であることを確認する署名をしたことを検証します。\n\n**メタデータ。** `intelligentDataOf(tokenId)` は `{ dataDescription, dataHash }` のリストを返します。\n\n**NFT の操作。**\n\n- `iTransfer(to, tokenId, proofs)`: 再暗号化されたデータとともに所有権を移転します。\n- `iClone(to, tokenId, proofs)`: 元を手放さずに、新しいトークンへデータのコピーを渡します。\n- `authorizeUsage(tokenId, user)` / `revokeAuthorization`: データを見せずに、誰かにエージェントを*使わせる*ことができます。これは、ユーザーに代わってリクエストを実行する「Sealed Executor」（信頼できる主体、TEE、または FHE）に依存しており、標準の対象外です。\n- おなじみの `approve`、`setApprovalForAll`、`ownerOf` に加え、データ可用性の確認署名のための `delegateAccess(assistant)` があります。\n\nイベントには `Transferred`、`Cloned`、`Authorization`、そして受信者向けの新しい封印鍵を運ぶ `PublishedSealedKey` があります。\n\n## サンプルコード\n\nプルーバーが証明を作成した後にエージェントを移転する例（ethers v6、ABI は省略形）:\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst agentNft = new Contract(nftAddr, [\n  \"function iTransfer(address to, uint256 tokenId, tuple(tuple(bytes32 oldDataHash, bytes32 newDataHash, bytes nonce, bytes encryptedPubKey, bytes proof) accessProof, tuple(uint8 oracleType, bytes32 oldDataHash, bytes32 newDataHash, bytes sealedKey, bytes encryptedPubKey, bytes nonce, bytes proof) ownershipProof)[] proofs)\",\n  \"function intelligentDataOf(uint256 tokenId) view returns (tuple(string dataDescription, bytes32 dataHash)[])\",\n  \"event PublishedSealedKey(address indexed to, uint256 indexed tokenId, bytes[] sealedKeys)\",\n], signer);\n\n// proofs: one TransferValidityProof per data item, generated off-chain by the TEE/ZK prover\nconst tx = await agentNft.iTransfer(buyer, tokenId, proofs);\nawait tx.wait();\n\nconst data = await agentNft.intelligentDataOf(tokenId); // new data hashes\n```\n\nその後、買い手は `PublishedSealedKey` から封印鍵を読み取り、自分の秘密鍵で復号します。\n\n## 知っておくべきこと\n\n- ステータスは **Final** です。\n- ERC-721 を継承しません。マーケットプレイスとの互換性のために、実装が ERC-721 を追加してもかまいません。\n- TEE と ZKP は異なります。ZKP ではプルーバー（送信者）が再暗号化の鍵を知っているため、新しい所有者は次の更新時に再暗号化すべきで、そうしないと以前の所有者がまだ読めてしまいます。\n- セキュリティは、オフチェーンのプルーバー、ストレージ、Sealed Executor に大きく依存しており、標準はそのどれも定義していません。リプレイ対策と証明のチェックを慎重に確認してください。\n- 使用権限の付与は、ユーザーにデータを見せるものではありません。信頼できる executor がそれを強制する場合にのみ機能します。\n"},"ko":{"lang":"ko","tldr":"가치 있는 메타데이터(모델, 메모리, 페르소나)를 오프체인에서 암호화한 채 유지하는 AI 에이전트용 NFT 표준. TEE 또는 ZK 증명이 새 소유자를 위해 올바르게 재암호화되었음을 검증한다.","tags":["nft","ai-agents","privacy","tee","zk"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7857/","markdown":"## 어떤 문제를 해결하나요?\n\nNFT는 누가 무언가를 소유하는지 증명할 수 있지만, 메타데이터는 보통 공개되어 있고 정적입니다. AI 에이전트의 경우 메타데이터가 곧 자산입니다. 모델 가중치, 메모리, 캐릭터 정의가 그렇습니다. 이를 공개하면 넘겨주는 셈이고, [ERC-721](/eip-721/) 토큰을 옮기는 것만으로는 비공개 데이터를 복호화하는 능력이 옮겨지지 않습니다.\n\nERC-7857은 다음이 성립하도록 에이전트 NFT를 이전하는 방법을 정의합니다.\n\n1. 암호화된 데이터가 실제로 인계되고 그 이전을 온체인에서 검증할 수 있다.\n2. 새 소유자만 복호화할 수 있다.\n3. 실행 환경이 에이전트를 불러오기 전에 소유권을 확인할 수 있다.\n\n## 어떻게 동작하나요?\n\n온체인에는 해시와 봉인된 키만 올라갑니다. 실제 데이터는 암호화되어 오프체인에 저장됩니다.\n\n**Verifier.** 온체인의 `IERC7857DataVerifier`가 오프체인 *prover*가 만든 증명을 검사합니다. 증명 시스템은 신뢰 실행 환경(TEE) 또는 영지식 증명(ZKP)일 수 있습니다. `verifyTransferValidity`는 prover가 원본 데이터를 알고 있었는지, 이전 키로 복호화해 새 키로 재암호화했는지, 그 새 키를 수신자의 공개키로 암호화했는지, 새 암호문의 해시가 일치하는지, 그리고 수신자(또는 그가 위임한 *접근 어시스턴트*)가 데이터가 스토리지에서 이용 가능함을 확인하는 서명을 했는지를 검사합니다.\n\n**메타데이터.** `intelligentDataOf(tokenId)`는 `{ dataDescription, dataHash }` 목록을 반환합니다.\n\n**NFT 연산.**\n\n- `iTransfer(to, tokenId, proofs)`: 재암호화된 데이터와 함께 소유권을 이전합니다.\n- `iClone(to, tokenId, proofs)`: 원본을 포기하지 않고 새 토큰에 데이터 사본을 줍니다.\n- `authorizeUsage(tokenId, user)` / `revokeAuthorization`: 데이터를 보여 주지 않고 누군가가 에이전트를 *사용*하게 합니다. 이는 사용자를 대신해 요청을 실행하는 \"Sealed Executor\"(신뢰할 수 있는 주체, TEE 또는 FHE)에 의존하며, 표준의 범위 밖입니다.\n- 익숙한 `approve`, `setApprovalForAll`, `ownerOf`, 그리고 데이터 가용성 확인 서명을 위한 `delegateAccess(assistant)`가 있습니다.\n\n이벤트에는 `Transferred`, `Cloned`, `Authorization`, 그리고 수신자를 위한 새 봉인 키를 담는 `PublishedSealedKey`가 있습니다.\n\n## 샘플 코드\n\nprover가 증명을 만든 뒤 에이전트를 이전하기(ethers v6, ABI는 축약):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst agentNft = new Contract(nftAddr, [\n  \"function iTransfer(address to, uint256 tokenId, tuple(tuple(bytes32 oldDataHash, bytes32 newDataHash, bytes nonce, bytes encryptedPubKey, bytes proof) accessProof, tuple(uint8 oracleType, bytes32 oldDataHash, bytes32 newDataHash, bytes sealedKey, bytes encryptedPubKey, bytes nonce, bytes proof) ownershipProof)[] proofs)\",\n  \"function intelligentDataOf(uint256 tokenId) view returns (tuple(string dataDescription, bytes32 dataHash)[])\",\n  \"event PublishedSealedKey(address indexed to, uint256 indexed tokenId, bytes[] sealedKeys)\",\n], signer);\n\n// proofs: one TransferValidityProof per data item, generated off-chain by the TEE/ZK prover\nconst tx = await agentNft.iTransfer(buyer, tokenId, proofs);\nawait tx.wait();\n\nconst data = await agentNft.intelligentDataOf(tokenId); // new data hashes\n```\n\n이후 구매자는 `PublishedSealedKey`에서 봉인된 키를 읽고 자신의 개인키로 복호화합니다.\n\n## 알아둘 점\n\n- 상태는 **Final**입니다.\n- ERC-721을 상속하지 않습니다. 마켓플레이스 호환을 위해 구현체가 ERC-721을 추가할 수 있습니다.\n- TEE와 ZKP는 다릅니다. ZKP에서는 prover(발신자)가 재암호화 키를 알고 있으므로, 새 소유자는 다음 업데이트 때 재암호화해야 하며 그러지 않으면 이전 소유자가 여전히 읽을 수 있습니다.\n- 보안은 오프체인 prover, 스토리지, Sealed Executor에 크게 의존하며, 표준은 그중 어느 것도 정의하지 않습니다. 리플레이 방지와 증명 검사를 신중하게 확인하세요.\n- 사용 권한 부여가 사용자에게 데이터를 공개하는 것은 아닙니다. 신뢰할 수 있는 executor가 이를 강제할 때만 동작합니다.\n"},"zh":{"lang":"zh","tldr":"面向 AI 智能体的 NFT 标准，其有价值的元数据（模型、记忆、人设）在链下保持加密，并由 TEE 或 ZK 证明验证其已为每位新所有者正确地重新加密。","tags":["nft","ai-agents","privacy","tee","zk"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7857/","markdown":"## 它解决什么问题？\n\nNFT 可以证明谁拥有某样东西，但其元数据通常是公开且静态的。对 AI 智能体来说，元数据*就是*资产：模型权重、记忆和角色定义。公开它就等于送出去了，而仅仅转移一个 [ERC-721](/eip-721/) 代币，并不会转移解密私有数据的能力。\n\nERC-7857 定义了如何转移智能体 NFT，使得：\n\n1. 加密数据确实被交接，且转移可在链上验证；\n2. 只有新所有者能够解密；\n3. 执行环境在加载智能体之前可以检查所有权。\n\n## 它如何运作\n\n链上只存放哈希和密封密钥。真正的数据加密后存储在链下。\n\n**验证器。** 链上的 `IERC7857DataVerifier` 检查由链下*证明者*生成的证明。证明系统可以是可信执行环境（TEE）或零知识证明（ZKP）。`verifyTransferValidity` 检查：证明者知道原始数据，用旧密钥解密并用新密钥重新加密，把这个新密钥加密给接收者的公钥，新密文的哈希相匹配，并且接收者（或其委托的*访问助手*）签名确认数据在存储中可用。\n\n**元数据。** `intelligentDataOf(tokenId)` 返回一个由 `{ dataDescription, dataHash }` 组成的列表。\n\n**NFT 操作。**\n\n- `iTransfer(to, tokenId, proofs)`：连同重新加密的数据一起转移所有权。\n- `iClone(to, tokenId, proofs)`：在不放弃原件的情况下，把数据副本交给一个新代币。\n- `authorizeUsage(tokenId, user)` / `revokeAuthorization`：让某人*使用*智能体而不看到其数据。这依赖一个\"Sealed Executor\"（可信方、TEE 或 FHE）代表用户运行请求，不在该标准的范围内。\n- 常见的 `approve`、`setApprovalForAll`、`ownerOf`，以及用于签署数据可用性确认的 `delegateAccess(assistant)`。\n\n事件包括 `Transferred`、`Cloned`、`Authorization` 和 `PublishedSealedKey`，后者携带为接收者准备的新密封密钥。\n\n## 示例代码\n\n证明者生成证明后转移智能体（ethers v6；ABI 已缩写）：\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst agentNft = new Contract(nftAddr, [\n  \"function iTransfer(address to, uint256 tokenId, tuple(tuple(bytes32 oldDataHash, bytes32 newDataHash, bytes nonce, bytes encryptedPubKey, bytes proof) accessProof, tuple(uint8 oracleType, bytes32 oldDataHash, bytes32 newDataHash, bytes sealedKey, bytes encryptedPubKey, bytes nonce, bytes proof) ownershipProof)[] proofs)\",\n  \"function intelligentDataOf(uint256 tokenId) view returns (tuple(string dataDescription, bytes32 dataHash)[])\",\n  \"event PublishedSealedKey(address indexed to, uint256 indexed tokenId, bytes[] sealedKeys)\",\n], signer);\n\n// proofs: one TransferValidityProof per data item, generated off-chain by the TEE/ZK prover\nconst tx = await agentNft.iTransfer(buyer, tokenId, proofs);\nawait tx.wait();\n\nconst data = await agentNft.intelligentDataOf(tokenId); // new data hashes\n```\n\n随后买家从 `PublishedSealedKey` 读取密封密钥，并用自己的私钥解密。\n\n## 需要注意\n\n- 状态为 **Final**。\n- 它不继承 ERC-721；实现为了兼容市场可以加入 ERC-721。\n- TEE 和 ZKP 不同：使用 ZKP 时证明者（即发送者）知道重新加密的密钥，因此新所有者应在下一次更新时重新加密，否则前任所有者仍然可以读取。\n- 安全性在很大程度上取决于链下的证明者、存储和 Sealed Executor，而该标准对这些都没有定义。请仔细核实重放保护和证明检查。\n- 使用授权并不会向用户透露数据；只有在可信的执行者强制执行时才有效。\n"}}}
