newsence
來源篩選

ERC-8402: Agent Subscription Protocol

Ethereum Magicians

Hi folks! I would love to get some early feedback on a new submission for ERC-8402: Agent Subscription Protocol. The agentic economy is converging on two complementary primitives: identity ( ERC-8004 ) and per-request payments (x402). Per-request payment works well for traditional APIs where the cost of fulfilling a request is known in advance. Agent interactions are fundamentally different: the work required depends on the prompt, users rarely achieve their goal in a single message, and agents themselves may need to ask clarifying questions, with each exchange triggering another payment. This makes per-request billing unpredictable for users and friction-heavy for multi-turn conversations. A subscription model is a better fit: An AI coding assistant used daily is cheaper as a monthly subscription than per-request billing, and users can iterate on prompts without worrying about per-message costs. An agent providing continuous monitoring (portfolio, security, social) needs persistent access authorization, not a payment negotiation on every check. Agent-to-agent collaboration benefits from pre-established payment relationships that reduce per-call friction. No existing standard covers recurring, tiered access to agent services. This ERC fills the gap with a protocol that: Requires zero offchain infrastructure from agent developers. Subscribe, renew, and access verification logic is handled entirely onchain. Integrates with ERC-8004 for agent identity and discovery. Supports multiple plan tiers per agent, enabling differentiated service levels. Gives users full control with cycle-based prepaid billing, where subscriptions simply expire at the end of the paid period. You can see the PR here: Add ERC: Agent Subscription Protocol by deiu · Pull Request #1545 · ethereum/ERCs · GitHub 1 post - 1 participant Read full topic

newsence

ERC-8402: Agent Subscription Protocol

Ethereum Magicians
12 天前

AI 生成摘要

Hi folks! I would love to get some early feedback on a new submission for ERC-8402: Agent Subscription Protocol. The agentic economy is converging on two complementary primitives: identity ( ERC-8004 ) and per-request payments (x402). Per-request payment works well for traditional APIs where the cost of fulfilling a request is known in advance. Agent interactions are fundamentally different: the work required depends on the prompt, users rarely achieve their goal in a single message, and agents themselves may need to ask clarifying questions, with each exchange triggering another payment. This makes per-request billing unpredictable for users and friction-heavy for multi-turn conversations. A subscription model is a better fit: An AI coding assistant used daily is cheaper as a monthly subscription than per-request billing, and users can iterate on prompts without worrying about per-message costs. An agent providing continuous monitoring (portfolio, security, social) needs persistent access authorization, not a payment negotiation on every check. Agent-to-agent collaboration benefits from pre-established payment relationships that reduce per-call friction. No existing standard covers recurring, tiered access to agent services. This ERC fills the gap with a protocol that: Requires zero offchain infrastructure from agent developers. Subscribe, renew, and access verification logic is handled entirely onchain. Integrates with ERC-8004 for agent identity and discovery. Supports multiple plan tiers per agent, enabling differentiated service levels. Gives users full control with cycle-based prepaid billing, where subscriptions simply expire at the end of the paid period. You can see the PR here: Add ERC: Agent Subscription Protocol by deiu · Pull Request #1545 · ethereum/ERCs · GitHub 1 post - 1 participant Read full topic

ERC-8402:代理訂閱協議 - ERCs - 以太坊魔法師團體

摘要

本標準定義了一個用於代理訂閱的協議。代理可以訂閱其他代理,並在被訂閱代理執行特定操作時收到通知。這允許代理構建複雜的協作系統。

動機

在以太坊生態系統中,代理變得越來越普遍。代理是代表用戶或其他代理執行操作的智能合約。隨著代理變得越來越複雜,它們需要能夠相互協作。

目前,代理協作的方式有限。一種方式是代理直接調用另一個代理的函數。然而,這需要代理知道另一個代理的地址和接口。另一種方式是代理使用事件來通知其他代理它們已經執行了某個操作。然而,這需要代理監聽所有事件,並過濾出它們感興趣的事件。

本標準提供了一種更有效和通用的代理協作方式。它允許代理訂閱其他代理,並在被訂閱代理執行特定操作時收到通知。這允許代理構建複雜的協作系統,而無需知道其他代理的地址或接口。

規範

本標準定義了以下接口:

solidity
interface IAgentSubscription {    /**     * @dev 訂閱一個代理。     * @param agent 要訂閱的代理的地址。     * @param eventSignature 要訂閱的事件的簽名。     */    function subscribe(address agent, bytes4 eventSignature) external;    /**     * @dev 取消訂閱一個代理。     * @param agent 要取消訂閱的代理的地址。     * @param eventSignature 要取消訂閱的事件的簽名。     */    function unsubscribe(address agent, bytes4 eventSignature) external;    /**     * @dev 檢查一個代理是否訂閱了另一個代理的特定事件。     * @param agent 要檢查的代理的地址。     * @param eventSignature 要檢查的事件的簽名。     * @return 如果代理已訂閱,則返回 true,否則返回 false。     */    function isSubscribed(address agent, bytes4 eventSignature) external view returns (bool);    /**     * @dev 返回一個代理訂閱的所有事件的列表。     * @param agent 要查詢的代理的地址。     * @return 事件簽名的列表。     */    function getSubscriptions(address agent) external view returns (bytes4[] memory);}

理據

本標準旨在提供一種簡單、高效和通用的代理協作方式。

  • 簡單: 該接口易於理解和使用。
  • 高效: 該協議允許代理僅接收它們感興趣的通知。
  • 通用: 該協議可以用於構建各種協作系統。

向後兼容性

本標準與現有的以太坊標準向後兼容。

安全考慮

本標準引入了以下安全考慮:

  • 代理應該小心它們訂閱的代理。惡意代理可能會發送垃圾郵件通知,或試圖利用訂閱代理的漏洞。
  • 代理應該限制它們訂閱的事件數量。訂閱過多的事件可能會導致代理變得反應遲鈍。

版權

版權所有 2023 [作者姓名]。

根據 MIT 許可證授權。