New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Building on The Graph with AI | Kevin Jones

ETHGlobalWed, Sep 9, 2026, 12:00 AM

Speaker

Kevin Jones

Transcript

Hello everyone! Kevin Jones is with you. Today we will talk about The Graph protocol. This will be a quick overview, but very useful if you plan to build on top of The Graph for ETH Online. So I'm very excited.

This is the first hackathon I'm participating in with ETH Global, and I'm really excited to teach you and help you out a little . So, if you need data for your web application, AI your web application, AI agent, or any other project and you need access to blockchain data, The Graph will help solve many of the problems of reliably retrieving this data for queries this data for queries . So let's start the screen demo. And let's talk a little about The Graph. So, first of all, what is The Graph?

The Graph is a decentralized network of indexers that provides services for querying and accessing data that would otherwise be difficult to obtain using, for example, RPC or running your own node. With The Graph, you can simply subscribe to the desired service to be able to query this data. There are several different products available. One of them is called subgraphs, which allow you to query data via GraphQL. All data is indexed and stored in a database, then processed using special subgraph tools and made available via GraphQL available via GraphQL .

We also have The Graph Explorer , which allows you to find existing subgraphs. So existing subgraphs. So , if you're looking for, say, Uniswap, ENS, or something else, you can go here and find what you need. They are sorted by the popularity of the subgraphs. You can go to the studio if you want to create your own subgraph.

So, if you are writing your own smart your own smart contract, you will probably need to create your own subgraph. The advantage is that you can customize it the way you need. All you need to do is go here, click "create subgraph", name it whatever you want , click " , click " create", and the system will guide you through all the necessary steps. You choose a network, install the CLI, run graph init, and it will ask you for the contract address, the blocks you are interested in, and whether you want to index all events. It's kind of a setup wizard, you know, a " " choose your own adventure" experience.

Then he will create a project framework for you. Then you can take it and authenticate in the studio using the off command. Go to the directory where this subgraph was generated. Generate all the code, build it , make sure everything works, and then deploy it. So deploy it.

So , if you want to make changes, say make changes, say , add a new feature to your smart contract, you need to create a new entity. You can regenerate all these types, configure them however you want, verify the build, and deploy. So you will use the studio mainly to create your own subgraphs. Another technology is Substreams. If you want to access more than just events, Substreams will be extremely powerful.

Substreams are also much faster. You can transfer data via a parallel interface. You can choose exactly the blocks you choose exactly the blocks you want to receive. Then you can put them in a database in database in any structure that you think makes sense, right? Let's say you want to upload them to ClickHouse.

Either to a CSV file, or MySQL, or whatever else you decide to do. You can customize this for yourself. All of this is written in Rust. There are also several ready-made packages that are already available. If you go to Substreams Dev.

If you need an API If you need an API key, go to graph.market, it is available there. So, what to choose: subgraphs or Substreams— subgraphs or Substreams— depends solely on what you are building. It's entirely up to you. Okay, we won't talk about AMP.

Now let's quickly review the documentation. I want to briefly discuss two things. The first is the AI two things. The first is the AI tool in this section. We have a great MCP server for subgraphs.

It is written so that you can find the subgraph data you are interested in, their format, structure, and schema dynamically through MCP. This is extremely useful if you are creating AI if you are creating AI agents. Very useful agents. Very useful if you use an IDE on your computer, like your computer, like Cloud Code, Cursor or Cloud Code, Cursor or any other. Um, and here we also have all the skill files.

So, the skills file for the subgraph is here. So if you're going to create a subgraph, point your AI here. If you create a sub-stream, then we have that too, okay? So it all depends on what exactly you are going to do. Um, as I said, substreams are very fast and parallelizable.

Um, yes, you can decide for yourself. Um, graph.market has its own API graph.market has its own API key. So if you're going to be working with subthreads, you need to go to graph.

market to get an API key. If you are going to use graph subgraphs, you need to go to Subgraph Studio and get an API key there. Let's talk about prizes. We have $15,000 in prize money. The first category is the best use of a composite or standardized product from The Graph.

This could be something like Messari subgraphs or, say, the Agent Zero subgraph for ERC 8004, perhaps the ENS subgraph would also fit here. Or if you're going to create your own composed subgraph composed subgraph , that would be really interesting too. You might want to fix existing Messari subgraphs existing Messari subgraphs that are, well, not quite correctly written, or something like that. We also have a category for the best AI tools built from The Graph, or the best use case for AI. It could be a toolkit for AI developers or something that will expand AI capabilities using The Graph network, okay?

This could be infrastructure running on The Graph network as a new, updated way of providing, say, data processing services or something similar. It could be some new tool, maybe a better and improved MCP server. It could be a lot of different things, right? And another category right? And another category is simply using The Graph for AI.

This is more than just a chatbot that requests data from a graph, it is something more advanced and a very interesting case study that goes beyond the usual. This is for new projects, but we also have the same category for those who are continuing their work, okay? So it all depends on what you plan to do. Good. Next, we will give a short demonstration of Scaffold Agent demonstration of Scaffold Agent .

Scaffold Agent is a starter kit. It is very similar to Scaffold ETH very similar to Scaffold ETH if you have ever used it before. Scaffold Agent is inspired by this and is more AI and agent friendly. And it has a built-in chat interface, and so on. So we'll use it for our demonstration.

You don't have to use this, you can just use the skills file and follow the normal workflow for subgraphs. But I want to show it because I think it's quite useful. So we will choose exactly that. Let's go to scaffoldagent.xyz.

Copy this command here and run it here. And let's call it, well, the graph. Good? And it will ask us how we want to store our secret keys. For those of you who don't know, I'm also the founder of OneClaw, a secrets management tool and infrastructure for AI agents.

We will use it use it . You don't have to do this. You can just create a basic ENV file, encrypted if you want on your local computer, or unencrypted if you want to just take the risk and leave the regular ENV files. If it's just for the testnet, then that's fine. But, you know, one of the things I'm trying to focus on is building industrial-grade applications for AI.

So we wanted to just use OneClaw for that. And I'll show you why. We'll enter here, in OneClaw. And let's go all the way down to the settings. And let's move on to API let's move on to API keys.

We'll revoke this key, create a new one, call it the graph, create it, copy the key, and paste it here. That's it. Now we need to encrypt this one key, since we will have one such key stored on disk. So, let's do this. OK.

Now what we need to do is do we want to generate a signing key, essentially an Ethereum address for deployment? Yes, we will do it. Do we want to use an ampersand? No. Do we want to get subgraph data from the graph?

We can choose MCP or use XRO2 to pay for data. This is another thing I didn't mention, but you can pay for your requests through XRO2 using micropayments. But we're going to use...Yes use...Yes , of course.

We will configure both options. It asks us which LLM provider we want to use. One Cloud now has an LLM One Cloud now has an LLM proxy, which allows you to protect yourself from prompt injections or execution of or execution of any malicious code. We can do some checking. So, I'll choose this, simply because, well, it makes sense.

It asks us which provider we want to use. I will choose Google. And also whether we want to set up our own payment or provide an API payment or provide an API key. I will provide the API key. And I will introduce it now.

Now I'll take my Gemini API key, this one, which one is it? I'll use this one . I'll paste it here. We will ask which blockchain you want to use, which is Foundry, and which frontend to choose. I will choose Next.

js. As you can see, the system guides you through all the stages. The last question is whether we want to force signing in a trusted execution environment . We'll take advantage of that too, yes. You can also choose to sign locally if you wish.

We will generate an Ethereum key. And now it will launch our application, okay? So what he just did was create a monorepository with a blockchain and a frontend. He created a private key for deploying the smart contract and for the AI ​​agent itself. And he'll keep them in storage, right?

They will be stored on the server inside the hardware security module. And when the agent signs it, the process actually happens inside a trusted execution environment trusted execution environment . So the signing key never leaves the physical hardware. The advantage is that if an agent is attacked with a prompt injection and tries to steal the private key, it won't be able to because it's simply not there simply not there . So, we'll let the installation complete.

And let's go over here to see what happened. When we go into One Cloud, we see the storage here, the graph storage here. And we have a graph agent. So we have a graph agent. So , let's look at the graph storage, there is a Google account and two agents.

Um, we'll run npm, um, how is that run npm, um, how is that ? Help? Let's see what can be done. Yes. npm help.

And all the teams will show us this . Oh, sorry, not just help. Oh, that's a little unclear. Um, just a quickstart. Let's do this.

And this will launch the blockchain. The user interface will now launch. This will launch everything we need. We need to enter the password for the vault we created earlier. Twice, because we need to load the interface and also load the network.

Both of them access the repository to programmatically obtain a secret key for storage or use. Now let's go to localhost:3000 and we can ask a simple question, like what's your address, or what's your balance, or something like that. So, that's it . Okay, let's check my wallet balance. Yes, this will give you a basic AI agent ready to query the graph via MCP or using X road 2.

It is already pre- programmed and configured. There is a "data" tab where you can find subgraphs. You can get help on how to query data. But overall, it looks like everything is working here. And we must be ready.

Okay, I hope this was helpful for you . Good luck with your graph development. I hope you create something cool, and if you have any problems or questions, contact me at X. I'm devsecops with a Z, that is, d e v s e c o p z. I hope you don't have any problems and create something interesting.

Okay, see you next time. See you later.

Automatic transcript — names and jargon may be misspelled.