Deconstructing the deAI Protocol Stack - x402 / ERC 8004 / A2A
Article Author: Jay Yu
Article Compiler: Block unicorn

Introduction
Today, we are witnessing the gradual construction of the "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 the 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 agents to make payments 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 in detail about x402 in an article titled "The Modern Transformation of HTTP 402," which covers its vision, architecture, opportunities, and challenges.
Fundamentally, x402 operates through a tripartite agreement that includes three parts: client requests resources → server returns 402 status code → payment facilitator verifies the client's payment authorization and actually transfers funds (e.g., 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 x402 servers in actual operation. While x402 will greatly benefit micropayments for quality content (such as web scraping, paid articles, computational resources) in the long run, its recent rise (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 (HTTP, FTP, SMTP, VoIP, etc.), we can also expect more application layer standards to emerge in the future.
2. Discovery Layer - ERC 8004
When using x402, a common question that arises is: how do people discover what services are available? This is where 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 addresses the discovery problem for 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 the identity of 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 presenting a more comprehensive view of the agent's capabilities.
I believe that the development trajectory of ERC 8004 as the discovery layer of deAI will be similar to DNS in the internet protocol stack—there will be an overarching protocol that everyone references, but it will redirect users to various peer nodes (referring to different agent card links) for more specific information regarding any given query.
3. Transport Layer - A2A Protocol
At this point, we have introduced the application layer and the discovery layer. The final link in the protocol stack is the transport layer—it is responsible for handling how applications communicate with each other after discovering services through protocols like ERC 8004. In the traditional internet network protocol stack, 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 occurs between the client agent (A2A client) and the remote agent (A2A server) using JSON-RPC 2.0 over HTTPS. Essentially, the two agents "talk" by accessing each other's HTTP endpoints and requesting computations or various functionalities. A2A also stipulates that each agent has an agent card to publish information about its capabilities, frameworks, MCP attachments, and more.

In the A2A protocol, after mutual confirmation between the client and the remote agent, the client will check the agent card for the HTTP endpoint and request the corresponding service. The remote agent will utilize its MCP tools and computational resources, sending asynchronous updates during the task processing (similar to the "thinking process" in inference models). Finally, it will send the final response and artifacts.
I recommend an excellent introductory article by IBM titled "What is A2A protocol (Agent2Agent)?"
Putting all the factors together…
Considering x402, 8004, and A2A, we can refer to a demonstration example provided by Coinbase—buying a new refrigerator from Lowe's. Suppose the user interacts with a chatbot, asking how to purchase 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 functionalities.
We will use A2A (transport layer) to communicate with the Lowe's agent via the HTTP endpoint.
We will use x402 (application layer) to handle payment authorization and transfer stablecoins on-chain.
Of course, all of this will happen on top of 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 transact, verify, and coordinate with on-chain resources.







