Hey, how are you all? Is everyone okay here? What a beautiful place, right? This is simply incredible. Thank you all for coming.
My name is Kevin Jones. I am a member of the Build Guild. I previously held a workshop about Ethereum. I also work at Edge&Node. Edge&Node are the original creators of The Graph protocol.
So we're going to talk about The Graph. We'll talk about the rewards available, some things to work on, and move on. So, raise your hands. Who among you may have created a subgraph in the past? Has anyone here created a subgraph?
Has anyone here used substreams before? No. Okay, cool. These are our core products in The Graph protocol. That's good.
Many new hands. There will also be a small review about subgraphs. Then we'll focus on the fact that, in particular, we're focusing on AI, as well as some of our awards. We want you to create tools that help AI work with The Graph, or find the best use cases for AI use cases for AI applications that use The Graph. We'll go over that a little later, but essentially, for those who don't know what The Graph protocol is—it's a decentralized network of indexers that provide data, right?
There are different ways to access this data. But you can think of The Graph as a network of individual indexers that run the stack and give you access to a variety of data. One such product is subgraphs. Subgraphs subgraphs. Subgraphs are GraphQL-based APIs, right?
With them, it's very easy to get large amounts of information about something complex like blockchain, right? In blockchain, we have a very complex time series data structure to analyze, but we don't have many tools to easily parse it, so subgraphs help a lot with that. Subgraphs are very easy to create. You can go to The Graph website, go to Subgraph Studio, and it will walk you through the process of creating a subgraph. They are usually designed for very specific tasks focused on one particular smart contract, right?
Or on a set of smart contracts. So, if you are writing a smart contract, you will most likely need a subgraph for it, because it will make reading the data much easier compared to direct RPC requests. You can use GraphQL to push this data to your frontend very quickly. So, this is the first product. Next is Substreams.
Substreams is a streaming protocol, and the advantage of it is that you can stream data directly to your own database and then perform additional actions on it, right? Maybe you want to transfer deeper data or data from the entire blockchain, such as getting transactions? Or you want to get, you know, value transfers, wallets, etc. Substreams are great for this because they are effectively a part of the entire block that is composed and then easily parsed and placed in other databases. For example, maybe you want to use ClickHouse, right?
Or you want to use a different database, you can use Substreams for that. Subgraphs are written in AssemblyScript. It is a subset of TypeScript. So it doesn't have all the functionality of TypeScript, but it's very similar . So if you understand TypeScript, you can read subgraphs quite easily.
Substreams is entirely based on Rust. So they're a little more difficult to work with, but in the world of AI, Rust is actually very easy to use. So if you use AI tools, it's very simple. I'll tell you about how we're going to make your job easier if you use AI. By the way, who here uses AI for programming?
I just always like to ask about it. Almost everyone. So, there are a few points. If you go to the documentation here by clicking on this link, you will be taken to the section dedicated to AI tools. There you will see that there are mainly two types of skills that you will need.
One of them is Substreams. Okay, we'll get to that in a moment. First, let me tell you about the MCP tell you about the MCP servers we have. We have two MCP servers: one for Subgraphs, the other for Substreams. Essentially, the reason you would want to use an MCP to use an MCP server is that agents can understand it more easily and they can discover the data they need by simply querying that MCP server.
MCP can be considered a kind of search tool. So if you go to MCP and say, “I’m looking for data on Uniswap,” right? It will return all Uniswap subgraphs and then recommend the one that most likely contains the data you need. Yes? This is a very dynamic way for your agent to find data.
The same applies to MCP subgraphs. I've actually never used MCP subgraphs, but I assume it's very similar. The difference is that subgraphs are deployed in The Graph network as endpoints. That is, these are actually HTTP actually HTTP interfaces running on GraphQL. Um, substreams are packages, they're streaming packages.
Let's say you're building an AI agent you're building an AI agent that wants to receive data from the Base network, right? You can say, "I need to use the MCP server to find the stream for the Base mainnet that has all the transactions in this particular block." He will try to find the right package for you , right? So, MCPs , right? So, MCPs are tools that either let you know where the data is in your IDE, or you can program your AI agent to use them and query the data directly from the MCP.
This is just a preface to just a preface to why you should use MCP, if you are building an app in Cursor, Cloud Code, or any other IDE and want to train your programming agent to work with The Graph— then you should install one of these skills. If you want to create subgraphs, here is a link to the subgraph skill. You can click on it and it will guide you through all the settings for that skill. There is also a skill for substreams, it is available in the GitHub repository, and there is also a description of how to install it all. So, depending on what you're building, if you have questions and don't know which tool to use, just contact us and we'll explain what's best for your project.
This will generally help you a lot with solving problems at any time and creating everything you need. So yeah, check out these skills. Let me briefly talk about the rewards and what The Graph is looking for, because they are related things. We are looking for tools that will help agents use data use data coming from The Graph. Okay.
It could be agents for programming, AI front-end agents, or any other use case for AI where you're building tools that can be useful for developers on the Graph network or for end users, right? We are trying to find ways to make the agent detection process as simple as possible. Maybe you're building something, here are some examples. Oh, there really aren't any examples here. Oh, no, it still is.
For example, a substreams deployment flow with a single prompt, using substreams skills, right? It could be a web could be a web interface where you just type one query and it gives you all the data you need from substreams, right? So check them out; these are just a few examples. Another category is the best use case for Graph in the field of AI. This means in the field of AI.
This means that you are creating an AI that you are creating an AI agent, and this is the best way to use Graph for such an agent, you know? That is, it is a toolkit specifically designed to help developers use AI for Graph. And these are real consumer AI applications, for example, front-end for example, front-end applications. And the last one applications. And the last one .
There are two points here. I don't know why they are split, but the total prize pool is $7,000. So, five prize places. First prize places. First , second, third, fourth and fifth places with a total prize of $7,000.
There is also a nomination for the best use of composable subgraphs. What does this mean? Subgraphs, as I said before, are created for each contract and each chain. Let's say you deploy a DeFi deploy a DeFi protocol across 10 networks. You can create a composed subgraph composed subgraph that connects them all together.
There is a whole section about this in our documentation. So this will be the best way to implement both composed and regular subgraphs. Be sure to take a look at this. Again, there are examples here that you can use as a guide for what you create. I want to show a demo today using other tools.
I don't know if you've been here before, I did a workshop with scaffold-eth, which is a starter kit for Ethereum. It is great for prototyping and development on Ethereum. There is also an extension for subgraphs for it. But about three or four months ago, I started creating this as an alternative tool. We actually use some packages from scaffold.
We use components, we use hooks and, uh, a few other things. I can't remember. Um, but it's a little more native to AI. And I mean, everything that can be done with the scaffold agent is available through command line tools. So it's a much easier way to quickly deploy an application.
And the end result you get is an AI chatbot. So you actually get an AI agent. So we're going to demonstrate that right now. And the reason I want to show this is because we have an integration that will automatically launch MCP and also allow you to consume the graph through X42. So let me briefly touch on this.
Who here has heard of X42? Several people. Okay, for those who don't know what X42 is, essentially the graph runs on API keys, right? Um, which are actually a bit outdated. Uh, I think that's why one of the initiatives for Ethereum and in general is to try to replace API keys with something called X42.
So X42 is just a reinterpretation of the existing HTTP 402 status code that's been around since the 90s and just says, hey, if you want to make a request to this API, you need to pay a certain amount to get access. So X42 was created by Coinbase to take this HTTP 402 and respond to it as an object that specifies exactly how to pay via crypto rails. This is not necessarily just for Ethereum, but X42, one of the most popular networks—that's Ethereum, as well as Solana. Um, but the point is that we enabled X42 for all endpoints for subgraphs. Okay, so this starter kit that I created already has this plugged in already has this plugged in .
So what you can do is run it. This is a Next.js application. It also uses the Vercel AI SDK. It will automatically be connected to the MCP subgraph server.
Uh, it will automatically create wallets for you , and then allow your AI allow your AI agent to request data via X42. OK. And um, the way we do this is again using X42 and using the MCP subgraph server. The MCP subgraph server is open source, so you can run it yourself if you want. Uh, but we actually run it for you so you do n't have to run it.
Um, and again, it supports X42, so you can make payments via X42. So, let's try to do this, because we have eight minutes, and let's see if we can do it. So, I'll copy this command, npx scaffold agent, and we'll go to a new window. We insert it. And you will see that we will get something very similar to the ETH scaffold.
We need to name our project. Let's call it, um, ETH Lisbon. And now, you don't have to use OneClaw for this. OneClaw is a startup I'm currently working on. I created this as part of that project.
Um, but it provides key storage for you. We use multi-party computing and HSMs to store private and signing keys in Google Cloud. You don't have to use it. You can use a regular encrypted ENV file locally or just a standard ENV, which is not recommended. But for the demonstration, I will use OneClaw to show how useful it is, and to show how we won't even need to have a private key on our computer to sign transactions and pay for Graph services via X42.
So, for OneClaw we need an API OneClaw we need an API key. We'll go to oneclaw.xyz, which is, again , just a key storage platform. And we will generate the key. API we will generate the key.
API key. I'll go here to API keys. Boom. Let's go here. Let's call it demo.
We will provide full access. I don't usually show the key online, but I will remove it later. Um, we're going to enter the key now, and we need to save this API key that it will generate for us or that we just copied, but we want to protect it with a password. So we'll password protect it. It will then ask if we want to generate the signing keys inside a Hardware Security Module (HSM).
True? True. This is the highest level of security without using physical devices, such as Ledger or something similar. So we will say "yes." It will ask if you want to use Amperand use Amperand .
We won't go into this in depth, but it is a payment tool x42 that can be used. I wo n't use it. It will ask if we want to use The Graph. We will select both Graph. We will select both : MCP server and x42 enabled for agent payments.
And we will use...here he wants to know which LLM to know which LLM provider you will use. OneClaw use. OneClaw is an LLM provider, and we deal with security issues related to LLM. So, I'll use that, but you can use Gemini, Anthropic, OpenAI, or whatever.
Next, the system asks which provider we want to choose. I'll choose Google because I like Google, and we'll use the billing that comes with OneClause. So, through OneClause you can pay for LLM conclusions, similar to OpenRouter, and use use any model. But you can also provide your own provider API key . If you have an OpenAI key, you can just enter it, but for convenience, we will use OneClause again.
We can also run the blockchain locally, simulate it, and use it as a blockchain; we will choose Next.js. We also support Python and Vite support Python and Vite . And the last point, quite interesting: we will force the signature in the Trusted Execution Environment ( Trusted Execution Environment ( TEE). This is an infrastructure TEE).
This is an infrastructure that runs on Google Cloud that runs on Google Cloud . I'm just doing this for demonstration, because it's convenient to show. We will click "yes". Let's choose Ethereum. And that's all Let's choose Ethereum.
And that's all . So, the system will automatically deploy a full-fledged application with a chat application with a chat interface for you. It will automatically install all the necessary X42 packages. It will install the Vercel AI SDK and connect your frontend to your blockchain. If you launched the blockchain we chose.
Yes. And she'll give us this signing key right here. You see, here is the HSM signing key. Let's take this public address. Let's move on to BaseScan, because we will be using Base.
And we'll fill in this address here. This is a new wallet. It was generated in TEE and I am going to send the funds there. Let's skim here. Yes, while we wait, there's not much money there.
We need to find a wallet with money. Yes, let's see. Botster. Here. OK.
I'm scanning this Here. OK. I'm scanning this . And I'll just send a little, it doesn't take much. I'll send you about 10 cents.
Good. So, I just sent 10 cents in USDC to this brand new wallet generated in TEE. It establishes dependencies. While we wait, I'll quickly share this screen. Go to that folder and load this project into Cursor.
So, I said earlier that I like Cursor because I can see what's happening with the difference when I use AI. People like Claude Code, but I want to see what happens. Um, and if we look here, we have two ENV here, we have two ENV files. We have an encrypted file that stores our secret API key from Anthropic, as well as another envir all the information that was returned: what model I want to use, what billing type—this is automatically generated upon upload. And here it is .
So, done. Now I just need to run this one command, just a quick start. We use um in scaffold agent kit, we use uh just, which is very similar to yarn, where you say yarn something, um but it's called just, so you need to install just. You'll need to install it, but let's quickly go into that folder and just run it. This one command will launch uh frontend, network and uh use faucet to deploy funds.
It will ask us for the password for the repository or uh local um object here and then it will ask for the password to run the frontend. OK. So we get this Next.js application here. I only have two minutes, but everything should work because I've already sent the funds, I've already sent 10 cents already sent 10 cents , and I can ask one question about the DeFi one question about the DeFi protocol here.
So, here's what we have. This is very similar to the ETH scaffold. There are tabs here for setting up contracts. There is a faucet here. There's a wallet connector here for your agent or for you as a person, right?
You can disconnect and reconnect using the burner wallet. We use, oh, that's another thing. We use a scaffolded burner wallet. And then all we have to do is say: give me the last five swaps on Uniswap v3 and press Enter. And let's keep our fingers crossed that Enter.
And let's keep our fingers crossed that it works. And we're going to request this data from the Graph network and pay via x42 using that wallet. And again , you can just use your own wallet locally. You can also generate it and save it in an ENV it and save it in an ENV file if you want. Oh, great.
Let's see if we can uh make this work. This Although funds must be. Did it pass? Yes, there are 10 cents there. No, no, no, no.
We don't want to use it. Hmm, let's see if I can figure it out. I don't know why it didn't work, but it probably should have. Um, but essentially, you see that we don't need to enter an API need to enter an API key for LLM because we're using one claw for LLM functions. Um, we did n't need to store the private key anywhere.
Again , we generated it in TE. Technically, the agent has a wallet. So we can ask, "Hey, what's your public address? your public address? " And he would have to give me his public address.
And I know time is up, so no. No, it doesn't work right now No, it doesn't work right now . I swear I did this demo yesterday and everything worked fine. Um, well , it works here. But yeah, okay, yeah, sorry, it didn't work.
But basically, this is a good starting point for you if you're building an AI agent, um, check this out again: npx scaffold-agent. And again, this will give you the ability to automatically use the schedule, um. If you want to build from scratch, use the MCP subgraph or the MCP substreams server; this will help you a lot . And then, again, add subgraph or substream skills to your IDE. And if you have any questions, just come and ask us.
And, uh, I'll be there if you have any more questions after this workshop. So, thank you very much. Sorry the demo didn't work.
Automatic transcript — names and jargon may be misspelled.