Galadriel 🛠How to build decentralized AI agents & apps with Galadriel
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Build user-owned, decentralized AI apps/agents. From on-chain AI hedge funds, in-game AI NPCs to generative NFTs - Galadriel opens up a new world as devs can build Web3xAI native apps for the first time. Embark on a journey with ETHGlobal London, where innovation thrives, collaboration knows no bounds, and hierarchies fade into self-sovereign ownership. The most skilled web3 developers, designers and product builders from all around the globe come together for a weekend-long adventure to advance the Ethereum ecosystem at ETHGlobal London in March of 2024! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
hi my name is Johannes I'm the CEO and co-founder of cadriel so cadal is the first layer one for AI and today I'm going to give an first of all overview what you can build with C cadil what it is about and a tutorial how you can yourself build decentralized AI applications and agents on on chain so in 2015 what ethereum showed was if you're able to provide trust guarantees for any arbitrary softer programs that that's really powerful that's the Crux of web tree but today if you're building AI applications or agents you only have centralized platforms where to deploy uh your applications and that's the problem uh so last developer day open a developer day a lot of developers felt Rock bued when open AI bundled a lot of developer products into their new products and uh saw what what works on top of their platform so the developers need a platform that don't rock pull them and that's the purpose of collateral so those could be the masters of their own own destiny and so what do the some of the for example use cases you know we can imagine everything from um for example imagine on change ipt so the same way that you know there's a lot of teams and people building decentralized social social media one could imagine having decentralized chpd where the incentives for the users are much different and the product experience eventually much much different than and the better one all of those examples can you can also see under use cases in our ducs docs. gal.com so that's one what if it could actually play onchain AI games that are dynamically generated uh so we have one one game here which we have uh vilic so you can battle with the N chain AI called vilic and it's uh dynamically all of the lore and the game blay is dynamically generated so uh I already connected my wallet and I can actually right let's let's do that later going back or what about actually building generative AI NFD M so all all of the nfds today are static but what if you could actually build like living nfds or what if you could build meme coins let's say like peep or with if dog hat or Doge it's actually alive so from a user perspective you could have a much more Vivid experience um with with the meme coins and there's a bunch of other use cases that The Envision everything from building let's say like deploying 100 different AI agents to to build like a agent swarm that can actually out outperform single single LMS and imagine the tal limit is really the imagination so next up let's actually dive deep how to build an a app on C deset and also for context we are very first like experimental destinate so meaning things will well fast and things might also break so just keep keep in mind all righty um so first of all U we recommend let me see that you uh connect your metamask uh with the CID test net so here's is all of the all of the necessary information after that you can come to the foret to get to get deset tokens you can join our Discord server for that uh we have a Channel with deset faet it is at the moment disabled but will go live in the next few days and we also have a pluer explorer at U Explorer explorer. c.com all righty so let's Let's uh let's dig again so once you have the tokens Can clone our repo I already cloned this one um so the contract repo where in this uh repo we have main contracts in terms of the tml implementation which basically allows to bring AI inference on chain Al the Oracle contracts and some of the example project contracts as well um so once you done that cloned you can through the contracts folder uh you copy paste the template environment to environment then here you have environment file where you have to set the Oracle address I've already done that so set it here and you also have to set the private key for the new account that you just created and where you have the collateral distant tokens once you done that you can install all of the dependencies and then we get to the first contract which we will deploy which is a quick start.
Sol so you can find it find it in GitHub and let's go through this contract uh or together so we Define oracle interface which is uh which this Oracle that you will be calling out has and the main logic here is under the contract uh quick start contract so um here we set the contract address which you already set it as an environment variable let me show you from the docks so um so from here the Oracle address that will be set and there there some more uh like core um setas um and the core logic is basically this uh this function here where the user calls out this function and initialize the to call so specifically in this contract the user is able to input uh message text text uh input and we'll get the response uh from Dolly and so that's the DOL is the image generation model uh from from open Ai and let's uh run this so already uh deployed deploy my contract I done this one and so if I want to run this uh Quick Start enter the image description let's say but like B guys all right if we get the transaction hash we can go to Explorer see the transction successful and now what in the background happened was the quick star contract called out the DML implementation which is the Oracle and we have the DML node basically listens the contract events if it picks up any new event then then that is executed in the DML node which is able to run any arbitrary um ml uh API uh might it be open sourc or or close sourced and also provide verifiability for that um and when the DML is done running it posts back the result to the Oracle and Oracle posts back the result to the to the extraor contract and so the we have this image that we got can open it up and we have a fish with B guys so this is a very simple like quickstarter contract and we have other examples as well in the in the documentation uh so going back to use cases we have the unchange HPT that you can try live demo uh the repos both front end and the contracts can go go to them we have the vilic game again all open sourced and we for example have without the front but the contract implementation for kind of like DOL NFD which is uh similar to what we just went through but a bit more improved um so basically we take the image that we get get back from the Oracle and we mint it as an NFD as well so we so we mint it as an earc so used open supp near C7 721 all righty um so and once you kind do the quick start you can basically also have a look more into dive deeper how exactly glad works how does the stack work how does the Oracle work what's the what's the layer one stack about how does how do we do the how do we bring AI infant on chain in a verifiable manner the rest of it and we also have the Sol interface as well um so the reference for for that so we recommend going going through that all righty can't uh can't wait to see what you'll be building Che is
Automatic transcript — names and jargon may be misspelled.