{"id":"5wr9ltBUm9s","title":"Learn to build NEAR Shade Agents with Proximity Labs","description":"NEAR is the Blockchain for AI\nWebsite: https://near.org/\nNEAR AI: https://near.ai/\nIntents: https://near.org/intents\nChain Abstraction: https://www.proximity.dev/\nSharding: https://nearone.org/\n\nFor the devs\nGitHub: https://github.com/near \nDev Docs: https://docs.near.org/\nDevhub: https://devhub.near.page/ @NEARDevHub\n\nConnect with socials\nTwitter:   / nearprotocol  \nBlog: https://near.org/blog/\nMedium:   / nearprotocol  \n#NEAR #nearprotocol #NEARAI","channel_name":"NEAR Protocol","published_at":"2025-02-21T00:00:00.000Z","thumbnail_url":"https://img.youtube.com/vi/5wr9ltBUm9s/hqdefault.jpg","transcript_text":"want hello hello we are back live again here at devhub live uh less than 24 hours little more 24 hours ago that we are back with an awesome bonus Workshop uh I hope you saw the news but in case you did not see the news uh recently or just yesterday uh shade agents was announced and shade agents are autonomous agents that uh we're going to talk all about today uh I am super excited for my guest uh this is Matt lock here from proximity and I have had Matt on all of my different shows over the years now multiple times he's probably the guest I've had on the most uh so I am excited to one more time and probably many more times in the future uh have Matt here to kind of walk us through shade agents Matt thanks for joining us oh you muted mant okay no problem great to be here here Sor just tweeting it out making sure everybody jumps on the live stream yeah appreciate it appreciate it yeah so I I'm super excited to talk about this one because this is actually something I really I don't know much about it so I am also coming in just like the rest of the audience kind of coming in cold so I'm excited to hear what didn't do no I didn't do the homework I have some questions but yeah let's um let's start high level before we jump into any code or anything like that um what are shade agents okay so just at a very high level um we've heard a lot of stuff AI agents crypto uh trusted execution environments otherwise known as te's or some people say te you know yeah um a lot of these Technologies are floating around and shade agents uh simply put are basically we want some worker code you know we want some codee that can basically uh that can tweet we want some code that can talk to you know web 2 apis maybe maybe llms uh you know that are external to the code that's running and um ideally we want to know that that code is doing what it says it's doing um and also in some instances we want to know that that code is running confidentially so how do we do that right well we typically we put that code inside a a trusted execution environment so in the shade agent stack we call that a worker agent it's running inside a t but now the question comes how do you manage Keys how do you manage user funds how do you manage the protocol funds how do you uh you know manage things like uh like uh price feeds for for things that are happening in the protocol how do you get the the thing the code that's inside the T to be verified protocol itself so we have a smart contract that can basically take What's called the attestation of the T which proves that it's running the code that it's running and proves that it's running in a trusted execution environment we have a smart contract that can verify that and then we have uh various design patterns that can basically uh block off methods of the smart contract and restrict access to them uh only if they're coming from those particular worker agents and then if you sprinkle a little near chain signatures and chain abstraction on top of that yeah do we get we get decentralized key management on top of that so now we manage we can manage users deposits we can manage manage funds we can basically custody crypto assets um so these agents can basically serve as non-custodial uh agents over you know crypto assets and they can do stuff so if you're coming at this from like the AI meme space um and and thinking like you know oh here's some AI agent that was launched with a token you could think of shade agents as being able to launch an AI agent that is a token okay is a token right so the agent and the contract are so are so tightly coupled that the agent fully embodies what it means to be on chain what it means to be a token right so that's what's really exciting here and that's what we're really uh we like that's what we're really excited about yeah yeah no it sounds exciting and so is the adastation part the piece that probably because like in my mind I hear like autonomous agents and I use a lot of AI in my workflows now and it's not perfect by any means so is the anation part the the piece where I can feel more comfortable that my agent is just not going rogue as well is that where um it I know what actually this agent is doing from time to time that's exactly it yeah so when you run a worker agent in the shade agent stack in a t you basically uh get this remote attestation that says it's inside the te but you also get one other critical piece of information you get actually the code has of the docker image that was deployed so basically what we're doing here is we're we're taking our code like our our arbitrary agent code we're we're dockerizing it then we get this Docker image hash and when we run inside of T we can extract not just the remote attestation which is which is part of the whole T you know secure Enclave blah blah blah kind of stuff not only can we verify that remote outstation but we also get along with that the the code hash of the code that's running so we can go over and we can point at that Docker image and we can say hey same Hash Hash Hash you know and we can make sure that these agents are I think what you're kind of asking is like can we make unrug agents answer is yes you and that's another very exciting part about it so yeah great question and uh we can actually we can make these unreg agents and then once we connect them to the smart contract if that agent is in charge of a token minting tokens launching a tokens managing something some some ecosystem or a dow or or a price Oracle or whatever that agent is that thing on chain got it interesting interesting cool uh where do you want to begin with all of this well what I'm goingon to show you is uh we've put together um basically a template of the shade agent stock so uh I'm going to go ahead and I'm going to kind of bumble my way through a deployment of it it's not that long or complicated um but I'll just talk about a little bit of the moving parts and then what we can do is we can focus in on the key parts of the code in in the worker agent and then uh the parts the corresponding parts in the smart contract that give it that tight coupling that I've been talking about nice you you want to go ahead and do that yeah let's do that okay cool um just share the window that I'm in um and let me know if I got to zoom in or do anything like that Joe just looking good yeah okay looking good for now so um the one thing I want to draw everybody to is github.com near defy shade D agent DT template so you'll find this in the in the near defi organization github.com near defi but it's basically the shade agent template and what this template has is uh it has those two components I'm talking about it is in fact a nextjs app that gets deployed onto F Cloud we'll talk about them in just a sec when we deploy it but it also has a a near smart contract so it has both components there um I'm G to go ahead and just uh I'm going to go to the docker compose here this is some yaml here to uh basically just deploy one so I've already got one here I'm just going to destroy it and uh I'll show you how to do this so phic Cloud let me just give a little kind of primer on that phic cloud is basically a like a cloud deployment uh service for running T's so uh we're running trusted execution environments and what they're going to do is they're going to take my Docker compose yaml here and they're going to deploy an instance so I'll just call this uh sh I'll call it Shady um so I'll paste that in and you can see right here it's pulling this Docker image and there's a shot 256 hash on that Docker image and I just it's not a very complicated worker agent it's just a template for talking to the smart contract registering getting that remote attestation and that code hash which is the the hash we're looking at right now and uh I'll show you what that looks like in a sec we'll walk through the UI for this template which is basically just a way to kind of walk through setting up this agent and uh we'll just let it we'll just let it boot up uh give me one sec Joe I'm just get I'm just going to uh stop the sharing for just I'm gonna I'm going to open up uh my near wallet because I do have to fund the agent but I just don't want anything to fly up because I I didn't bring it up ahead of time yeah no no no no problem I want to make sure I'm just on on um on testnet here with my near wallet yeah yeah for sure just one sec one of the things that definitely seems to be unique here again is that the is the well maybe I'm Mis interpreting but is the logic really being driven by the smart contract here and the agent is just Asing acting as the interface or is there more logic being baked into the agent as well um uh sorry could you repeat that yeah so when we talk about like the the logic of what the agent's going to do is it being largely driven by the contract itself or by the agent or some kind of both so the logic yeah that's a great question um just one sec I'm I'm just I obviously I can't multitask it's okay just one sec I unfortunately uh on this laptop I didn't have my test net wallet set up so uh no worries and I do have to fund this little guy so uh hang on one suck yeah I'm gonna bring up something while you're doing that so if people uh no no worries no worries no worries at all we we we can make magic happen live uh so people didn't check out um the uh recent here blog article I would definitely go check that out on n.org uh it really kind of gives an overview of what Jade AG are there some uh nice Graphics here to kind of explain what Matt is going to show us and walk us through here of how the uh whole stack works the teen all that other parts of it are kind of interacting with the agent and everything else from there uh there's also if you go down to the bottom there's links to everything that Matt is showing here as well like the GitHub template uh you know the actual docs for it as well for shade agents and then you know we're going to talk about how chain signatures and everything else fits into this as well so you can see all those pieces here all on the blog all right yeah that was a great overview and that's at near. Shader there's some some short and sweet URL to get there I'll find it okay um so I'm back I got my my near wallet booted up again um and if we look at phic Cloud here um I've got Shady running so basically all I did was kind of use the docker uh the docker yaml um from the shade agent template repo um and then and then we just deployed on F and it was was pretty pretty easy it's also it's very fast too this uh I wasn't making excuses for f like it's lightning quick like they boot up these agents in like less than a minute and stuff yeah um so I mentioned so this agent it's an xjs app so it has it has an API like it has a back end it's like node.js kind of back end and it's you know it could it could it could talk to Services it could like if you give it your your LM credentials for some llm service it could talk to that it could it can do a lot of stuff um but this is just the template so we're just going to walk through the core piece of like registering this particular worker agent in the smart contract that we deployed so I'm going to go ahead and just boot up um the page for this and it says you know based agent template and what right away it says fund the worker agent account so the worker agent has its own ephemeral near account and one thing that that you can ask me about this again Joe when we just get through get through kind of one run through of this is that this account that the the T could go offline so the instance of our worker agent could go offline and this account could get lost but that doesn't stop us from basically having other worker agents and we'll talk about that in just a sec okay um but I'm going to go ahead and fund that account right now I'm just gonna shoot it one near this is uh running on testut so don't really care just fund it with one near by the way you could fund these transactions with meta transactions and stuff too so like if the if the te goes offline with that particular account you wouldn't lose the near right right there would be no near in that account you'd just be funding it with meta transactions so you know there are ways to deal with us so now that it's funded we've got our funds in there and what we want to do is we're going to register the worker agent in the smart contract so I've already deployed the smart contract that corresponds with the worker agent and um you know when you're doing your projects with the shade agent template and shade agent stack you're going to modify the smart contract and you're going to deploy um deploy that your yourself so you're going to change this this is just an environment variable for the contract ID and then you're going to deploy obviously your own worker agents so we'll talk about like you asked that question earlier about like where's the logic and stuff we'll talk about the division of like where we think like it's it's kind of necessary to break down the logic between the worker agent and the smart contract we talk about that as well um so I'm going to go ahead and register um this just hits a method in the smart contract now this actually passes in the remote attestation and it actually the the remote attestation is basically like um think of it like a web certificate okay basically uh getting verified by the near smart contract so now so now ourt has been verified in the near smart contract and uh and we've also passed in the code hash so we can get the worker info so the check sum actually hold on sorry that that auto closes a little too quick somebody should change that um I'm gonna go to um I'm GNA go to the attestation Explorer for phac cloud this is a really kind of cool service that they have and they have the these attestations here it says report and then there's some hash so I copied the check sum from my running agent now now this isn't really crucial to your to your project or whatever but you could Point people at your attestation on the pH Cloud Explorer too and say Hey look it's verified right and it's also the same check sum for the attestation that is now burned into our into our near contract for our shade agent so that that's why I keep saying like there's this tight coupling there between the two and this code hash the 67 B7 and blah blah blah blah blah this one is the same as the one that was in the docker yaml so what do we know now what do we know after we've registered our our shade agent our like our shade agent worker agent we know we know our worker agent is definitely running the code in that Docker image and we also know because of the attestation being verified by pH and by our smart contract by the way our smart contracts using the exact same code that valy uses on that atation Explorer to to basically check that it's verified as well so it's it's this rust code and basically the rust code's running in our near contract and it's running on chain so that's pretty cool um so now what do we know we know basically from these two pieces of information we know the code that it's running and we know that it's is actually running in a te um now what we can do is we can call a protected method so we're calling is verified by code has so there's a Code has in the smart contract that it's expecting you know so it's expecting that this worker agent is calling with this particular code hash from this particular near account and it's expecting that those two things match so we've stored our worker agent um inside our near contract based on their worker agent account we've also stored the check sum and the code hash and here we're actually calling a method that would otherwise it would otherwise throw an exception if we didn't have all of these pieces matched up if we didn't have this like nice tight coupling between basically code running in a t and smart contract we deployed so does this all kind of Click does this make yeah so I think just it Mak sure everyone watching understand as well too so this initial part is basically allowing is that Lo it's it's saying look everything here is now verified with each other so anything going forward here we've now coupled this agent working with this contract on this te and now going forward anything that happens from here we know is verified yeah let's take a look at this diagram which is in sort of you know the blog post and the read me and the and the notion page and stuff um this is on the read me on the shade agent template um so you guys can take a look at it but yeah it's it's basically um what we've been talking about but just to kind of hammer home the concept one more time um we have got a trusted execution environment that's this like dark kind of uh rectangle here on the inside and we've got this worker agent code that's running inside of it we derived an account we got a remote ad to station that says that it is in fact running inside a trusted execution environment and we've got some actions right like maybe we want to call a method in the smart contract or whatever right um now this worker agent uh can talk to external apis compute storage that are outside of the trusted execution environment but we know that we know that the sort of requests and response that the worker agents making to those outside Services we can still see them inside the te environment and so by virtue of kind of verifying that code hash we still know how the worker agent is going to uh handle those responses so the a the like when people talk about you know agentic AI the behaviors the commands the responses everything the worker agent does is still inside the te even if it does rely on some external sources it's how the worker agent is going to interpret those resources and eventually uh sort of act and interact with the smart contract that's important right so let me ask you quick question here maybe I'm just talking out pocket is this almost like having a personal Oracle and the reason I say this is because I'm am I'm able to go outside and get external data right and yes maybe the data is not fully verified because it depends on what the data source is right but at least for myself that agent is verifying that he got it from the place I asked it to get it from we know that it's coming in it can now talk to my smart contract it becomes that middle man for whatever my activity might be is that a reasonable analogy very good analogy yeah this could be your own personal Oracle so for example let's say you go to that let's say you go to let's say you want to trade right and let's say you go to that outside price source and and this price Source let's say this price source is even malicious but but your worker agent let's say you just put in a piece of code you said hey you know what I'm not I'm not messing around with any wild price swings you know I'm not messing around with anything that's too far outside of what I know to be normal right right and so the worker agent could get a price feed from you know a bogus Source or we could have one of these major kind of swings or whatever that uh that isn't really you know in crypto some of some of those candles are notate right right this worker agent could actually have code that actually kind of buffers and protects the eventual sort of the eventual consumers of that in the smart contract and again out on because of chain signatures out on multiple chains um this worker agent could protect against that and that could be like your personal kind of a price Oracle and then and that's like you could choose the way that you would want those prices to be interpreted right right interesting yeah so again like uh we've got the worker agent code running in the trusted execution environment and that's really how it like how it talks to you know an and also by by the way by the same virtue I mean what do we know about llms I mean like sometimes the kind of stuff they're coming back with not so not so great you know not so factual so we might not want to make decisions based on that so that's where we can have our worker agent code kind of be like the buffer before we actually go to the smart contract method to like make to take some actual meaningful crypto AC on that so that's uh that's basically like the stack and and it's um we're really excited because we know we can verify the code in here in the worker agent and we know we can uh we can restrict worker agents to calling only particular smart contract methods as well yeah I'm gonna scoot down to the bottom to kind of talk actually wait sorry I got one thing to talk about here so um this is kind of an important diagram and on the left side we're talking about basically current kind of te implementations a lot of people are talking about putting agents inside trusted execution environments for sure and that's that's a great uh goal um what we've seen though is that we've seen a lot of people try to handle uh this is a little key down here in Black we've seen people try to handle the key management inside the T so what happens when an agent goes offline and it's managing the key that talk to the smart contract and stuff well you got problems right um and so you really need a decentralized key management um solution and so with these worker agents like I remember I funded this account and I basically said yeah you know you could just throw one near at it you can use you can use meta transactions it doesn't really matter what this account is because in our stack the real Key Management is handled on the smart contract so the worker agent you could think of the worker agent as really like kind of like it's kind of a stateless like non-custodial agent it doesn't it doesn't really do anything it's uh it's just it just has rules so you could have deterministic rules for how to deal with prices like hey I'm not gonna accept anything upper upper or lower than this you could have stochastic uh kind of rules that are based on the responses from llms but basically you just have the stateless rules and then you have these actions on the smart contract and the smart contract is really where the keys are managed managed and we can manage keys for user deposits we can manage keys for a protocol uh we can manage keys for representing kind of members in a dow and stuff so we could have like one particular one particular variant of a worker agent is represented in the smart contract like let's call them worker agent a or I like to call worker agent007 you know right uh operating on the smart contract and that worker agent could go offline like the the dev who's running the te could run out of money AWS screws them over something happens right right now as long as they can boot up a new instance of the worker agent with the same code they can have access to the same smart contract methods so they're still worker agent007 they're just the new instance right so is this um and maybe I'm jumping ahead so you can tell me we'll wait later but this is though what enables the chain signatures and chain abstraction because we're putting the keys in the cont with the contract versus the actual agent yeah exactly and here I've got multiple worker agents with code hasore a and they can all they can all access the smart contract method all because they have they have they're running the particular piece of codee right and then in in a different design we could think okay well I'm GNA have a smart contract but I'm GNA have code has a and I'm gonna have code hasb and so we can have two different worker agents uh with different kind with different code bases operating on one sort of smart contract protocol right so we got this protocol for trading and and it's got you know it's got a price agent and it's got a resolver agent for trades it's got a you know it's got a picker agent a sequencer agent it's got all these different agents and stuff and they can all operate on different parts of the contract but the real key is if you're running the code in the worker agent you can call the method in the smart contract and that's how we've sort of um we created that that that bond between the two got it cool yeah so we're pretty excited about it um I can dive into like a little bit of the code too if you want to get like kind of super nerdy here for a sec yeah I mean yeah let's let's go through that because um I I'm seeing I'm seeing the picture here and I'm seeing what really starting to differentiate these type of Agents from other things that are out there in the market today so I think it might be good to kind of then let's pull some of the code in here and see yeah sorry I just I grabbed the wrong I went to the public Tab and not the uh the pages so I'm gonna duplicate a couple of ones here um so that we can just kind of hold them up at the same time yeah um I'm going to just pull up the contract just give me one sec okay so I'm going to pull up two pieces of code here uh on the worker agent side so what we're going to look at first is we're going to look at um uh oh I I lost the diagram but it's okay we're going to look at the worker agent so that is the code running inside of the T um and this is running basically a nextjs app but we're just going to look at two two of the critical pieces of code here okay and what I mean by critical pieces of code is with that worker agent um if we look at the UI actually we're really only concerned with how do we get the account like how does how is this account derived because obviously we would not want this worker agent's account to be exfiltrated because if somebody if somebody could boot up a worker agent with a particular code hash that that allows them to call these protected methods of the smart contract but the key was leaked right and that's another sorry that's another cool aspect of running inside the t is that exfiltration of data running inside the T because it's confidential and it's a trusted execution environment is very difficult so as long as the code is not leaking out this near account um we can be sure that only instances running the codebase can actually call the methods and then the other one is the code hash so we'll look at the code hash part in a sec but first how do we derive the account okay so when a t is booted up there's just a tiny and this is just a tiny bit of code but just to give people some assurances of like how are these uh ephemeral accounts related to the T being booted up because they do represent the access to those methods on the smart contract so we create some inmemory Randomness you know we just use you know crypto subtle crypto whatever you want to call it get random values so we fill an array 32 values and then down here uh in the production Environ M of a t running on ph Cloud we basically get this tap D client so this allows us to access some information about the t's hardware and one of the things we do is we call derive key so we we even feed in Randomness to that and then basically we get a hash of this in we we take a hash of the inmemory randomness the one I created up here um which is unique to that instance of the T um and then we also take the T entropy and basically I concatenate those and I create a hash and what do we use that hash for well we use that to generate a seed phrase for a near account um and then basically uh we get the we get an implicit account from the public key and then we set the key for that implicit account to the secret key now we do have to make sure that the data. secret key in this codebase is never exfiltrated so there there is some code to inspect with a worker agent that that should actually be kind of inspected audited looked at but you can tell right away it's very very small amount of code all we have to do is make sure that when the accounts derived and and by the way set key is just calling you know set key on the near key store and remember it's an inmemory key store so we're in memory we're in a trusted execution environment as long as we just generate the secret key and put it straight into the inmemory key store and we don't tamper with it we're good does that make sense yep makes a to of sense y cool so that very little code to to inspect like so audit you know audits shouldn't be exhaustive and they they don't have to be crazy you just say hey look this is where I generate the key then I put it in the in memory key store and we're done and they go oh okay you know cool so um shade agent template register uh on the on the ne on the next year app so again this is under Pages it's just the nextjs kind of typical structure Pages API register so how do we register our our shade agent so once again we go get that tap D client endpoint um now this uh this particular uh this first thing we're going to do is we're going to call client get info so this is getting info from the T environment you know basically from the hardware like that it's running and what it's pulling out here is it's pulling out that Docker composed yaml and it's actually extracting the code has from it so again this is like running so every time you you deploy a worker agent on ph Cloud it sits on top of like it deploys your Docker image but there's also this other service running called f is daack and what we're doing here when we when we call client get info is we're pulling the codee hash out of that D stack and that D stack f they these guys know what they're doing that's all good that's audited that's pretty hardened right so we're pulling the a piece of the docker compos yaml that has our code hash out of that daack and into our app because we're eventually going to register in the smart contract so now what we do is we get the the attestation quote so this is a TDX quote so again you don't need to know the ins and outs of these quotes and stuff but they're basically think of them like web certificates you know begin certificate and certificate there's a bunch of data about the certificate and then what it does is it actually makes an end run through um through these Intel uh these special URLs called like pccs URLs makes an end run through there goes and gets a bunch of extra information about that we're using a an endpoint here for convenience that F exposed um it gets all this information about the certificate and also like the kind of like the root uh like kind of web of trust for the certificate and then finally once we have uh these four arguments and again the last two the last two are just the ones that we want to store in our con contract the first two arguments are really important it's the quote it's the quote itself and then this collateral is sort of the extra information from that URL I was talking about about that quote that attestation quote so that these two are what our contract needs to actually verify the quote and then once it's verified in the contract we're going to store these two pieces of information got it okay I know I know it's a lot you don't really need to like if you're just if you just want to like launch an agent and have some fun you don't need to know all this right no yeah yeah yeah no but it's it makes sense to talk it through a little bit here so for sure for sure so I I wrote in the contract I just wrote you know register args are here you know like and this is this is what we just looked at right yeah so I mean I sorry I got to update that URL we've kind of moved it around a little bit but uh register worker uh is what we call on the contract and basically what what I said was we're going to pass in the quote and then this collateral from the URL and basically uh we just have to kind of parse a few things and we also have to get the current time um because we want to verify that the attestation quote is up to date and everything and then we call this verify method now this is coming from a crate uh that pH put out it's called Decap qal you don't really need to know what goes on inside the crate but like I told you you know it's basically taking the quote is like a certificate then it's taking the certificate and this extra collateral about like where the certificate came from and stuff and like what is the root web of trust and it's basically just verifying it so it it's checking the web of trust and all the cryptography around that quote and it's basically coming up with you know is this verified and so it's going to spit back you know true or false and then what the contract the the worker agent contract does is it says okay if the result is okay and there's some there's some result there and by the way it gives back like a report with some information about the attestation as well and there's if you're really kind of nerdy and you're into this T stuff that verified report will have a lot of extra data in there that you can dig into if you want to but here just checking that the existence of a of a verified you know attestation report is coming back from our call to verify and then what we're going to do is we're going to store uh you know typical near Fashion we store the account ID of the caller of this method the predecessor and we insert worker by account ID we insert predecessor and then we insert worker with those last two arguments I was talking about the check sum so we can we can verify the attestation on the pH Explorer if we want to like later or or show it to our users or whatever we want to do just to be you know verified right but also we store the code has and why we store the code has is obviously so we can do some interesting things like we can we can protect methods uh and make sure that they're that they're protected by approved code hashes so I've got a method here just as an example where it's verified by approved code has and and here to approve a code has you'd have to be the owner of the contract now we're not going to we can go down the design routes of like you know should the owner of the contract be able to arbitrarily throw up new code hashes to be approved that's I was going to ask like can you have multiple things like that but really we're focused on just the the one yeah we're focused on just like the template this is a basic example of sort of showing showing that it is possible to to basically Safeguard a method by by an approved by a registered worker agent with an approved codh and and this pattern of like allowing the contract owner to just approve arbitrary code ases obviously not the best pattern so in in in practice you would probably release your contract with uh you know with an approved code hash but then you would you would have to add in some upgrade logic that would allow like it would allow the developers of the protocol maybe to push a new code has but for instance there could be like a cool down period where uh like if users have funds deposited in the protocol sure they could basically uh there there could be a cool down period of like a week or something where the devs are like okay we're rolling out a new worker agent and you know here's the code here's the code hash we're going to give it access to the same methods that the previous agent had if you guys are cool with it you you know you've got seven days to decide and then all the users can come to the contract and withdraw if they don't like it or they can just leave their funds in right so we leave this up to the developer as to like what they're going to do with this pattern and all of this cool kind of stuff and how they can uh like UPG agents and stuff I'll just kind of scroll down again to these diagrams like uh they're way at the bottom um yeah so we basically facilitated this where you know worker agents can call protected methods in the smart contract or you can have multiple agents calling different methods we created a template that facilitates this but we don't really prescribe to you how like how you should use this in the contract and I just in I threw in a whole kitchen sink of like helper methods just to get your mind going about all the different possibilities but make no mistake Joe like this is big like this is big we've got these worker agents uh you know running inside these trusted execution environments and now we can we can definitely verify like know that they are only able to talk to these methods in the smart contract and not only that the smart contract like the the worker agents running inside the te the agents are not the custody of funds it's the protocols are are now like we're back on chain we're back on centralized Key Management we're we're on we're on any chain with with signatures you know so we're we're in a good spot but we still get to run arbitrary code and call those methods with agent and by having the funds with on the protocol side that also prevents the let's say for whatever reason the LM hallucinates and calls the wrong contract okay for whatever reason now you're not so concerned about that because the logic that's in there and the contract whatever else and the funds are now still tied into the agent being connected to that particular contract or can it go kind of rogue sorry sorry repeat that again sorry so if if I by the funds being in the protocol at the protocol level instead of it being directly t to the agent that if for some reason the llm hallucinates and now calls the wrong contract okay it's trying to do something my funds though are still protected because the connection is between that agent and that particular contract and so even if it makes a mistake it's not going to just start like sending out funds exactly yeah so you so you can have you can have the best what do we know about code right in in runtime in in practice right you could have the best code in the world you know you have all these checks for all these edge cases and you know um I think back to the days when I was a kid and I ran like a like a PC you know you you could still get the blue screen of death 100% right and so these worker agents like I said they could they could they could be talking to llms it could be hallucinating they could be getting bad price feeds from offchain doesn't even matter if the llm is running inside a trusted execution Environ that doesn't give you any guarantees so I guess the big question is um down here you know we had this diagram like uh or wait this one uh with the current T implen like why would you give an agent a key right so what we're doing instead is we're giving a worker agent just ephemeral like an ephemeral access as an instance of that code to talk to the smart contract where the real key Management's done so you can build in all these protection balances against llms hallucinating this and that blah blah blah blah blah and then you can build in like the final kind of hard and fast rules around custody of assets and uh and Key Management in your smart contract so um instead of like otherwise uh if can you see my cursor I can yep yeah otherwise like like if we if we didn't have the smart contract sort of in play here or if it was kind of a very naive kind of pass through contract that just let the worker agent do whatever you know um we would barely be drawing an arrow directly from here to these assets and that wouldn't be very good right we even if we thought we had the best agentic code framework on the planet right you still always running that risk yeah sure yeah yep makes sense cool yeah so um one more thing uh just to go through uh uh I forgot we had another diagram here in the readme um and just this kind of just shows the delineation between the worker agent and the smart contract and what kind of what a typical registration flow would be like and then kind of where the loops are once the agents registered because some people might be thinking like hey you mentioned like you're verifying web certificates in the smart contract on chain isn't that expensive yeah it's a little pricey uh to just register but you know on near a little pricey like three cents you know right right right so to register sure it does it does cost a certain amount but then every transaction after that is really just doing that require check the code hash get the worker that's cheap that's super cheap right so let's go through like the the deployment of the worker agent so you deploy check if the account and this is what I did in the very beginning deploy check if the account's funded no fund account is it registered no okay call register get the remote attestation get the code hash pop it in then the smart contract takes over is the attestation verified no okay we're going to throw an error so the worker agent can't get can't get registered if the attestation is basically is crap right right but if the attestation is verified then you know yes yes yes yes registered yes attestation verified we can start making transactions in the contract so transaction approved code hash am I allowed to do this transaction you know like am I allowed to call this method yes return output no throw air right yeah so this is the flow and then eventually once our worker agent is booted and registered the first time we're really just doing you know we're just doing like this all day long like transaction transaction transaction right and then sure check approved codh yes return outut so we're really just doing these three uh from our worker agent we're calling transaction and we're just ripping straight through if we're approved to Output so yeah we we think that like we think the Stack's pretty cool and we think that we've kind of thought of um we think we've thought of a lot of the uh uh like the current like a lot of the current kind of um like I guess pain points in the space is like you know I want to launch an agent and I want to have a token for the agent but I really want I really want the token like I I want people who who you know who want to be part of this ecosystem I want them to understand that the agent is the token and it's not a token a token that some Dev launched that sort of represents some agent in a cloud maybe it's in a te maybe it's not even in a te that's just chatting on some Twitter account you know or or doing some sort of right mind share Tweeting or sort of uh you know like um crypto insights or whatever you know hey know check this out so I like I think that people are kind of the the the meme space in the in the AI agents is kind of kind of falling apart a little bit and I think and especially meme tokens have kind of taking a dive lately I think people are hungry for Quality they're hungry for Quality agents and quality product products what we think this is going to replace is we think this is going to probably replace a lot of human intermediaries K Kendall spoke about this yesterday on the live stream we think that shade agents um they have that kind of they have that non-custodial verifiability like they have a lot of things built into the stack and uh what we think they could replace is they could replace a lot of like human actors that are currently in in spots in defi so like for example you know there's there's price oracles and there's lots of things happening and you know it's a lot of kind of you know there there's still a few humans in the process and stuff and we could probably replace them with agents or are instan of worker agents that are that are basically shade agents because they're verified by the contract as well um we could create a lot of um we could create a lot of fun kind of um like app chain style stuff um so a lot of people are booting up you know they're making a game and they're booting up an app chain um it's an LL it's an L2 you know and they're and they're they're committing to the L1 and they're doing all this stuff but really I mean the whole game logic could be running in an instance of a worker agent you know and then periodically just burning its state to you know to the smart contract right right because these worker agents can talk to you know they can have they can talk to The Wider web they can do all sorts of stuff I mean they could do websockets they could do anything so you could do a lot of fun use cases in that yeah I was gonna ask about that like because because of the way it's structured and it's it is sitting on the regular call it web to whatever um you can really treat it like it's O its own API system so I could send any kind of data like you said I could use websockets whatever I want that to be for me on on top so the agent doesn't have to be the product it can be part of the product that I'm building as well for sure yeah yeah and I mean there's like there's so much you could do uh you don't even have to build an agent right like we're just we're talking about agents lately and agentic Ai and especially you know having agents kind of manage crypto assets or or manage processes in defi like I said you know price things and resolving trades and things like that having agents manage that is sort of a a big theme and Trend coming up and and I do think that like a lot of infrastructure will sort of be kind of replaced with good Agent code um that that other otherwise would have had to kind of rely on kind of humans in the process and stuff I mean you could actually think of um here's a great example like sometimes in um in a in like a web predictions market like people basically betting on the outcome of something there's uh there's a conflict right so what what was the actual outcome and then there's there's these protocols with these very complicated you know conflict dispute resolution you got to get 12 people from over here and 17 people from over here and like everybody's got to vote in and do all this stuff that's complicated right now we could play uh you know we could play a lower Stakes game of this and just basically uh as long as the the two three or or or basically the the X X parties on the one side of the prediction and the Y parties on the other side of the prediction as long as they're all basically willing to trust this worker agent code hash like I said you know they can go look at the code if they want and the llm uh that is going to resolve their prediction then uh that's it that like that's the end of the game and and basically the worker agent will will sort of re in on the smart contract and the funds will be distributed right does that kind of make sense it does it does so I mean it feels like I could you know ideas that come to mind of like if I wanted to make my own like personalized mini decks like there there's certain actions I always want to do you know that could build that out the human I'm replacing maybe is myself right like let's say I I know that every couple weeks I do a consultation work and I get paid a certain way and now I want that to be transferred to my base account whatever it might be right I could start to build in my own agent that is processing all that for me I'm no longer going through those manual steps it's just doing that accounting for me you could package up that shade too and you could sell it to somebody else and you say listen like do you want do you want your own instance of this kind of personal Dex shade agent yeah interesting now one thing I um I meant to ask earlier is so the data going in to this because it's in the trust execution environment even though I can verify the code maybe I I I don't see data in and data out is that correct because that's staying in the environment yeah if if you're looking for more like data in data out Providence things like that probably look to some of the other projects that near AI are doing like azimoff protocol and things like that they're they're working on solving that problem the shade agent stock doesn't inherently solve sort of like you know a garbage in garbage out problem um right you know but you but you can write code that could uh maybe recycle garbage well or what if I wanted to put like personal information like what if I built an agent was about like my health and so I don't want to expose that is this environment in this structure able to handle like private information like that yes so actually trusted execution environments and and like like ones like f cloud and stuff they are confidential as well so any like I mentioned like I mean the worker agent the worker agent is handling uh basically in its memory a secret key to talk to the contract right and and represent its sort of claim that it's running this particular code has so again like that Emeral near account is tied to that code base and it talks to the contract but how do you know that that e that memory is not getting out or that data is not getting out of the worker agent well they do run confidentially so I'm not sure so much about like private storage options or something like that but if you wanted to have that worker agent like loading data that was encrypted for example from an encrypted data store I mean you could have the worker agent encrypt everything in memory and then when you send it out to storage it can actually be stored fully encrypted then the work and when you need it the worker agent can pull that in decrypt it with its key that's in memory and and basically go from there yeah interesting and I I guess my larger point was trying to get at too for like people who are looking to build here is that like you are not bound by just the concept of tokens and defi so it is much like people can really start to experiment this architecture what I find interesting is that it's solving a lot of problems that I have been seeing right now in current AI architecture but it doesn't have to just the defi is the easy example tokens are easy example it doesn't have to be that it could be whatever you think that you want to build out yeah we've got a couple of experiments that are kind of going to launch next week for East Denver just for fun and stuff so for example uh we've got a worker agent that is going to be connected to a Twitter account and then you know when you talk to it and and if you provide uh if you provide positive sentiment about shade agents you'll get rewarded with tokens and if you provide negative sentiment about shade agents you'll get rewarded with a different token and what we're doing here is we're really just hammering home that concept that the worker agent is the only one that can mint those tokens um that's a very that's a very it's a toy example right like what do we know from these toy examples is that they can turn into something a lot bigger and like I mentioned before with like with in the case of app chains and the case of like sort of games and stuff like a lot of games are are sort of running as their own app chains and stuff and I personally think that that might be wholly unnecessary uh with this kind of Stack because I mean a game really just needs you know some sort of brain about the game State and the logic and how to sort of resolve what the next moves are and stuff right do a lot more you can do a lot more with the codebase inside a truck sugested execution environment then you could say running on an app chain or uh or basically running with some sort of zero knowledge kind of kind of architecture right this is just this is just regular you know code it's just whatever you want to write it in JavaScript we we've got another agent for next week uh that's written in Python so we're going to add a python worker agent to the shade agent stack as a template so we got another agent coming that's written in Python that agent uh basically talks to uh to kaido and it finds out who's got mind share and then it basically uh it's going to trade assets based on M share and we're just gonna we're probably not g We're Not Gonna open that up to the public and say Hey you can deposit and this m share agent will will trade for you we're just going to launch the agent with the shade agent stack and we're just we're going to put in our own funds just as an example and we're just going to kind of chart how the agent's doing over time right interesting interesting um before we wrap up I do have one sorry I I fully shamelessly I should say we've got the AI hackathon going on I'm sure you know all the details we've got East Denver coming up I'm sure you got all the details so please show those but my big call to builders is just to understand that this is this is really really kind of like it I can't say really really and then kind of right this is really a big deal so it's it's such a big deal that we just feel so strongly about it that basically quality agents that can actually um manage crypto assets and and do things and ha and have users deposit into chain signatures accounts from all different chains and stuff um and then the worker agents are verified and everything this is huge like this is a big kind of step forward in the in these Frameworks and architectures and stuff and again like you know I work at proximity and we do a lot of This research and development we're just giving this away for free we want people to build with this stack because we think that it is actually like we believe in in true non-custodial defi we think this is the way forward so we think it should appeal to uh a lot of serious developers and and even some of the project teams that you've you sort of seen or heard about that are building AI Frameworks I mean they're you know they're kind of interested in this and we think other Builder should be too yeah for sure I mean I've been talking to a lot of different um AI groups not just on the show but just outside of it as well and I I will say this is not just Shilling um this architecture is impressive and it makes so much more sense for building out things again that are supposed to be either both you know in you know controlling funds or or any kind of private information things like that um I do want to catch you with one question from the audience before we go sure um the question was can I support long running processes for example like scraping or kind of single transaction based yeah actually so so um I'm working on that that Twitter agent that I mentioned before and um that Twitter agent it doesn't use the Twitter apis it uses the it uses the Eliza OS uh agent agent Twitter client which is basically based on a Twitter scraper so awesome what I feed into it is I just feed into it credentials like um of my of just some arbitrary Twitter account and it basically like it handles all the login the off all that stuff and then it just goes and it it starts running searches and scraping so um the worker agent is basically um I mean I think the question was sort of around resources and stuff yeah and you look at pH Cloud um and by the way we currently can deploy on F Cloud we love these guys they're great we think they're the best like in the te- space so far I sound like Trump the best um no politics I'm Canadian um we think that F Cloud are doing great work in this space but there are other offerings out there and we are going to explore adding those just like we're adding a python template um to make a python worker agent because you know a lot of people are coding in Python and especially talking to llms in Python yeah we think that it's important to maybe have uh we're going to have uh the shade agent template and and sort of a shade agent stack for working with near AI which will'll be launching soon as well um but there's also other providers out there for teas but let's look at the resources here just for fun um oh it's under Advanced I think yeah compute resources so uh oh there's no available nodes right now whoops okay so they ran out of resources at the moment uh but you know should be back soon um but basically I've seen I've seen lots of Hardware options out there so can it handle scraping absolutely I I think I'll go I'll stop my screen now yeah can it handle scraping absolutely um like you know it's as big as you want to imagine it and also by the way this is another interesting thing like PHA might not be running gpus and and your llm might be hosted somewhere else but it doesn't mean that you can't host your llm somewhere else and have and have F talk the F worker agent talking to it right right now again like it's up to you as a developer how you want to kind of you know sell this narrative and stuff um about what the worker agent code that that is verified and sort of tightly coupled with a smart contract and that verifiability it's up to you what the worker agent code does does it talk to external resources are they are they good are they crap whatever that's up to you as a developer to decide and build nice thanks uh this was a great presentation I certainly learned a ton uh I I am certainly impressed with the work he guys of doing over there at proximity I'm L why we called it shade ages why is it called shade ages okay great for I should have asked that um well we actually we tried to call it something else we'll talk about it you you can figure it out for yourself uh but we just we ran into some sort of you know just some like n like just naming conflict it wasn't really nobody was really upset or anything but we just decided to shift to shade agents nobody's really kind of nobody usually using that nomenclature um why shade agents though because uh when you're running inside of te it is confidential um and you could think of like your worker agent and and the shade agent stack as kind of like you know the trench coats pulled up the sunglasses are on I got the Fedora you know sing around I'm and I'm I'm working in the shadows I'm getting you the good data I'm getting you you know I'm getting you the good inference The Right Stuff the right agentic code and I'm doing actions in the smart contract so this is your agent um they can be confidential and everything and they're working on behalf of you I loved your example by the way Joe of the personal decks and and trade trade agent it's uh it's something that I think is is definitely going to be a big narrative awesome yeah no very cool this is this is really cool I could see a ton of uses for I hope people check it out and it's really excited to see you guys do it e Denver as well so uh great stuff yeah we'll have lots more uh sort of like little announcements and and kind of posts coming out so yeah follow uh you know proximity fi um and obviously at near protocol um who will be kind of like you know retweeting and quoting and Shilling our our our our shade agents yeah we've got a lot of fun coming up and uh we're looking for more Builders so definitely uh Reach Out get in touch awesome awesome well thank you so much for your time today I really appreciate it this was great yeah I really appreciate it joob thanks thanks Matt uh yeah folks that was awesome uh really definitely check it out all the links are below to get started yourself uh we also have as Matt alluded to there is a bunch of different hackathons going on right now um but right now the one trillion agent hackathon uh is still going on the deadline is March 2nd uh for you to get in there and tons of stuff to still be built There is almost 1,800 participants in that one uh it's fully online uh let me bring up that link below for you guys to see that as well uh so that will come scrolling across here make sure you're subscribed to devhub newsletter because we will also have all those updates so when proximity releases some cool new uh examples or whatever else that might be or updates to this stack uh we will have that in our newsletter so make sure you're following along there as well uh we will have all kinds of stuff next week as the Denver is going on we will have few different live shows uh we'll pretty much be live almost every day at some point next week so keep following along here uh if you have questions if you want to join into the conversation uh join the dev support Channel we can link you to the right spot make sure we get you in touch with the right people and kind of go from there uh so until next week uh enjoy your weekend folks and keep out keep building and until next time I'm Joe and we'll see you then bye","transcript_synced_at":"2026-11-03T05:06:52.392Z","segments":[{"start_seconds":0,"text":"want","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=0s"},{"start_seconds":30,"text":"hello hello we are back live again here at devhub live uh less than 24 hours","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=30s"},{"start_seconds":38,"text":"little more 24 hours ago that we are back with an awesome bonus Workshop uh I hope you saw the news but in case you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=38s"},{"start_seconds":45,"text":"did not see the news uh recently or just yesterday uh shade agents was announced","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=45s"},{"start_seconds":52,"text":"and shade agents are autonomous agents that uh we're going to talk all about today uh I am super excited for","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=52s"},{"start_seconds":60,"text":"my guest uh this is Matt lock here from proximity and I have had Matt on all of my different shows over the years now","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=60s"},{"start_seconds":69,"text":"multiple times he's probably the guest I've had on the most uh so I am excited to one more time and probably many more","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=69s"},{"start_seconds":77,"text":"times in the future uh have Matt here to kind of walk us through shade agents Matt thanks for joining","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=77s"},{"start_seconds":84,"text":"us oh you muted mant okay no problem great to be here here Sor just tweeting it out making","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=84s"},{"start_seconds":92,"text":"sure everybody jumps on the live stream yeah appreciate it appreciate it yeah so I I'm super excited to talk about this one because this is actually something I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=92s"},{"start_seconds":101,"text":"really I don't know much about it so I am also coming in just like the rest of the audience kind of coming in cold so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=101s"},{"start_seconds":107,"text":"I'm excited to hear what didn't do no I didn't do the homework I have some questions but yeah","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=107s"},{"start_seconds":116,"text":"let's um let's start high level before we jump into any code or anything like that um what are shade agents okay so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=116s"},{"start_seconds":124,"text":"just at a very high level um we've heard a lot of stuff AI agents crypto uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=124s"},{"start_seconds":131,"text":"trusted execution environments otherwise known as te's or some people say te you know yeah um a lot of these","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=131s"},{"start_seconds":141,"text":"Technologies are floating around and shade agents uh simply put are basically we want some worker code you know we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=141s"},{"start_seconds":150,"text":"want some codee that can basically uh that can tweet we want some code that can talk to you know web 2 apis maybe","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=150s"},{"start_seconds":157,"text":"maybe llms uh you know that are external to the code that's running and um","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=157s"},{"start_seconds":164,"text":"ideally we want to know that that code is doing what it says it's doing um and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=164s"},{"start_seconds":171,"text":"also in some instances we want to know that that code is running confidentially so how do we do that right well we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=171s"},{"start_seconds":179,"text":"typically we put that code inside a a trusted execution environment so in the shade agent stack we call that a worker","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=179s"},{"start_seconds":186,"text":"agent it's running inside a t but now the question comes how do you manage Keys how do you manage user funds how do","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=186s"},{"start_seconds":194,"text":"you manage the protocol funds how do you uh you know manage things like uh like uh price feeds for for things that are","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=194s"},{"start_seconds":203,"text":"happening in the protocol how do you get the the thing the code that's inside the T to be verified","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=203s"},{"start_seconds":210,"text":"protocol itself so we have a smart contract that can basically take What's called the attestation of the T which","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=210s"},{"start_seconds":219,"text":"proves that it's running the code that it's running and proves that it's running in a trusted execution environment we have a smart contract","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=219s"},{"start_seconds":225,"text":"that can verify that and then we have uh various design patterns that can basically uh block off methods of the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=225s"},{"start_seconds":233,"text":"smart contract and restrict access to them uh only if they're coming from those particular worker agents and then","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=233s"},{"start_seconds":242,"text":"if you sprinkle a little near chain signatures and chain abstraction on top of that yeah do we get we get decentralized key management on top of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=242s"},{"start_seconds":250,"text":"that so now we manage we can manage users deposits we can manage manage funds we can basically custody crypto","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=250s"},{"start_seconds":258,"text":"assets um so these agents can basically serve as non-custodial uh agents over","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=258s"},{"start_seconds":267,"text":"you know crypto assets and they can do stuff so if you're coming at this from like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=267s"},{"start_seconds":274,"text":"the AI meme space um and and thinking like you know oh here's some AI agent","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=274s"},{"start_seconds":280,"text":"that was launched with a token you could think of shade agents as being able to launch an AI agent that is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=280s"},{"start_seconds":290,"text":"a token okay is a token right so the agent and the contract are so are so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=290s"},{"start_seconds":296,"text":"tightly coupled that the agent fully embodies what it means to be on chain what it means to be a token right so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=296s"},{"start_seconds":305,"text":"that's what's really exciting here and that's what we're really uh we like that's what we're really excited about yeah yeah no it sounds exciting and so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=305s"},{"start_seconds":312,"text":"is the adastation part the piece that probably because like in my mind I hear like autonomous agents and I use a lot","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=312s"},{"start_seconds":320,"text":"of AI in my workflows now and it's not perfect by any means so is the anation part the the piece where I can feel more","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=320s"},{"start_seconds":328,"text":"comfortable that my agent is just not going rogue as well is that where um it","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=328s"},{"start_seconds":334,"text":"I know what actually this agent is doing from time to time that's exactly it yeah so when you run a worker agent in the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=334s"},{"start_seconds":343,"text":"shade agent stack in a t you basically uh get this remote attestation that says it's inside the te but you also get one","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=343s"},{"start_seconds":350,"text":"other critical piece of information you get actually the code has of the docker","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=350s"},{"start_seconds":357,"text":"image that was deployed so basically what we're doing here is we're we're taking our code like our our","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=357s"},{"start_seconds":367,"text":"arbitrary agent code we're we're dockerizing it then we get this Docker","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=367s"},{"start_seconds":373,"text":"image hash and when we run inside of T we can extract not just the remote attestation which is which is part of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=373s"},{"start_seconds":381,"text":"the whole T you know secure Enclave blah blah blah kind of stuff not only can we verify that remote outstation but we also get along with that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=381s"},{"start_seconds":390,"text":"the the code hash of the code that's running so we can go over and we can point at that Docker image and we can say hey same Hash Hash Hash you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=390s"},{"start_seconds":397,"text":"know and we can make sure that these agents are I think what you're kind of asking is like can we make unrug","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=397s"},{"start_seconds":406,"text":"agents answer is yes you and that's another very exciting part about it so yeah great question and uh we can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=406s"},{"start_seconds":413,"text":"actually we can make these unreg agents and then once we connect them to the smart contract if that agent is in","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=413s"},{"start_seconds":421,"text":"charge of a token minting tokens launching a tokens managing something some some ecosystem or a dow or or a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=421s"},{"start_seconds":429,"text":"price Oracle or whatever that agent is that thing on chain got it interesting","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=429s"},{"start_seconds":436,"text":"interesting cool uh where do you want to begin with all of this well what I'm goingon to show you is uh we've put","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=436s"},{"start_seconds":444,"text":"together um basically a template of the shade agent stock so uh I'm going to go ahead and I'm going to kind of bumble my way through a deployment of it it's not","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=444s"},{"start_seconds":453,"text":"that long or complicated um but I'll just talk about a little bit of the moving parts and then what we can do is we can focus in on the key parts of the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=453s"},{"start_seconds":461,"text":"code in in the worker agent and then uh the parts the corresponding parts in the smart contract that give it that tight","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=461s"},{"start_seconds":469,"text":"coupling that I've been talking about nice you you want to go ahead and do that yeah let's do that okay cool um","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=469s"},{"start_seconds":479,"text":"just share the window that I'm in um and let me know if I got to zoom in or do anything like that Joe just looking good","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=479s"},{"start_seconds":487,"text":"yeah okay looking good for now so um the one thing I want to draw everybody to is github.com","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=487s"},{"start_seconds":494,"text":"near defy shade D agent DT template so you'll find this in the in the near defi","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=494s"},{"start_seconds":502,"text":"organization github.com near defi but it's basically the shade agent template and what this template has is uh it has","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=502s"},{"start_seconds":510,"text":"those two components I'm talking about it is in fact a nextjs app that gets deployed onto F Cloud we'll talk about","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=510s"},{"start_seconds":518,"text":"them in just a sec when we deploy it but it also has a a near smart contract so it has both components there um I'm G to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=518s"},{"start_seconds":527,"text":"go ahead and just uh I'm going to go to the docker compose here this is some yaml here to uh basically just deploy","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=527s"},{"start_seconds":534,"text":"one so I've already got one here I'm just going to destroy it and uh I'll show you how to do this so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=534s"},{"start_seconds":542,"text":"phic Cloud let me just give a little kind of primer on that phic cloud is basically a like a cloud deployment uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=542s"},{"start_seconds":549,"text":"service for running T's so uh we're running trusted execution environments and what they're going to do is they're going to take my Docker compose yaml","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=549s"},{"start_seconds":558,"text":"here and they're going to deploy an instance so I'll just call this uh sh I'll call it Shady um so I'll paste that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=558s"},{"start_seconds":565,"text":"in and you can see right here it's pulling this Docker image and there's a shot 256 hash on that Docker image and I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=565s"},{"start_seconds":574,"text":"just it's not a very complicated worker agent it's just a template for talking to the smart contract registering","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=574s"},{"start_seconds":581,"text":"getting that remote attestation and that code hash which is the the hash we're looking at right now and uh I'll show you what that looks like in a sec we'll","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=581s"},{"start_seconds":589,"text":"walk through the UI for this template which is basically just a way to kind of walk through setting up this","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=589s"},{"start_seconds":597,"text":"agent and uh we'll just let it we'll just let it boot up uh give me one sec Joe I'm just get I'm just going to uh stop the sharing for just I'm gonna I'm","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=597s"},{"start_seconds":606,"text":"going to open up uh my near wallet because I do have to fund the agent but I just don't want anything to fly up because I I didn't bring it up ahead of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=606s"},{"start_seconds":614,"text":"time yeah no no no no problem I want to make sure I'm just on on um on testnet here with my near wallet yeah yeah for","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=614s"},{"start_seconds":621,"text":"sure just one sec one of the things that definitely","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=621s"},{"start_seconds":629,"text":"seems to be unique here again is that the is the well maybe I'm Mis interpreting but is the logic really being driven by the smart contract here","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=629s"},{"start_seconds":638,"text":"and the agent is just Asing acting as the interface or is there more logic being baked into the agent as","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=638s"},{"start_seconds":646,"text":"well um uh sorry could you repeat that yeah so when we talk about like the the logic of what the agent's going to do is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=646s"},{"start_seconds":653,"text":"it being largely driven by the contract itself or by the agent or some kind of both so the logic yeah that's a great","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=653s"},{"start_seconds":661,"text":"question um just one sec I'm I'm just I obviously I can't multitask it's okay","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=661s"},{"start_seconds":669,"text":"just one sec I unfortunately uh on this laptop I didn't have my test net wallet set up so uh no worries and I do have to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=669s"},{"start_seconds":675,"text":"fund this little guy so uh hang on one suck yeah I'm gonna bring up something while you're doing","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=675s"},{"start_seconds":683,"text":"that so if people uh no no worries no worries no worries at all we we we can make magic happen live uh so people","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=683s"},{"start_seconds":692,"text":"didn't check out um the uh recent here blog article I would definitely go check","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=692s"},{"start_seconds":699,"text":"that out on n.org uh it really kind of gives an overview of what Jade AG are there some uh nice Graphics here to kind","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=699s"},{"start_seconds":707,"text":"of explain what Matt is going to show us and walk us through here of how the uh whole stack works the teen all that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=707s"},{"start_seconds":715,"text":"other parts of it are kind of interacting with the agent and everything else from there uh there's also if you go down to the bottom","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=715s"},{"start_seconds":723,"text":"there's links to everything that Matt is showing here as well like the GitHub template uh you know the actual docs for","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=723s"},{"start_seconds":730,"text":"it as well for shade agents and then you know we're going to talk about how chain signatures and everything else fits into this as well so you can see all those","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=730s"},{"start_seconds":737,"text":"pieces here all on the blog all right yeah that was a great overview and that's at near.","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=737s"},{"start_seconds":747,"text":"Shader there's some some short and sweet URL to get there I'll find it okay um so I'm back I got my my near","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=747s"},{"start_seconds":756,"text":"wallet booted up again um and if we look at phic Cloud here um I've got Shady","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=756s"},{"start_seconds":764,"text":"running so basically all I did was kind of use the docker uh the docker yaml um","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=764s"},{"start_seconds":771,"text":"from the shade agent template repo um and then and then we just deployed on F and it was was pretty pretty easy it's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=771s"},{"start_seconds":779,"text":"also it's very fast too this uh I wasn't making excuses for f like it's lightning quick like they boot up these agents in like less than a minute and stuff yeah","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=779s"},{"start_seconds":788,"text":"um so I mentioned so this agent it's an xjs app so it has it has an API like it has a back end it's like node.js kind of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=788s"},{"start_seconds":797,"text":"back end and it's you know it could it could it could talk to Services it could like if you give it your your LM credentials for some llm service it","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=797s"},{"start_seconds":805,"text":"could talk to that it could it can do a lot of stuff um but this is just the template so we're just going to walk through the core piece of like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=805s"},{"start_seconds":814,"text":"registering this particular worker agent in the smart contract that we deployed so I'm going to go ahead and just boot","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=814s"},{"start_seconds":820,"text":"up um the page for this and it says you know based agent template and what right away it says","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=820s"},{"start_seconds":829,"text":"fund the worker agent account so the worker agent has its own ephemeral near account and one thing that that you can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=829s"},{"start_seconds":837,"text":"ask me about this again Joe when we just get through get through kind of one run through of this is that this account","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=837s"},{"start_seconds":844,"text":"that the the T could go offline so the instance of our worker agent could go offline and this account could get lost","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=844s"},{"start_seconds":854,"text":"but that doesn't stop us from basically having other worker agents and we'll talk about that in just a sec okay um but I'm going to go ahead and fund that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=854s"},{"start_seconds":862,"text":"account right now I'm just gonna shoot it one near this is uh running on testut so don't really care just fund it with one near by the way you could fund these","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=862s"},{"start_seconds":872,"text":"transactions with meta transactions and stuff too so like if the if the te goes offline with that particular account you wouldn't lose the near right right there","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=872s"},{"start_seconds":880,"text":"would be no near in that account you'd just be funding it with meta transactions so you know there are ways to deal with us so now that it's funded","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=880s"},{"start_seconds":888,"text":"we've got our funds in there and what we want to do is we're going to register the worker agent in the smart contract so I've already deployed the smart","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=888s"},{"start_seconds":896,"text":"contract that corresponds with the worker agent and um you know when you're doing your projects with the shade agent template and shade agent stack you're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=896s"},{"start_seconds":904,"text":"going to modify the smart contract and you're going to deploy um deploy that your yourself so you're going to change this this is just","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=904s"},{"start_seconds":912,"text":"an environment variable for the contract ID and then you're going to deploy obviously your own worker agents so we'll talk about like you asked that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=912s"},{"start_seconds":920,"text":"question earlier about like where's the logic and stuff we'll talk about the division of like where we think like it's it's kind of necessary to break","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=920s"},{"start_seconds":929,"text":"down the logic between the worker agent and the smart contract we talk about that as well um so I'm going to go ahead and register um this just hits a method","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=929s"},{"start_seconds":937,"text":"in the smart contract now this actually passes in the remote attestation and it actually the the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=937s"},{"start_seconds":945,"text":"remote attestation is basically like um think of it like a web certificate okay","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=945s"},{"start_seconds":951,"text":"basically uh getting verified by the near smart contract so now so now ourt","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=951s"},{"start_seconds":958,"text":"has been verified in the near smart contract and uh and we've also passed in the code hash so we can get the worker","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=958s"},{"start_seconds":965,"text":"info so the check sum actually hold on sorry that that auto closes a little too quick somebody should change","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=965s"},{"start_seconds":973,"text":"that um I'm gonna go to um I'm GNA go to the attestation","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=973s"},{"start_seconds":981,"text":"Explorer for phac cloud this is a really kind of cool service that they have and they have the these attestations here it","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=981s"},{"start_seconds":991,"text":"says report and then there's some hash so I copied the check sum from my running agent now now this isn't really","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=991s"},{"start_seconds":1000,"text":"crucial to your to your project or whatever but you could Point people at your attestation on the pH Cloud","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1000s"},{"start_seconds":1007,"text":"Explorer too and say Hey look it's verified right and it's also the same check sum for the attestation that is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1007s"},{"start_seconds":1016,"text":"now burned into our into our near contract for our shade agent so that that's why I keep saying like there's this tight coupling there between the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1016s"},{"start_seconds":1023,"text":"two and this code hash the 67 B7 and blah blah blah blah blah this one is the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1023s"},{"start_seconds":1031,"text":"same as the one that was in the docker yaml so what do we know now what do we know after we've registered our our","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1031s"},{"start_seconds":1039,"text":"shade agent our like our shade agent worker agent we know we know our worker agent is definitely running the code in","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1039s"},{"start_seconds":1047,"text":"that Docker image and we also know because of the attestation being verified by pH and by our smart contract by the way our smart contracts using the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1047s"},{"start_seconds":1056,"text":"exact same code that valy uses on that atation Explorer to to basically check that it's verified as well so it's it's this rust code and basically the rust","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1056s"},{"start_seconds":1065,"text":"code's running in our near contract and it's running on chain so that's pretty cool um so now what do we know we know","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1065s"},{"start_seconds":1073,"text":"basically from these two pieces of information we know the code that it's running and we know that it's is actually running in a te um now what we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1073s"},{"start_seconds":1081,"text":"can do is we can call a protected method so we're calling is verified by code has so there's a Code has in the smart contract that it's expecting you know so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1081s"},{"start_seconds":1090,"text":"it's expecting that this worker agent is calling with this particular code hash from this particular near account and it's expecting that those two things","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1090s"},{"start_seconds":1099,"text":"match so we've stored our worker agent um inside our near contract based on their worker agent account we've also","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1099s"},{"start_seconds":1107,"text":"stored the check sum and the code hash and here we're actually calling a method that would otherwise it would otherwise","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1107s"},{"start_seconds":1114,"text":"throw an exception if we didn't have all of these pieces matched up if we didn't have this like nice tight coupling","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1114s"},{"start_seconds":1122,"text":"between basically code running in a t and smart contract we deployed so does this all kind of Click does this make","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1122s"},{"start_seconds":1129,"text":"yeah so I think just it Mak sure everyone watching understand as well too so this initial part is basically","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1129s"},{"start_seconds":1138,"text":"allowing is that Lo it's it's saying look everything here is now verified with each other so anything going forward here we've now coupled this","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1138s"},{"start_seconds":1147,"text":"agent working with this contract on this te and now going forward anything that happens from here we know is verified","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1147s"},{"start_seconds":1157,"text":"yeah let's take a look at this diagram which is in sort of you know the blog post and the read me and the and the notion page and stuff um this is on the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1157s"},{"start_seconds":1164,"text":"read me on the shade agent template um so you guys can take a look at it but yeah it's it's basically um what we've been talking about but just to kind of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1164s"},{"start_seconds":1173,"text":"hammer home the concept one more time um we have got a trusted execution environment that's this like dark kind","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1173s"},{"start_seconds":1180,"text":"of uh rectangle here on the inside and we've got this worker agent code that's running inside of it we derived an","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1180s"},{"start_seconds":1187,"text":"account we got a remote ad to station that says that it is in fact running inside a trusted execution environment and we've got some actions right like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1187s"},{"start_seconds":1196,"text":"maybe we want to call a method in the smart contract or whatever right um now this worker agent uh can talk to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1196s"},{"start_seconds":1204,"text":"external apis compute storage that are outside of the trusted execution environment but we know that we know","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1204s"},{"start_seconds":1211,"text":"that the sort of requests and response that the worker agents making to those outside Services we can still see them","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1211s"},{"start_seconds":1218,"text":"inside the te environment and so by virtue of kind of verifying that code hash we still know how the worker agent","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1218s"},{"start_seconds":1226,"text":"is going to uh handle those responses so the a the like when people talk about","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1226s"},{"start_seconds":1234,"text":"you know agentic AI the behaviors the commands the responses everything the worker agent does is still inside the te","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1234s"},{"start_seconds":1242,"text":"even if it does rely on some external sources it's how the worker agent is going to interpret those resources and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1242s"},{"start_seconds":1249,"text":"eventually uh sort of act and interact with the smart contract that's important right so let me ask you quick question","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1249s"},{"start_seconds":1257,"text":"here maybe I'm just talking out pocket is this almost like having a personal Oracle and the reason I say this is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1257s"},{"start_seconds":1265,"text":"because I'm am I'm able to go outside and get external data right and yes","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1265s"},{"start_seconds":1272,"text":"maybe the data is not fully verified because it depends on what the data source is right but at least for myself that agent is verifying that he got it","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1272s"},{"start_seconds":1281,"text":"from the place I asked it to get it from we know that it's coming in it can now talk to my smart contract it becomes","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1281s"},{"start_seconds":1287,"text":"that middle man for whatever my activity might be is that a reasonable analogy","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1287s"},{"start_seconds":1295,"text":"very good analogy yeah this could be your own personal Oracle so for example let's say you go to that let's say you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1295s"},{"start_seconds":1302,"text":"go to let's say you want to trade right and let's say you go to that outside price source and and this price Source let's say this price source is even","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1302s"},{"start_seconds":1311,"text":"malicious but but your worker agent let's say you just put in a piece of code you said hey you know what I'm not","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1311s"},{"start_seconds":1318,"text":"I'm not messing around with any wild price swings you know I'm not messing around with anything that's too far","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1318s"},{"start_seconds":1325,"text":"outside of what I know to be normal right right and so the worker agent could get a price feed from you know a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1325s"},{"start_seconds":1333,"text":"bogus Source or we could have one of these major kind of swings or whatever that uh that isn't really you know in","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1333s"},{"start_seconds":1340,"text":"crypto some of some of those candles are notate right right this worker agent could actually have code that actually","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1340s"},{"start_seconds":1348,"text":"kind of buffers and protects the eventual sort of the eventual consumers of that in the smart contract and again","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1348s"},{"start_seconds":1355,"text":"out on because of chain signatures out on multiple chains um this worker agent could protect against that and that could be like your personal kind of a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1355s"},{"start_seconds":1364,"text":"price Oracle and then and that's like you could choose the way that you would want those prices to be interpreted right right","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1364s"},{"start_seconds":1373,"text":"interesting yeah so again like uh we've got the worker agent code running in the trusted execution environment and that's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1373s"},{"start_seconds":1380,"text":"really how it like how it talks to you know an and also by by the way by the same virtue I mean what do we know about llms I mean like sometimes the kind of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1380s"},{"start_seconds":1389,"text":"stuff they're coming back with not so not so great you know not so factual so we might not want to make decisions based on that so that's where we can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1389s"},{"start_seconds":1397,"text":"have our worker agent code kind of be like the buffer before we actually go to the smart contract method to like make","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1397s"},{"start_seconds":1405,"text":"to take some actual meaningful crypto AC on that so that's uh that's basically","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1405s"},{"start_seconds":1411,"text":"like the stack and and it's um we're really excited because we know we can verify the code in here in the worker","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1411s"},{"start_seconds":1419,"text":"agent and we know we can uh we can restrict worker agents to calling only particular smart contract methods as","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1419s"},{"start_seconds":1427,"text":"well yeah I'm gonna scoot down to the bottom to kind of talk actually wait sorry I got one thing to talk about here","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1427s"},{"start_seconds":1435,"text":"so um this is kind of an important diagram and on the left side we're talking about basically current kind of te implementations a lot of people are","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1435s"},{"start_seconds":1444,"text":"talking about putting agents inside trusted execution environments for sure and that's that's a great uh goal um","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1444s"},{"start_seconds":1452,"text":"what we've seen though is that we've seen a lot of people try to handle uh this is a little key down here in Black we've seen people try to handle the key","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1452s"},{"start_seconds":1461,"text":"management inside the T so what happens when an agent goes offline and it's managing the key that talk to the smart","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1461s"},{"start_seconds":1469,"text":"contract and stuff well you got problems right um and so you really need a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1469s"},{"start_seconds":1475,"text":"decentralized key management um solution and so with these worker agents like I remember I funded this account and I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1475s"},{"start_seconds":1484,"text":"basically said yeah you know you could just throw one near at it you can use you can use meta transactions it doesn't really matter what this account is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1484s"},{"start_seconds":1492,"text":"because in our stack the real Key Management is handled on the smart contract so the worker agent you could","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1492s"},{"start_seconds":1500,"text":"think of the worker agent as really like kind of like it's kind of a stateless like non-custodial agent it","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1500s"},{"start_seconds":1508,"text":"doesn't it doesn't really do anything it's uh it's just it just has rules so you could have deterministic rules for","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1508s"},{"start_seconds":1516,"text":"how to deal with prices like hey I'm not gonna accept anything upper upper or lower than this you could have","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1516s"},{"start_seconds":1523,"text":"stochastic uh kind of rules that are based on the responses from llms but basically you just have the stateless","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1523s"},{"start_seconds":1530,"text":"rules and then you have these actions on the smart contract and the smart contract is really where the keys are managed managed and we can manage keys","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1530s"},{"start_seconds":1540,"text":"for user deposits we can manage keys for a protocol uh we can manage keys for representing kind of members in a dow","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1540s"},{"start_seconds":1548,"text":"and stuff so we could have like one particular one particular variant of a worker agent is represented in the smart","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1548s"},{"start_seconds":1557,"text":"contract like let's call them worker agent a or I like to call worker agent007 you know right uh operating on the smart contract and that worker agent","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1557s"},{"start_seconds":1566,"text":"could go offline like the the dev who's running the te could run out of money AWS screws them over something happens","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1566s"},{"start_seconds":1573,"text":"right right now as long as they can boot up a new instance of the worker agent with the same code they can have access","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1573s"},{"start_seconds":1581,"text":"to the same smart contract methods so they're still worker agent007 they're just the new instance right so is this","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1581s"},{"start_seconds":1590,"text":"um and maybe I'm jumping ahead so you can tell me we'll wait later but this is though what enables the chain signatures and chain abstraction because we're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1590s"},{"start_seconds":1598,"text":"putting the keys in the cont with the contract versus the actual agent yeah exactly and here I've got multiple","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1598s"},{"start_seconds":1606,"text":"worker agents with code hasore a and they can all they can all access the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1606s"},{"start_seconds":1613,"text":"smart contract method all because they have they have they're running the particular piece of codee right and then","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1613s"},{"start_seconds":1620,"text":"in in a different design we could think okay well I'm GNA have a smart contract but I'm GNA have code has a and I'm","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1620s"},{"start_seconds":1627,"text":"gonna have code hasb and so we can have two different worker agents uh with different kind with different code bases","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1627s"},{"start_seconds":1635,"text":"operating on one sort of smart contract protocol right so we got this protocol for trading and and it's got you know","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1635s"},{"start_seconds":1642,"text":"it's got a price agent and it's got a resolver agent for trades it's got a you know it's got a picker agent a sequencer agent it's got all these different","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1642s"},{"start_seconds":1651,"text":"agents and stuff and they can all operate on different parts of the contract but the real key is if you're running the code in the worker agent you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1651s"},{"start_seconds":1659,"text":"can call the method in the smart contract and that's how we've sort of um we created that that that bond between the two got","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1659s"},{"start_seconds":1668,"text":"it cool yeah so we're pretty excited about it um I can dive into like a little bit of the code too if you want to get like kind of super nerdy here for","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1668s"},{"start_seconds":1676,"text":"a sec yeah I mean yeah let's let's go through that because um I I'm seeing I'm","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1676s"},{"start_seconds":1684,"text":"seeing the picture here and I'm seeing what really starting to differentiate these type of Agents from other things that are out there in the market today","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1684s"},{"start_seconds":1691,"text":"so I think it might be good to kind of then let's pull some of the code in here and see yeah sorry I just I grabbed the wrong I went to the public Tab and not","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1691s"},{"start_seconds":1699,"text":"the uh the pages so I'm gonna duplicate a couple of ones here um so that we can just kind of hold them up at the same","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1699s"},{"start_seconds":1707,"text":"time yeah um I'm going to just pull up the contract just give me one sec okay so I'm going to pull up two","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1707s"},{"start_seconds":1715,"text":"pieces of code here uh on the worker agent side so what we're going to look at first is we're going to look at","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1715s"},{"start_seconds":1722,"text":"um uh oh I I lost the diagram but it's okay we're going to look at the worker agent so that is the code running inside","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1722s"},{"start_seconds":1729,"text":"of the T um and this is running basically a nextjs app but we're just going to look at two two of the critical","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1729s"},{"start_seconds":1737,"text":"pieces of code here okay and what I mean by critical pieces of code is with that worker agent um if we look at the UI","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1737s"},{"start_seconds":1745,"text":"actually we're really only concerned with how do we get the account like how does how is this account derived because","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1745s"},{"start_seconds":1753,"text":"obviously we would not want this worker agent's account to be exfiltrated because if somebody if somebody could","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1753s"},{"start_seconds":1760,"text":"boot up a worker agent with a particular code hash that that allows them to call these protected methods of the smart","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1760s"},{"start_seconds":1766,"text":"contract but the key was leaked right and that's another sorry that's another cool aspect of running inside the t is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1766s"},{"start_seconds":1775,"text":"that exfiltration of data running inside the T because it's confidential and it's a trusted execution environment is very difficult so as long as the code is not","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1775s"},{"start_seconds":1783,"text":"leaking out this near account um we can be sure that only instances running the codebase can actually call the methods","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1783s"},{"start_seconds":1792,"text":"and then the other one is the code hash so we'll look at the code hash part in a sec but first how do we derive the account okay so when a t is booted up","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1792s"},{"start_seconds":1801,"text":"there's just a tiny and this is just a tiny bit of code but just to give people some assurances of like how are these uh ephemeral accounts related to the T","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1801s"},{"start_seconds":1808,"text":"being booted up because they do represent the access to those methods on the smart contract so we create some inmemory Randomness you know we just use","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1808s"},{"start_seconds":1817,"text":"you know crypto subtle crypto whatever you want to call it get random values so we fill an array 32 values and then down","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1817s"},{"start_seconds":1825,"text":"here uh in the production Environ M of a t running on ph Cloud we basically get this tap D client so this allows us to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1825s"},{"start_seconds":1834,"text":"access some information about the t's hardware and one of the things we do is we call derive key so we we even feed in","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1834s"},{"start_seconds":1842,"text":"Randomness to that and then basically we get a hash of this in we we take a hash of the inmemory randomness the one I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1842s"},{"start_seconds":1850,"text":"created up here um which is unique to that instance of the T um and then we also take the T entropy and basically I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1850s"},{"start_seconds":1860,"text":"concatenate those and I create a hash and what do we use that hash for well we use that to generate a seed phrase for a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1860s"},{"start_seconds":1867,"text":"near account um and then basically uh we get the we get an implicit account from the public key and then we set the key","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1867s"},{"start_seconds":1876,"text":"for that implicit account to the secret key now we do have to make sure that the data. secret key in this codebase is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1876s"},{"start_seconds":1885,"text":"never exfiltrated so there there is some code to inspect with a worker agent that that should actually be kind of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1885s"},{"start_seconds":1892,"text":"inspected audited looked at but you can tell right away it's very very small amount of code all we have to do is make","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1892s"},{"start_seconds":1900,"text":"sure that when the accounts derived and and by the way set key is just calling you know set key on the near key store","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1900s"},{"start_seconds":1907,"text":"and remember it's an inmemory key store so we're in memory we're in a trusted execution environment as long as we just","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1907s"},{"start_seconds":1915,"text":"generate the secret key and put it straight into the inmemory key store and we don't tamper with it we're good does that make sense yep makes a to of sense","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1915s"},{"start_seconds":1924,"text":"y cool so that very little code to to inspect like so audit you know audits shouldn't be exhaustive and they they","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1924s"},{"start_seconds":1932,"text":"don't have to be crazy you just say hey look this is where I generate the key then I put it in the in memory key store and we're done and they go oh okay you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1932s"},{"start_seconds":1940,"text":"know cool so um shade agent template register uh on the on the ne on the next","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1940s"},{"start_seconds":1947,"text":"year app so again this is under Pages it's just the nextjs kind of typical structure Pages API register so how do","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1947s"},{"start_seconds":1955,"text":"we register our our shade agent so once again we go get that tap D client","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1955s"},{"start_seconds":1961,"text":"endpoint um now this uh this particular uh this first thing we're going to do is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1961s"},{"start_seconds":1968,"text":"we're going to call client get info so this is getting info from the T environment you know basically from the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1968s"},{"start_seconds":1976,"text":"hardware like that it's running and what it's pulling out here is it's pulling out that Docker composed yaml and it's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1976s"},{"start_seconds":1984,"text":"actually extracting the code has from it so again this is like running so every time you you deploy a worker agent on ph","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1984s"},{"start_seconds":1991,"text":"Cloud it sits on top of like it deploys your Docker image but there's also this other service running called f is daack","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=1991s"},{"start_seconds":2000,"text":"and what we're doing here when we when we call client get info is we're pulling the codee hash out of that D stack and that D stack f","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2000s"},{"start_seconds":2008,"text":"they these guys know what they're doing that's all good that's audited that's pretty hardened right so we're pulling the a piece of the docker compos yaml","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2008s"},{"start_seconds":2017,"text":"that has our code hash out of that daack and into our app because we're eventually going to register in the smart contract so now what we do is we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2017s"},{"start_seconds":2025,"text":"get the the attestation quote so this is a TDX quote so again you don't need to know the ins and outs of these quotes","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2025s"},{"start_seconds":2033,"text":"and stuff but they're basically think of them like web certificates you know begin certificate and certificate there's a bunch of data about the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2033s"},{"start_seconds":2040,"text":"certificate and then what it does is it actually makes an end run through um through these Intel uh these special","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2040s"},{"start_seconds":2047,"text":"URLs called like pccs URLs makes an end run through there goes and gets a bunch of extra information about that we're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2047s"},{"start_seconds":2054,"text":"using a an endpoint here for convenience that F exposed um it gets all this information about the certificate and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2054s"},{"start_seconds":2063,"text":"also like the kind of like the root uh like kind of web of trust for the certificate and then finally once we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2063s"},{"start_seconds":2071,"text":"have uh these four arguments and again the last two the last two are just the ones that we want to store in our con contract the first two arguments are","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2071s"},{"start_seconds":2080,"text":"really important it's the quote it's the quote itself and then this collateral is sort of the extra information from that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2080s"},{"start_seconds":2086,"text":"URL I was talking about about that quote that attestation quote so that these two are what our contract needs to actually","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2086s"},{"start_seconds":2094,"text":"verify the quote and then once it's verified in the contract we're going to store these two pieces of information got it okay I know I know it's a lot you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2094s"},{"start_seconds":2103,"text":"don't really need to like if you're just if you just want to like launch an agent and have some fun you don't need to know all this right no yeah yeah yeah no but","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2103s"},{"start_seconds":2110,"text":"it's it makes sense to talk it through a little bit here so for sure for sure so I I wrote in the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2110s"},{"start_seconds":2118,"text":"contract I just wrote you know register args are here you know like and this is this is what we just looked at right yeah so I mean I sorry I got to update","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2118s"},{"start_seconds":2127,"text":"that URL we've kind of moved it around a little bit but uh register worker uh is what we call on the contract and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2127s"},{"start_seconds":2134,"text":"basically what what I said was we're going to pass in the quote and then this collateral from the URL and basically uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2134s"},{"start_seconds":2143,"text":"we just have to kind of parse a few things and we also have to get the current time um because we want to verify that the attestation quote is up","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2143s"},{"start_seconds":2150,"text":"to date and everything and then we call this verify method now this is coming from a crate uh that pH put out it's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2150s"},{"start_seconds":2160,"text":"called Decap qal you don't really need to know what goes on inside the crate but like I told you you know it's basically taking the quote is like a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2160s"},{"start_seconds":2168,"text":"certificate then it's taking the certificate and this extra collateral about like where the certificate came from and stuff and like what is the root","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2168s"},{"start_seconds":2176,"text":"web of trust and it's basically just verifying it so it it's checking the web of trust and all the cryptography around","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2176s"},{"start_seconds":2184,"text":"that quote and it's basically coming up with you know is this verified and so it's going to spit back you know true or","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2184s"},{"start_seconds":2192,"text":"false and then what the contract the the worker agent contract does is it says okay if the result is okay and there's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2192s"},{"start_seconds":2200,"text":"some there's some result there and by the way it gives back like a report with some information about the attestation as well and there's if you're really","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2200s"},{"start_seconds":2208,"text":"kind of nerdy and you're into this T stuff that verified report will have a lot of extra data in there that you can dig into if you want to but here just","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2208s"},{"start_seconds":2217,"text":"checking that the existence of a of a verified you know attestation report is coming back from our call to verify and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2217s"},{"start_seconds":2225,"text":"then what we're going to do is we're going to store uh you know typical near Fashion we store the account ID of the caller of this method the predecessor","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2225s"},{"start_seconds":2234,"text":"and we insert worker by account ID we insert predecessor and then we insert worker with those last two arguments I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2234s"},{"start_seconds":2241,"text":"was talking about the check sum so we can we can verify the attestation on the pH Explorer if we want to like later or","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2241s"},{"start_seconds":2249,"text":"or show it to our users or whatever we want to do just to be you know verified right but also we store the code has and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2249s"},{"start_seconds":2258,"text":"why we store the code has is obviously so we can do some interesting things like we can we can protect methods uh and make sure that they're that they're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2258s"},{"start_seconds":2266,"text":"protected by approved code hashes so I've got a method here just as an example where it's verified by approved","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2266s"},{"start_seconds":2273,"text":"code has and and here to approve a code has you'd have to be the owner of the contract now we're not going to we can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2273s"},{"start_seconds":2281,"text":"go down the design routes of like you know should the owner of the contract be able to arbitrarily throw up new code hashes to be approved that's I was going","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2281s"},{"start_seconds":2290,"text":"to ask like can you have multiple things like that but really we're focused on just the the one yeah we're focused on just like the template this is a basic","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2290s"},{"start_seconds":2298,"text":"example of sort of showing showing that it is possible to to basically Safeguard a method by by an approved by a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2298s"},{"start_seconds":2306,"text":"registered worker agent with an approved codh and and this pattern of like allowing the contract owner to just","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2306s"},{"start_seconds":2314,"text":"approve arbitrary code ases obviously not the best pattern so in in in practice you would probably release your","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2314s"},{"start_seconds":2323,"text":"contract with uh you know with an approved code hash but then you would you would have to add in some upgrade","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2323s"},{"start_seconds":2329,"text":"logic that would allow like it would allow the developers of the protocol maybe to push a new code has but for instance there could be like a cool down","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2329s"},{"start_seconds":2338,"text":"period where uh like if users have funds deposited in the protocol sure they could basically uh there there could be","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2338s"},{"start_seconds":2346,"text":"a cool down period of like a week or something where the devs are like okay we're rolling out a new worker agent and you know here's the code here's the code","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2346s"},{"start_seconds":2353,"text":"hash we're going to give it access to the same methods that the previous agent had if you guys are cool with it you you know you've got seven days to decide and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2353s"},{"start_seconds":2362,"text":"then all the users can come to the contract and withdraw if they don't like it or they can just leave their funds in right so we leave this up to the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2362s"},{"start_seconds":2371,"text":"developer as to like what they're going to do with this pattern and all of this cool kind of stuff and how they can uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2371s"},{"start_seconds":2378,"text":"like UPG agents and stuff I'll just kind of scroll down again to these diagrams like uh they're way at the bottom um","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2378s"},{"start_seconds":2386,"text":"yeah so we basically facilitated this where you know worker agents can call protected methods in the smart contract or you can have multiple agents calling","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2386s"},{"start_seconds":2394,"text":"different methods we created a template that facilitates this but we don't really prescribe to you how like how you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2394s"},{"start_seconds":2402,"text":"should use this in the contract and I just in I threw in a whole kitchen sink of like helper methods just to get your","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2402s"},{"start_seconds":2410,"text":"mind going about all the different possibilities but make no mistake Joe like this is big like this is big we've","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2410s"},{"start_seconds":2417,"text":"got these worker agents uh you know running inside these trusted execution environments and now we can we can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2417s"},{"start_seconds":2426,"text":"definitely verify like know that they are only able to talk to these methods in the smart contract and not only that the smart","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2426s"},{"start_seconds":2434,"text":"contract like the the worker agents running inside the te the agents are not the custody of funds it's the protocols are are now like we're back on chain","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2434s"},{"start_seconds":2443,"text":"we're back on centralized Key Management we're we're on we're on any chain with with signatures you know so we're we're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2443s"},{"start_seconds":2451,"text":"in a good spot but we still get to run arbitrary code and call those methods with agent and by having the funds with","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2451s"},{"start_seconds":2459,"text":"on the protocol side that also prevents the let's say for whatever reason the LM hallucinates and calls the wrong","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2459s"},{"start_seconds":2467,"text":"contract okay for whatever reason now you're not so concerned about that because the logic that's in there and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2467s"},{"start_seconds":2475,"text":"the contract whatever else and the funds are now still tied into the agent being","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2475s"},{"start_seconds":2482,"text":"connected to that particular contract or can it go kind of rogue sorry sorry repeat that again sorry so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2482s"},{"start_seconds":2491,"text":"if if I by the funds being in the protocol at the protocol level instead of it being directly t to the agent that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2491s"},{"start_seconds":2498,"text":"if for some reason the llm hallucinates and now calls the wrong contract okay it's trying to do something my funds","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2498s"},{"start_seconds":2505,"text":"though are still protected because the connection is between that agent and that particular contract and so even if","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2505s"},{"start_seconds":2512,"text":"it makes a mistake it's not going to just start like sending out funds exactly yeah so you so you can have you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2512s"},{"start_seconds":2521,"text":"can have the best what do we know about code right in in runtime in in practice right you could have the best code in the world you know you have all these","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2521s"},{"start_seconds":2529,"text":"checks for all these edge cases and you know um I think back to the days when I was a kid and I ran like a like a PC you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2529s"},{"start_seconds":2536,"text":"know you you could still get the blue screen of death 100% right and so these worker agents like I said they could they could they could be talking to llms","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2536s"},{"start_seconds":2544,"text":"it could be hallucinating they could be getting bad price feeds from offchain doesn't even matter if the llm is running inside a trusted execution","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2544s"},{"start_seconds":2551,"text":"Environ that doesn't give you any guarantees so I guess the big question is um down here you know we had this","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2551s"},{"start_seconds":2558,"text":"diagram like uh or wait this one uh with the current T implen like why would you give an agent a key right so what we're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2558s"},{"start_seconds":2568,"text":"doing instead is we're giving a worker agent just ephemeral like an ephemeral access as an instance of that code to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2568s"},{"start_seconds":2577,"text":"talk to the smart contract where the real key Management's done so you can build in all these protection balances against llms hallucinating this and that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2577s"},{"start_seconds":2586,"text":"blah blah blah blah blah and then you can build in like the final kind of hard and fast rules around custody of assets","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2586s"},{"start_seconds":2594,"text":"and uh and Key Management in your smart contract so um instead of like otherwise uh if can you see my cursor I can yep","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2594s"},{"start_seconds":2603,"text":"yeah otherwise like like if we if we didn't have the smart contract sort of in play here or if it was kind of a very naive kind of pass through contract that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2603s"},{"start_seconds":2612,"text":"just let the worker agent do whatever you know um we would barely be drawing an arrow directly from here to these","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2612s"},{"start_seconds":2619,"text":"assets and that wouldn't be very good right we even if we thought we had the best agentic code framework on the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2619s"},{"start_seconds":2627,"text":"planet right you still always running that risk yeah sure yeah yep makes sense cool yeah so um one more thing uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2627s"},{"start_seconds":2635,"text":"just to go through uh uh I forgot we had another diagram here in the readme um and just this kind of just shows the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2635s"},{"start_seconds":2642,"text":"delineation between the worker agent and the smart contract and what kind of what a typical registration flow would be","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2642s"},{"start_seconds":2650,"text":"like and then kind of where the loops are once the agents registered because some people might be thinking like hey you mentioned like you're verifying web","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2650s"},{"start_seconds":2659,"text":"certificates in the smart contract on chain isn't that expensive yeah it's a little pricey uh to just register but","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2659s"},{"start_seconds":2666,"text":"you know on near a little pricey like three cents you know right right right so to register sure it does it does cost","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2666s"},{"start_seconds":2674,"text":"a certain amount but then every transaction after that is really just doing that require check the code hash","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2674s"},{"start_seconds":2681,"text":"get the worker that's cheap that's super cheap right so let's go through like the the deployment of the worker agent so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2681s"},{"start_seconds":2689,"text":"you deploy check if the account and this is what I did in the very beginning deploy check if the account's funded no fund account is it registered no okay","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2689s"},{"start_seconds":2698,"text":"call register get the remote attestation get the code hash pop it in then the smart contract takes over is the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2698s"},{"start_seconds":2705,"text":"attestation verified no okay we're going to throw an error so the worker agent can't get can't get registered if the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2705s"},{"start_seconds":2712,"text":"attestation is basically is crap right right but if the attestation is verified then you know yes yes yes yes registered","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2712s"},{"start_seconds":2721,"text":"yes attestation verified we can start making transactions in the contract so transaction approved code hash am I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2721s"},{"start_seconds":2728,"text":"allowed to do this transaction you know like am I allowed to call this method yes return output no throw air right","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2728s"},{"start_seconds":2736,"text":"yeah so this is the flow and then eventually once our worker agent is booted and registered the first time we're really just doing you know we're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2736s"},{"start_seconds":2744,"text":"just doing like this all day long like transaction transaction transaction right and then sure check approved codh yes return outut so we're really just","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2744s"},{"start_seconds":2751,"text":"doing these three uh from our worker agent we're calling transaction and we're just ripping straight through if","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2751s"},{"start_seconds":2758,"text":"we're approved to Output so yeah we we think that like we think the Stack's pretty cool and we think that we've kind","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2758s"},{"start_seconds":2764,"text":"of thought of um we think we've thought of a lot of the uh uh like the current","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2764s"},{"start_seconds":2771,"text":"like a lot of the current kind of um like I guess pain points in the space is like you know I want to launch an agent","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2771s"},{"start_seconds":2780,"text":"and I want to have a token for the agent but I really want I really want the token like I I want people who who you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2780s"},{"start_seconds":2788,"text":"know who want to be part of this ecosystem I want them to understand that the agent is the token and it's not a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2788s"},{"start_seconds":2795,"text":"token a token that some Dev launched that sort of represents some agent in a cloud maybe it's in a te maybe it's not","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2795s"},{"start_seconds":2804,"text":"even in a te that's just chatting on some Twitter account you know or or doing some sort of right mind share","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2804s"},{"start_seconds":2811,"text":"Tweeting or sort of uh you know like um crypto insights or whatever you know hey know check this out so I like I think","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2811s"},{"start_seconds":2819,"text":"that people are kind of the the the meme space in the in the AI agents is kind of kind of falling apart a little bit and I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2819s"},{"start_seconds":2827,"text":"think and especially meme tokens have kind of taking a dive lately I think people are hungry for Quality they're hungry for Quality agents and quality","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2827s"},{"start_seconds":2834,"text":"product products what we think this is going to replace is we think this is going to probably replace a lot of human intermediaries K Kendall spoke about","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2834s"},{"start_seconds":2843,"text":"this yesterday on the live stream we think that shade agents um they have that kind of they have that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2843s"},{"start_seconds":2850,"text":"non-custodial verifiability like they have a lot of things built into the stack and uh what we think they could","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2850s"},{"start_seconds":2857,"text":"replace is they could replace a lot of like human actors that are currently in in spots in defi so like for example you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2857s"},{"start_seconds":2865,"text":"know there's there's price oracles and there's lots of things happening and you know it's a lot of kind of you know there there's still a few humans in the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2865s"},{"start_seconds":2874,"text":"process and stuff and we could probably replace them with agents or are instan of worker agents that are that are basically shade agents because they're","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2874s"},{"start_seconds":2882,"text":"verified by the contract as well um we could create a lot of um we could create","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2882s"},{"start_seconds":2889,"text":"a lot of fun kind of um like app chain style stuff um so a lot of people are booting up you know they're making a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2889s"},{"start_seconds":2898,"text":"game and they're booting up an app chain um it's an LL it's an L2 you know and they're and they're they're committing to the L1 and they're doing all this","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2898s"},{"start_seconds":2906,"text":"stuff but really I mean the whole game logic could be running in an instance of a worker agent you know and then periodically just burning its state to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2906s"},{"start_seconds":2915,"text":"you know to the smart contract right right because these worker agents can talk to you know they can have they can talk to The Wider web they can do all","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2915s"},{"start_seconds":2923,"text":"sorts of stuff I mean they could do websockets they could do anything so you could do a lot of fun use cases in that yeah I was gonna ask about that like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2923s"},{"start_seconds":2931,"text":"because because of the way it's structured and it's it is sitting on the regular call it web to whatever um you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2931s"},{"start_seconds":2938,"text":"can really treat it like it's O its own API system so I could send any kind of data like you said I could use","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2938s"},{"start_seconds":2946,"text":"websockets whatever I want that to be for me on on top so the agent doesn't have to be the product it can be part of","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2946s"},{"start_seconds":2954,"text":"the product that I'm building as well for sure yeah yeah and I mean there's like there's so much you could do uh you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2954s"},{"start_seconds":2963,"text":"don't even have to build an agent right like we're just we're talking about agents lately and agentic Ai and especially you know having agents kind","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2963s"},{"start_seconds":2971,"text":"of manage crypto assets or or manage processes in defi like I said you know price things and resolving trades and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2971s"},{"start_seconds":2979,"text":"things like that having agents manage that is sort of a a big theme and Trend coming up and and I do think that like a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2979s"},{"start_seconds":2987,"text":"lot of infrastructure will sort of be kind of replaced with good Agent code um that that other otherwise would have had","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2987s"},{"start_seconds":2995,"text":"to kind of rely on kind of humans in the process and stuff I mean you could actually think of um here's a great","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=2995s"},{"start_seconds":3001,"text":"example like sometimes in um in a in like a web predictions market like people basically betting on the outcome","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3001s"},{"start_seconds":3008,"text":"of something there's uh there's a conflict right so what what was the actual outcome and then there's there's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3008s"},{"start_seconds":3016,"text":"these protocols with these very complicated you know conflict dispute resolution you got to get 12 people from over here and 17 people from over here","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3016s"},{"start_seconds":3024,"text":"and like everybody's got to vote in and do all this stuff that's complicated right now we could play uh you know we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3024s"},{"start_seconds":3032,"text":"could play a lower Stakes game of this and just basically uh as long as the the two three or or or basically the the X X","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3032s"},{"start_seconds":3042,"text":"parties on the one side of the prediction and the Y parties on the other side of the prediction as long as they're all basically willing to trust","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3042s"},{"start_seconds":3050,"text":"this worker agent code hash like I said you know they can go look at the code if they want and the llm","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3050s"},{"start_seconds":3057,"text":"uh that is going to resolve their prediction then uh that's it that like that's the end of the game and and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3057s"},{"start_seconds":3065,"text":"basically the worker agent will will sort of re in on the smart contract and the funds will be distributed right does that kind of make sense it does it does","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3065s"},{"start_seconds":3073,"text":"so I mean it feels like I could you know ideas that come to mind of like if I wanted to make my own like personalized mini decks like there there's certain","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3073s"},{"start_seconds":3080,"text":"actions I always want to do you know that could build that out the human I'm replacing maybe is myself right like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3080s"},{"start_seconds":3087,"text":"let's say I I know that every couple weeks I do a consultation work and I get paid a certain way and now I want that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3087s"},{"start_seconds":3094,"text":"to be transferred to my base account whatever it might be right I could start to build in my own agent that is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3094s"},{"start_seconds":3101,"text":"processing all that for me I'm no longer going through those manual steps it's just doing that accounting for me you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3101s"},{"start_seconds":3108,"text":"could package up that shade too and you could sell it to somebody else and you say listen like do you want do you want","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3108s"},{"start_seconds":3115,"text":"your own instance of this kind of personal Dex shade agent yeah interesting now one thing I um I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3115s"},{"start_seconds":3125,"text":"meant to ask earlier is so the data going in to this because it's in the trust execution environment even though","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3125s"},{"start_seconds":3133,"text":"I can verify the code maybe I I I don't see data in and data out is that correct because that's staying in the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3133s"},{"start_seconds":3141,"text":"environment yeah if if you're looking for more like data in data out Providence things like that probably look to some of the other projects that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3141s"},{"start_seconds":3148,"text":"near AI are doing like azimoff protocol and things like that they're they're working on solving that problem the shade agent stock doesn't inherently","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3148s"},{"start_seconds":3157,"text":"solve sort of like you know a garbage in garbage out problem um right you know but you but you can write code that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3157s"},{"start_seconds":3164,"text":"could uh maybe recycle garbage well or what if I wanted to put like personal information like what if I built an agent was about like my health","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3164s"},{"start_seconds":3172,"text":"and so I don't want to expose that is this environment in this structure able to handle like private information like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3172s"},{"start_seconds":3180,"text":"that yes so actually trusted execution environments and and like like ones like f cloud and stuff they are confidential","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3180s"},{"start_seconds":3188,"text":"as well so any like I mentioned like I mean the worker agent the worker agent is handling uh basically in its memory a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3188s"},{"start_seconds":3197,"text":"secret key to talk to the contract right and and represent its sort of claim that it's running this particular code has so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3197s"},{"start_seconds":3205,"text":"again like that Emeral near account is tied to that code base and it talks to the contract but how do you know that that e that memory is not getting out or","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3205s"},{"start_seconds":3214,"text":"that data is not getting out of the worker agent well they do run confidentially so I'm not sure so much","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3214s"},{"start_seconds":3221,"text":"about like private storage options or something like that but if you wanted to have that worker agent like loading data","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3221s"},{"start_seconds":3230,"text":"that was encrypted for example from an encrypted data store I mean you could have the worker agent encrypt everything","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3230s"},{"start_seconds":3236,"text":"in memory and then when you send it out to storage it can actually be stored fully encrypted then the work and when","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3236s"},{"start_seconds":3245,"text":"you need it the worker agent can pull that in decrypt it with its key that's in memory and and basically go from","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3245s"},{"start_seconds":3253,"text":"there yeah interesting and I I guess my larger point was trying to get at too for like people who are looking to build here is that like you are not bound by","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3253s"},{"start_seconds":3261,"text":"just the concept of tokens and defi so it is much like people can really start to experiment this architecture what I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3261s"},{"start_seconds":3271,"text":"find interesting is that it's solving a lot of problems that I have been seeing right now in current AI architecture but it doesn't have to just the defi is the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3271s"},{"start_seconds":3279,"text":"easy example tokens are easy example it doesn't have to be that it could be whatever you think that you want to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3279s"},{"start_seconds":3286,"text":"build out yeah we've got a couple of experiments that are kind of going to launch next week for East Denver just for fun and stuff so for example uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3286s"},{"start_seconds":3295,"text":"we've got a worker agent that is going to be connected to a Twitter account and then you know when you talk to it and and if you provide uh if you provide","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3295s"},{"start_seconds":3304,"text":"positive sentiment about shade agents you'll get rewarded with tokens and if you provide negative sentiment about shade agents you'll get rewarded with a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3304s"},{"start_seconds":3313,"text":"different token and what we're doing here is we're really just hammering home that concept that the worker agent is the only one that can mint those tokens","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3313s"},{"start_seconds":3322,"text":"um that's a very that's a very it's a toy example right like what do we know from these toy examples is that they can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3322s"},{"start_seconds":3329,"text":"turn into something a lot bigger and like I mentioned before with like with in the case of app chains and the case","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3329s"},{"start_seconds":3336,"text":"of like sort of games and stuff like a lot of games are are sort of running as their own app chains and stuff and I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3336s"},{"start_seconds":3344,"text":"personally think that that might be wholly unnecessary uh with this kind of Stack because I mean a game really just needs you know some sort of brain about","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3344s"},{"start_seconds":3353,"text":"the game State and the logic and how to sort of resolve what the next moves are and stuff right do a lot more you can do","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3353s"},{"start_seconds":3360,"text":"a lot more with the codebase inside a truck sugested execution environment then you could say running on an app chain or uh or basically running with","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3360s"},{"start_seconds":3369,"text":"some sort of zero knowledge kind of kind of architecture right this is just this is just regular you know code it's just","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3369s"},{"start_seconds":3377,"text":"whatever you want to write it in JavaScript we we've got another agent for next week uh that's written in Python so we're going to add a python","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3377s"},{"start_seconds":3385,"text":"worker agent to the shade agent stack as a template so we got another agent coming that's written in Python that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3385s"},{"start_seconds":3392,"text":"agent uh basically talks to uh to kaido and it finds out who's got mind share and then it basically uh it's going to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3392s"},{"start_seconds":3400,"text":"trade assets based on M share and we're just gonna we're probably not g We're Not Gonna open that up to the public and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3400s"},{"start_seconds":3407,"text":"say Hey you can deposit and this m share agent will will trade for you we're just going to launch the agent with the shade","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3407s"},{"start_seconds":3415,"text":"agent stack and we're just we're going to put in our own funds just as an example and we're just going to kind of chart how the agent's doing over time","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3415s"},{"start_seconds":3423,"text":"right interesting interesting um before we wrap up I do have one sorry I I fully shamelessly I should say we've got the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3423s"},{"start_seconds":3431,"text":"AI hackathon going on I'm sure you know all the details we've got East Denver coming up I'm sure you got all the details so please show those but my big","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3431s"},{"start_seconds":3439,"text":"call to builders is just to understand that this is this is really really kind","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3439s"},{"start_seconds":3446,"text":"of like it I can't say really really and then kind of right this is really a big deal so it's it's such a big deal that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3446s"},{"start_seconds":3455,"text":"we just feel so strongly about it that basically quality agents that can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3455s"},{"start_seconds":3462,"text":"actually um manage crypto assets and and do things and ha and have users deposit into chain signatures accounts from all","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3462s"},{"start_seconds":3470,"text":"different chains and stuff um and then the worker agents are verified and everything this is huge like this is a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3470s"},{"start_seconds":3476,"text":"big kind of step forward in the in these Frameworks and architectures and stuff and again like you know I work at","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3476s"},{"start_seconds":3485,"text":"proximity and we do a lot of This research and development we're just giving this away for free we want people to build with this stack because we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3485s"},{"start_seconds":3492,"text":"think that it is actually like we believe in in true non-custodial defi we think this is the way forward so we","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3492s"},{"start_seconds":3499,"text":"think it should appeal to uh a lot of serious developers and and even some of the project teams that you've you sort of seen or heard about that are building","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3499s"},{"start_seconds":3508,"text":"AI Frameworks I mean they're you know they're kind of interested in this and we think other Builder should be too yeah for sure I mean I've been talking","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3508s"},{"start_seconds":3515,"text":"to a lot of different um AI groups not just on the show but just outside of it as well and I I will say this is not","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3515s"},{"start_seconds":3522,"text":"just Shilling um this architecture is impressive and it makes so much more sense for building out things again that","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3522s"},{"start_seconds":3531,"text":"are supposed to be either both you know in you know controlling funds or or any kind of private information things like that um I do want to catch you with one","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3531s"},{"start_seconds":3540,"text":"question from the audience before we go sure um the question was can I support long running processes for example like","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3540s"},{"start_seconds":3546,"text":"scraping or kind of single transaction based yeah actually so so um I'm working on that that Twitter agent that I","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3546s"},{"start_seconds":3554,"text":"mentioned before and um that Twitter agent it doesn't use the Twitter apis it uses the it uses the Eliza OS uh agent","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3554s"},{"start_seconds":3562,"text":"agent Twitter client which is basically based on a Twitter scraper so awesome what I feed into it is I just feed into","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3562s"},{"start_seconds":3570,"text":"it credentials like um of my of just some arbitrary Twitter account and it basically like it handles all the login","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3570s"},{"start_seconds":3578,"text":"the off all that stuff and then it just goes and it it starts running searches and scraping so um the worker agent is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3578s"},{"start_seconds":3585,"text":"basically um I mean I think the question was sort of around resources and stuff yeah and you look at pH Cloud um and by","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3585s"},{"start_seconds":3593,"text":"the way we currently can deploy on F Cloud we love these guys they're great we think they're the best like in the te- space so far I sound like Trump the","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3593s"},{"start_seconds":3600,"text":"best um no politics I'm Canadian um we think that F Cloud are doing great work","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3600s"},{"start_seconds":3608,"text":"in this space but there are other offerings out there and we are going to explore adding those just like we're adding a python template um to make a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3608s"},{"start_seconds":3616,"text":"python worker agent because you know a lot of people are coding in Python and especially talking to llms in Python yeah we think that it's important to","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3616s"},{"start_seconds":3624,"text":"maybe have uh we're going to have uh the shade agent template and and sort of a shade agent stack for working with near AI which will'll be launching soon as","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3624s"},{"start_seconds":3633,"text":"well um but there's also other providers out there for teas but let's look at the resources here just for fun um oh it's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3633s"},{"start_seconds":3641,"text":"under Advanced I think yeah compute resources so uh oh there's no available","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3641s"},{"start_seconds":3648,"text":"nodes right now whoops okay so they ran out of resources at the moment uh but you know should be back soon um but","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3648s"},{"start_seconds":3656,"text":"basically I've seen I've seen lots of Hardware options out there so can it handle scraping absolutely I I think I'll go I'll stop my screen now yeah can","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3656s"},{"start_seconds":3663,"text":"it handle scraping absolutely um like you know it's as big as you want to imagine it and also by the way this is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3663s"},{"start_seconds":3671,"text":"another interesting thing like PHA might not be running gpus and and your llm might be hosted","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3671s"},{"start_seconds":3679,"text":"somewhere else but it doesn't mean that you can't host your llm somewhere else and have and have F talk the F worker","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3679s"},{"start_seconds":3686,"text":"agent talking to it right right now again like it's up to you as a developer how you want to kind of you know sell","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3686s"},{"start_seconds":3694,"text":"this narrative and stuff um about what the worker agent code that that is verified and sort of tightly coupled","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3694s"},{"start_seconds":3702,"text":"with a smart contract and that verifiability it's up to you what the worker agent code does does it talk to external resources are they are they","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3702s"},{"start_seconds":3709,"text":"good are they crap whatever that's up to you as a developer to decide and build nice","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3709s"},{"start_seconds":3716,"text":"thanks uh this was a great presentation I certainly learned a ton uh I I am certainly impressed with the work he","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3716s"},{"start_seconds":3723,"text":"guys of doing over there at proximity I'm L why we called it shade ages why is it called shade ages okay","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3723s"},{"start_seconds":3731,"text":"great for I should have asked that um well we actually we tried to call it something else we'll talk about it you you can figure it out for yourself uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3731s"},{"start_seconds":3739,"text":"but we just we ran into some sort of you know just some like n like just naming conflict it wasn't really nobody was","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3739s"},{"start_seconds":3747,"text":"really upset or anything but we just decided to shift to shade agents nobody's really kind of nobody usually","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3747s"},{"start_seconds":3754,"text":"using that nomenclature um why shade agents though because uh when you're running inside of te it is","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3754s"},{"start_seconds":3762,"text":"confidential um and you could think of like your worker agent and and the shade agent stack as kind of like you know the trench coats pulled up the sunglasses","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3762s"},{"start_seconds":3769,"text":"are on I got the Fedora you know sing around I'm and I'm I'm working in the shadows I'm getting you the good","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3769s"},{"start_seconds":3778,"text":"data I'm getting you you know I'm getting you the good inference The Right Stuff the right agentic code and I'm doing actions in the smart contract so","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3778s"},{"start_seconds":3786,"text":"this is your agent um they can be confidential and everything and they're working on behalf of you I loved your example by the way Joe of the personal","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3786s"},{"start_seconds":3795,"text":"decks and and trade trade agent it's uh it's something that I think is is definitely going to be a big narrative awesome yeah no very cool this is this","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3795s"},{"start_seconds":3802,"text":"is really cool I could see a ton of uses for I hope people check it out and it's really excited to see you guys do it e Denver as well so uh great stuff yeah","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3802s"},{"start_seconds":3810,"text":"we'll have lots more uh sort of like little announcements and and kind of posts coming out so yeah follow uh you","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3810s"},{"start_seconds":3817,"text":"know proximity fi um and obviously at near protocol um who will be kind of like you know retweeting and quoting and","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3817s"},{"start_seconds":3824,"text":"Shilling our our our our shade agents yeah we've got a lot of fun coming up and uh we're looking for more Builders so definitely uh Reach Out get in touch","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3824s"},{"start_seconds":3834,"text":"awesome awesome well thank you so much for your time today I really appreciate it this was great yeah I really appreciate it joob thanks thanks Matt uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3834s"},{"start_seconds":3842,"text":"yeah folks that was awesome uh really definitely check it out all the links are below to get started yourself uh we also have as Matt alluded to there is a","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3842s"},{"start_seconds":3850,"text":"bunch of different hackathons going on right now um but right now the one trillion agent hackathon uh is still going on the deadline is March 2nd uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3850s"},{"start_seconds":3859,"text":"for you to get in there and tons of stuff to still be built There is almost 1,800 participants in that one uh it's","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3859s"},{"start_seconds":3866,"text":"fully online uh let me bring up that link below for you guys to see that as well uh so that will come scrolling","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3866s"},{"start_seconds":3874,"text":"across here make sure you're subscribed to devhub newsletter because we will also have all those updates so when proximity releases some cool new uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3874s"},{"start_seconds":3881,"text":"examples or whatever else that might be or updates to this stack uh we will have that in our newsletter so make sure you're following along there as well uh","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3881s"},{"start_seconds":3889,"text":"we will have all kinds of stuff next week as the Denver is going on we will have few different live shows uh we'll pretty much be live almost every day at","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3889s"},{"start_seconds":3897,"text":"some point next week so keep following along here uh if you have questions if you want to join into the conversation","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3897s"},{"start_seconds":3905,"text":"uh join the dev support Channel we can link you to the right spot make sure we get you in touch with the right people and kind of go from there uh so until","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3905s"},{"start_seconds":3913,"text":"next week uh enjoy your weekend folks and keep out keep building and until next time I'm Joe and we'll see you then","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3913s"},{"start_seconds":3922,"text":"bye","url":"https://www.youtube.com/watch?v=5wr9ltBUm9s&t=3922s"}],"youtube_url":"https://youtube.com/watch?v=5wr9ltBUm9s","url":"https://near-pedia.xyz/videos/5wr9ltBUm9s"}