Building on The Graph with AI

ETHOnline 2026 · September 2026 · 14:15

Kevin Jones of Edge & Node gives a fast tour of The Graph for ETHOnline hackers. He explains how decentralized indexers serve blockchain data through subgraphs queried with GraphQL, how Substreams stream data much faster, and how the Graph Explorer and Studio help builders. He closes with the subgraph MCP server and skill files that let AI agents and coding tools find and use onchain data.

Speakers

Topics

From ETHOnline 2026, hosted by ETHGlobal.

Transcript

[music] What's up guys? Kevin Jones here. Today we're going to be talking about the graph protocol. This is going to be a speedrun but very informative if you're going to be building on the graph for ETH online. So very excited. This is the first hackathon I ever participated in with uh ETH global and I'm very excited to teach you guys and help you out a little bit. So if you need data inside of your uh web app or your AI agent or inside of whatever you're working on and you need access to blockchain data, uh the graph is going to be able to help solve uh a lot of problems for you when

it comes to getting that data in a very reliable and queryable way. So uh let's go ahead and start sharing our screen and let's go ahead and talk a little bit about the graph. So first of all, what is the graph? The graph is a decentralized network of indexers that provide a level of service to query and uh get access to otherwise difficult data that you would need to use something like a RPC um or run your own node with the graph.

You can just prescribe or subscribe to the service that you need to be able to query that data. So there's a few different products that are available. One is called subgraphs which allow you to query data via GraphQL. All of the data is indexed and stored inside of a database and then translated for you uh via via uh some cool subgraph um uh processing and exposed via GraphQL. We also have a graph explorer which lets you find existing subgraphs that already exist. So if you're looking for let's say unis swap or ens or whatever it is, you can come here and search for whatever you need, right? Uh they're

kind of ordered by the most popular of the subgraphs. Um you can go to the studio if you want to create your own subgraph. So if you are writing your own um smart contract, you're probably going to need to write your own subgraph. Um and the the benefit to that is that you can customize it and make it however you want. Um, all you need to do is come in here, say create a subgraph, name it whatever you want, click create. It's going to walk you through exactly all the steps you need to do. So you choose the chain, you install the CLI, you run graph and it's going to ask you for the contract address, what blocks you care about, whether you want to

index all the events, these like kind of wizard like um choose your own adventure type of uh experience. Then it's going to scaffold that out for you. Then you can actually take it and authenticate against the studio with the off command. go into that directory where that that subgraph is generated, generate all the code, build it out, make sure it builds properly, and then deploy it. So if you want to make changes, you know, let's say you add a new function to your uh smart contract and you need to create a new um entity, you can uh regenerate all those uh types and do whatever you want with them. Custom, make sure it builds and then deploy it. So you'll use the

studio for pretty much um creating your own subgraphs. The other technology is substreams. Now if you're going to try to get access to more things than just uh events, substreams are going to be super powerful. Substreams are also a lot faster. So you can stream data uh over a parallelizable interface. So you can take data um kind of choose exactly what blocks you want to stream uh you can then put those into a database in any kind of structure that you feel uh it makes sense right so let's say you want to put it into click house right or you want to put it into a CSV file or my SQL or whatever it is that you decide that you want to do you

can customize it these are all written in Rust um and there are some existing packages that are already available if you go to the upstreams dev of uh if you want to get an API key then you go to the graph.market and that's available here. So subgraphs versus substreams it's really just depends on what you want to build. Um it's really up to you. Okay, we're not going to talk about AMP. Um and then we'll go to the docs real quick. I want to talk about two things real quick. One is there's AI tooling section. We have a subgraph MCP server which is really great. Um it's basically written in a way where you can discover and find the subgraph data that you care about and the format and the structure

the schema dynamically you know v via MCP. It's really really useful uh if you're building AI agents uh really really useful if you're using like your IDE uh on your machine like cloud code you know cursor whatever it is. Um, and then we have all of the um, skill files as well here. So the subs subgraph skill file is here. So if you're going to build a subgraph, point your AI here. If you're building a substream, then we have that as well. Okay, so it really just depends on what you're going to do. Um, like again, substreams are very fast, parallelizable. Um, yeah, you can kind of decide. Um, the graph.market, it has its own API key. Uh so if you're going

to do substreams, you got to go to the graph.market to get your API key. If you're going to use uh the graph uh subgraphs, then you're going to want to go to the subgraph studio and get your API key there. Let's talk about uh the prizes. So we have $15,000 in prizes. Uh the first kind of category is the best use of a composable or standardized graph product. So that would be something like misari subgraphs or let's say the agent zero uh subgraph for ERC804 maybe ens subgraph might might kind of fit into that. Uh or if you're going to create your own um composable subgraph

that would also be be very interesting as well. Maybe you want to like fix um some existing misari ones that are not you know properly written or something like that. We also have best AI tooling uh built with the graph or best AI use case. So this would be like AI developer tooling or something that could be something that will bring some power to AI uh using the graph network. Okay, so it could be infrastructure that runs on the graph network that is some kind of new revitalized way of like you know serving um maybe like as a data service or something. could be some kind of new tooling, maybe a better improved MCP server, could be a lot of different

things, right? Um, and then the other one would be just using the graph for AI. So, this needs to be more than just like a chatbot, you know, that just queries the graph, but something more advanced. Um, and a very very interesting use case that kind of going outside the box. This is from scratch. And then we also have the same one for if you're continuing. Okay, so it really depends on what you're going to do. Okay, the next thing we're going to talk about, we're just going to do a real quick demo of Scaffold Agent. Now, Scaffold Agent is a starter kit. It's very similar to Scaffold ETH if you used Scaffold ETH before. Scaffold agent is inspired by that and it's more AI friendly, more agentfriendly, and it's got a built-in chat interface. Um, that

kind of stuff. So, we're going to use it for our demo. You don't need to use this um with just using the skill file and following the normal kind of flow for the subgraphs. can do it, but I want to show this off because I think it's it's quite useful. Uh, so we're going to choose that. Um, we're going to scaffold agent.xyz. We're going to copy this command here and we're going to run it here and we're going to call it uh the graph. Okay. And it's going to ask us how we want to store our secrets. Now, uh, for some of you who don't know, I'm also the founder of OneClaw, which is a, um, secrets management and an AI agent kind of infrastructure tool. We're going to use that. You don't need to use

that. You can just do a basic ENV file if you want encrypted on your local machine or just unencrypted if you just want to yolo it and just have the ENV files. If it's just for like test net, that's fine. But, you know, one of the things I'm trying to focus on is like making production grade applications for AI. And so we want to just use one claw for that. And I'm going to show you why. We're going to log in here to one claw. And we're going to go all the way down to the bottom to settings. And we're going to go to API keys.

And we're going to revoke this key. Do a new key. We'll call it the graph. Create it. Copy the key. And we'll paste it in here. that. Now, we do need to encrypt that one key because we need we're going to have one like key that's sitting on disk. So, let's do that. Okay. Now, what we want to do is um [clears throat] do we want to loc generate a signing key to like basically an Ethereum address to do the deployment? Yes, we're going to do that.

Uh do we want to use ampers? No. Do we want to get subgraph data from the graph? So, we can either say MCP or we can do X42 to pay for data. That's another thing I didn't mention, but you can pay for uh your queries over X42 using microp payments. Um, but we're going to use Yeah, sure. We'll we'll configure both. Um, it asks us which LLM provider we want to use. Now, one claw has an LLM proxy that allows you to make sure that you don't get prompt injection uh or some kind of malicious code execution. We can do some inspection.

So, I'm going to choose that just because um yeah, it just makes sense. Uh it asks us what provider we want to use. I'm going to choose Google and whether we want to do our own billing or provide an API key. I'm going to provide an API key and I'll enter it now. And I'm going to go grab my Gemini API key here, which is which one? I'll use this one. Paste it in. And we're going to ask you what it asks you what chain you want to use. We'll choose Foundry and what front end we want to use. And I'm going to choose Nex.js. So you can see how it kind of walks you through everything. Uh the last one is for uh whether we want to uh force signing inside of the trusted execution environment. We're going to use that as well. Yes. Um you

can choose to do signing locally if you want as well. We're going to generate the Ethereum key and now it's going to bootstrap the application for us. Okay. So, what it just did is it it created a a mono repo with a chain with a front end. It created a a private key for the actual deployment of your smart contract and for the AI agent itself. And it's going to store those in the vault, right? um those are going to be stored server side inside of a hardware security module and then when the agent is signing that it actually happens inside of a trusted execution environment. So the signing key actually

never leaves um physical hardware and the benefit to that is that the agent if it gets prompt injected and it tries to steal the API or the private key it cannot uh because yeah it's not there. Um, so we're going to let that install and we'll go over here and look and see what happens. So when we go to one claw, we can see here that we got a vault. We have the graph uh vault here and we have the graph agent. So we look in the graph vault, we have the uh Google account and the two agents. Um we're going to run npm um what is it? Help. Let's see what we can do. Yeah, npm help. And that will give us all the commands. Oh, sorry. Not uh

just help. Oh, that doesn't work either. Uh just quick start. Let's do that. And what this is going to do is spin up the chain. It's going to spin up the front end. It's going to spin up everything we need. We need to put the password in for the vault that we created earlier. And twice because we need to load the um front end. We also need to load the chain. They both pull from the vault to programmatically grab the secret and store it or use it. And now we can go to localhost 3000 and we can just ask a simple question like you know what is your address or what is your balance or something like that.

There we go. All right. Right. So, check my wallet balance. Yeah. So, this is going to give you a very basic AI agent that's ready to query the graph uh either via MCP or using XRO2. Uh it's kind of already pre-programmed and and uh set up. I believe there's this data tab which uh you can find subgraphs in here. Um, and you can like just get some assistance on how to query data. Um, but yeah, for the most part this looks like everything works uh through here and we should be good.

Okay, so uh I hope you guys found that useful. So good luck building on the graph. I hope you guys build something awesome and uh yeah, let me know if you have any issues uh any questions. You can reach out to me on X. I am dev sec ops with a Z. So, D E V S E C O P Z. Um, and uh, yeah, hopefully you have any don't have any issues and build something cool. All right, catch you guys next time. Bye. [music]

Related talks