Scan to Download Gate App
qrCode
More Download Options
Don't remind me again today

DeAI protocol stack disassembly - X402 / ERC 8004 / A2A

null Article Author: Jay Yu

Article compiled by: Block unicorn

Foreword

Today, we are witnessing the gradual construction of a “network protocol stack” for decentralized artificial intelligence (deAI). Just as the internet operates on a series of interoperable standards—TCP/IP for the transport layer, DNS for the service discovery layer, and HTTP for application logic—we can also break down the deAI protocol stack into these three modules: x402 for the application layer, ERC 8004 for the service discovery layer, and A2A for the transport layer—all of which run on top of the traditional HTTP network protocol stack.

In summary, the deAI protocol stack defines how agents pay fees, discover resources, and communicate with each other. Now, let's analyze each part one by one:

  1. Application Layer - x402

At the top of the decentralized artificial intelligence (deAI) protocol stack is x402, which represents the application layer protocol for payments between agents for various services (such as file storage, e-commerce, web scraping, etc.). x402 is built by Coinbase and Cloudflare, fundamentally extending the original “HTTP 402: Payment Required” status code to become part of the workflow, allowing agents to pay service fees using stablecoins.

I have previously written a detailed article about x402, titled “The Modern Transformation of HTTP 402,” which includes its vision, architecture, opportunities, and challenges.

Fundamentally, x402 operates through a tripartite agreement that consists of three parts: Client requests resources → Server returns 402 status code → Payment facilitator verifies the client’s payment authorization and actually transfers the funds (for example, submitting an on-chain signed transaction). Only after completing these steps will the server unlock premium content.

Today, x402scan may be one of the best resources to observe the performance of the x402 server in actual operation. While x402 will greatly benefit micropayments for quality content (such as web scraping, paid articles, and computing resources) in the long run, its recent rise (which can be clearly seen through x402scan) is largely attributed to a series of meme coins, such as… $PING—these coins require payment through x402 to mint along the bond curve.

Nevertheless, x402 is still a great example of an application layer standard in the emerging decentralized artificial intelligence (deAI) protocol stack. Just as the “application layer” in traditional network protocol stacks contains numerous protocols (such as HTTP, FTP, SMTP, VoIP, etc.), we can also expect more application layer standards to emerge in the future.

  1. Discovery Layer - ERC 8004

When using x402, a common question that arises is: how do people discover what services are available? This is where the ERC 8004, developed under the leadership of the Ethereum Foundation, plays a role in the “discovery layer.”

Just as DNS maps domain names to IP addresses (google.com → 8.8.8.8), ERC 8004 solves the discovery problem of AI agents by creating an on-chain registry that maps agent IDs to various links and functionalities of the agents. ERC 8004 uses “agent cards” as identity identifiers for agents and provides additional features such as reputation scoring and verification.

ERC 8004 is built on top of ERC721 (NFT) and URIStorage. It includes parameters such as Name, A2A, MCP, OASF, ENS, DID, and supported trust types (e.g., reputation, cryptoeconomics, TEE proof). All these different parameters point to various agent ID standards, thereby providing a more comprehensive representation of the agent's capabilities.

I believe that ERC 8004, as the development trajectory of the deAI discovery layer, will be similar to DNS in the Internet protocol stack - there is a general protocol that everyone will refer to, but it will redirect users to various peer nodes (here referring to different proxy card links) for more specific information regarding any given query.

  1. Transport Layer - A2A Protocol

At this point, we have introduced the application layer and the discovery layer. The final component of the protocol stack is the transport layer - it is responsible for handling how applications communicate with each other after completing discovery through protocols like ERC 8004. For traditional internet network protocol stacks, the TCP/IP protocol is responsible for transmitting network packets from the client to the server. For the decentralized artificial intelligence (deAI) protocol stack, Google recently launched the A2A protocol, which is specifically designed for communication between agents.

Communication between the client agent (A2A client) and the remote agent (A2A server) is conducted via HTTPS using JSON-RPC 2.0. Essentially, the two agents “talk” to each other by accessing their respective HTTP endpoints and requesting computations or various functions. A2A also specifies that each agent has an agent card for publishing information about its functionalities, frameworks, MCP attachments, and more.

In the A2A protocol, after the client and the remote agent mutually confirm, the client will check the agent card to obtain the HTTP endpoint and request the corresponding service. The remote agent will utilize its MCP tools, computing resources, etc., and will send asynchronous updates during the task processing (similar to the “thinking process” in inference models). Finally, it will send the final response and artifacts.

I would like to recommend an excellent introductory article from IBM titled “What is A2A protocol (Agent2Agent)?”.

Taking all factors into account…

Considering factors such as x402, 8004, and A2A, we can refer to the demonstration example provided by Coinbase—purchasing a new refrigerator from Lowe's. Suppose the user converses with the chatbot, asking how to buy a refrigerator from Lowe's:

We will use ERC 8004 (Discovery Layer) to find the refrigerator sales agent for Lowe's and request it to list the agent's functions.

We will communicate with Lowe's agent via the A2A (Transport Layer) through HTTP endpoints.

We will use x402 (application layer) to process payment authorization and transfer stablecoins on the chain.

Of course, all of this will happen over the traditional HTTP-DNS-TCP/IP network protocol stack!

Overall, this stack constitutes the protocol backbone of the Agentic Internet (, enabling agents not only to transmit data but also to trade, validate, and coordinate with on-chain resources.

DEAI-3.61%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)