
The Graph published a blueprint for onchain AI agents. The stack uses ERC-8004 for identity and Subgraph MCP for data. A machine-to-machine payment layer closes the loop.
The Graph Foundation published a blueprint for autonomous onchain agents. The Aug. 18 blog post argues that AI agents need a specific set of infrastructure rails before they can operate in a trustless, decentralized environment. The post identifies the stack in two core layers: identity and authorization, and blockchain data context. It adds a third layer to close the loop: machine-to-machine payments.
"The Onchain Agent Infrastructure Stack Explained" frames the problem as a matter of translating AI reasoning into reliable blockchain actions. An LLM can decide what to do. It usually cannot navigate onchain data securely or pay for a transaction without human supervision.
The first layer is identity. The Graph points to ERC-8004, which it calls the Trustless Agents standard. An agent holding a raw private key is a single hallucination away from disaster. ERC-8004 registries separate identity from authority. A smart contract can say "this agent is authorized for trades up to $10,000 in USDC markets only." The agent's underlying key never gets access to the principal. The post emphasizes that this makes agents accountable over time. Actions get logged to the chain. Reputation becomes a verifiable asset that other smart contracts can evaluate.
The second layer is context. A blockchain stores vast amounts of data. It does not store it in a way an LLM can query efficiently. The Graph's existing Subgraphs index raw blockchain data into structured databases. The new development is connecting those Subgraphs to AI through the Model Context Protocol, or MCP.
The post describes Subgraph MCP as a translator. An autonomous trading agent tasked with finding a yield opportunity needs to compare liquidity across protocols and check current rates. It cannot parse millions of raw logs. It can query a Subgraph through MCP and receive structured information it can actually reason about. The MCP layer keeps the response within an LLM's context window without hitting token limits or hallucinating the data itself.
This separation matters. The LLM handles the reasoning. The indexing infrastructure handles the data retrieval. The two layers work together but solve different problems.
The third layer is money. Today's payment infrastructure assumes a human user logging in, maintaining an API key, and approving a subscription. An autonomous agent running around the clock needs a different model.
The Graph's post revives the x402 standard, which refers to HTTP's "402 Payment Required" status code. The protocol works in a simple loop. An agent requests data from a Subgraph Gateway. The gateway responds with a payment request in USDC. The agent signs the payment and resubmits the request. The gateway returns the data.
x402 abstracts the payment into the HTTP request itself. The agent does not need to know how to write a complex smart contract interaction. It signs a USDC transfer. The settlement layer, GraphTally, handles the chain-specific reconciliation behind the scenes.
The post pulls these layers together into what it calls the "agent loop." An agent establishes an identity with defined guardrails. It queries onchain data to understand its environment. It pays for that data and any subsequent transaction costs autonomously. It executes the trade, posts the outcome to its reputation registry, and repeats.
Much of web3 today is designed for a human with a wallet and a browser. The Graph's post sketches a world where software itself is the end user.
The Graph already provides blockchain data infrastructure across more than 60 networks. It reported serving more than 1.27 trillion queries to over 75,000 projects as of early 2026. The potential rise of autonomous agents represents a new category of demand for that infrastructure.
The framework is on the table. The Graph said it processed more than 1.27 trillion queries. Agent reads will add to that count, or they will go somewhere else.
Prepared with AlphaScala editorial tooling from the source reporting linked above. Indexable analysis may include a cited Alpha Score value. Publishing checks screen each story before release. Educational coverage, not personalized advice.