[BUIDL Asia 2024 Builder Stage] AI x Blockchain: Agents and the New Economy by Carlos Martin León
BUIDL Asia 2024 · March 2024 · 21:58
Carlos Martin León, co-founder of DAIN, explains what AI agents are and why a network of specialised agents can complete tasks that a single agent cannot. The talk uses crypto and software engineering examples, then shows why a blockchain suits such a network: public identity and reputation, cheap payments and censorship resistance. It describes DAIN's design on the Solana virtual machine, including agent-to-agent sessions, staking and rewards.
Speakers
Topics
From BUIDL Asia 2024, hosted by Kryptoplanet.
Transcript
so yeah in this presentation we will see how does what does mean asent the new economy and we will see how this Asian Network goes together so these days there's a lot of noise about Ai and blockchain how does thing goes together uh and this this is agents that we will see how how actually like technical Concepts actually work together and how it actually makes sense so first of so this is the agenda we will have so first of all most of you probably don't know what's actually an Asian and what's an AS Network so first we will start with what is an asan Network some definition on some examples then we'll continue with a foundation of an asan Network why do we actually need an asent Network and then we'll go like what's why blockchain and all that stuff
and then we'll go to the Core Concepts of an asan Network oh of course like thank you all for being here pretty nice to be on Korea now so yeah let's get started so basic thing what's actually an Asian so most of you probably have interacted with some agent uh SBT for example that's an agent using open AI gbt for most of the times uh in a simple way to actually Define what is an agent it could be something like this they can be like digital assistants they can actually perform task they can learn from data and they can like be autonomous um basically they are doing these things automated task they can learn from data and they can make
decisions some more examples can can be CH gbt Tesla Alexa or Siri so let's see some practical examples so this example crypto copy lot this one agent that we have implemented for the in itself so crypto copy lot for example can do anything you want about crypto basically can actually make swaps can actually send uh some token to another place buy crypto make orders or just like anything you want on crypto right now so as you can see the user have produce some input called like hey defi expert so me $1 of soul for slur so the agent itself will actually read this and it will actually process some logic
like okay how do I can achieve this objective how can I create the perfect like uh output of that so the agent will will think like okay first I will have to calculate the so price in USD and you can see there is a token price call and then he will actually calculate how much so is this $1 USD so he will create create some math and and of course like agents can execute code that's why actually is creating some calls in the the functions and then with all these variables he can actually create some swap transaction because he now he now knows how much soul is $1 so he he can create the swap transaction and this just an example of a swap itself that actually you can do with like some
input and as you can see the the the the user can actually confirm and yeah this is you can see from this token to another token and you can actually modify this sage and I think so this is one examp one crypto-friendly example let's go to some more like AI only so not sure if you have know but in AI community and like uh software Engineers mainly we have he of something called DAV DAV is one that was the first AI software engineer that that was trending like the last weeks and basically DAV uh can actually execute like complex code not that much complex so right now it's 13% % of all the issues that are able right now to to actually complete but he can actually complete some task uh
designed for like Freelancers so he can actually do some jobs for Freelancers right now and we can see that eventually it's getting better and better like most of the times so it's pretty interesting uh to see kind of like these agents actually working together so yeah this was a coding and AI style so now let's go with a foundation on AIA Network let's see why do we actually need an agent Network and what's the use case of that so right now agents are kind of like trapped in a box they are kind of like isolated for example when you interact with SBT it has no way to actually communicate with another agent it's just like an individual isolated agent uh so that's actually some limitation for complexity
in basically in agents so why we are not connecting them just like one can be specialized in something and the other can be specialized in other things so we actually can they can actually like interact with each other so that's what we actually propose you can see in this example uh there's a user actually interacting with um chb in this example open Ai and it is an isolated agent and say like okay I want to trade my for a m nftd and the agent will be like okay sorry I don't have the capabilities for that I mean like I don't have the context to actually like do that but if we actually have a multi agent system for example like this one can specialize in defi the other in nfts and the other in lending then he can they can achieve it because this def defi agent can
connect with an nft agent they because they can actually specialize in some specific functions and more so thanks to that they can actually get connected and like like complete the objective of the user so this is a easy example to understand just like a user wanting to buy nft and he don't have the resources so he will connect with another that actually have the resources to actually do that so this is a multi- agent system basically the see some PR practical example of a mul agent system so This Is AO Dev this was released two weeks ago from Microsoft this was a paper uh where they actually describe how they can actually create an AI drive and development for sofware engineers this is basically pretty much the future
itself just like uh having multiple agents delegating different task for the process of development of a project uh they actually can they demonstrated that they actually leveraging multi-agent systems they can actually complete more complex task and as you you can see the user will have some rules and actions and the objective in this case the user will actually s tell like okay I want to complete this thing I want to develop these specific uh things with like these features so there will be like an entire process like there will be like a conversation manager there will be like an agent orchestrating the other agents and multi-agent systems and yeah basically they can actually complete a complex task so yeah this was released from Microsoft like two weeks ago so
actually demonstrating that actually multi agency systems uh can actually complete more complex task so going more for far beyond why do we in why we don't create an entire network of aent systems a network where kind of like they can specialize in something so basically multiple organizations where they can actually specialize in something for example uh it can be like um security defi Financial resarch prediction markets nfts academic research so your your entire organization can specialize in something so you can actually like uh interact with between the different organizations so we are essentially creating well at D we are actually creating a network of a of experts uh because organizations can actually
specialize in some specific topics such as like auditing smart contracts um research in like data from crypto or Finance whatever and prediction markets to actually have the the more like real real time data as possible and yeah between others but of course this is like this is Limitless this this is like Infinity you can actually have as much um category experts as you want this depends on the demand and the offer of course if there is demand there is off there is offers usually so quite quite important why do we actually use blockchain here so first of all uh we can have an immutable public Ledger this means that organizations and agents they can have their own identity
and reputation so they can construct their own reputation over time and this means that in using blockchain uh basically you have your entire like records um for eternity at at some point so that's what that's one of the main um Pros actually having gu blocks in itself uh the second one um oh there was some error there here but uh it's a robust payment infrastructure this means that is extremely um you you can have payments mro payments like pretty easily using blockchain and more with like highly scalable blockchain such as like uh Solana layer 2os or New Generation like SOI or uh you can have like very cheap payment infrastructure and you can actually have subscribes and like different payment methods and the last one is it's a
centralized and censorship resistant uh this means that there is no censorship in the network itself of course the community can actually choose what they think it's wrong or what it's it's okay but it's de centralized at some point so of course uh anyone can actually join and start kind of like uh getting like uh Services there so let's see some okay it's yeah so now let's see so in our case Dan we actually selected Sol virtual machine So Sol virtual machine is based on SOL of course um and this has this these are this the pros of the Sol virtual machine first of all Solana have 400 milliseconds on confirmation times this means that for each second most more than two transactions they will be they
will be confirmed so first of all it's fast confirmation times we actually need that for actually having cents second when you use r a virtual machine you have very low transaction fees so it's perfect for having an expensive uh data uh interaction basically and then we have the high data throughput this means so data throughput is the amount of uh data that the blockchain can actually digest per second so that's something extremely useful when you actually use data for like communicating as like Fast interactions so in comparison you can see like with multiple blockchains here uh ethereum for example is layer one not designed for scaling right now our layers of course they are designed to
scale but for example in like what we are using this fire dancer optimization of Solana uh we can have like uh hundreds of times more actually data throughput for that so it means that our Network can can digest a lot more data right now so yeah and this was from the friction list Capital report but I say I said um because we are from some virtual machine um you can actually do it with any any layers to if you actually have their entire like speed and like cost uh kind of like aligned so yeah so now let's go with the one of the core features of like asan Network so probably you know that agents uh well of of course like organizations they have some identity if I have
Microsoft Microsoft you know that they are good at software and actually they have like uh multiple kind of like uh they have created multiple products and like different things so in our case it will be for like identifying what organizations are about so this organization for example it's called super researchers and there is some descri some description for that so and this organization contains multiple agents so this means that this organization can own like multiple uh multi- agent systems and you can see like there is total agents number so yeah on blockchain you have they have their own identity basically and then going deep into it kind of like agents so each agent most
of them will be conversation managers uh these agents will have their own identity and reputation also so they can have some kind of like uh proof there on chain so let's see some example about how does agent to agent communication actually works so this is pretty basic just like let's suppose a user want to like want to know the top 100 coins by active users and this defi agent doesn't have the resources to actually do that so what he will do exactly so this agent will create a session on chain will con connect to the blockchain itself and we create a session to actually start the communications and then there will be a research agent on the other side telling
like okay I know how to answer this I can actually get Mone if you pay me this quantity or this any subscription or whatever um they will actually provide the information so yeah from the defi agent to the research agent and the research agent will provide you the information for that so there is also an exchange of value here so yeah at fin at the end the defi agent can actually complete this task so he can provide to the user uh these top 100 coins sorted by active users so this an this an example just like when you when when your agent doesn't have the resources you can actually use a network to actually like provide any information possible if there is like offer there and at the end the the defi agent so of course there is a reputation so
this means that if your agent is not providing good answers or is not doing a proper job uh there will be some reputations you will have bad reputation this agent will review the other agent saying like Okay uh your answer was correct or not correct so there is an entire like reputation system for each s and of course so well it's fine yeah because in Solana when you create a session you are creating some state but when you finalize you close the session so basically you recover the payment that you made for estate but yeah this more technical stuff from s so yeah the the status will be finalized so talking about the uh reputation so of course having a
reputation system with an agent network is extremely important because when you want to get some information you will always kind of like go to the more like legit actually uh legit organization so having a trusted service provider is extremely important yes also uh when you have an organization and your agent network if you are like very good performance and you contribute a lot to the community and more you will be eligible to EPO rewards so this EPO rewards will come from a fe from the protocol and also from like um some Supply part of the token release and at the end another concept is transparent and immutable so this means that uh you can actually see if there is like some agent that have bad
reputation or some they off they offer like bad services so it's very important to have transparency and immutable mutability for uh reputation here so let's go so you probably you know like traditional oracles traditional oracles they just provide prices Randomness and more things but pretty basic in complexity but if you actually if you actually have an anient network uh you can actually achieve more complexity and almost like any kind of like object objective objective information so having an asan Network you can actually push the boundaries of what is possible with oracles we we call it the smart oracles so thanks to that well first I will show the example so to understand
it more like what's actually a smart Oracle so let's suppose the user actually ask like who won the match Real Madrid versus Barcelona to a prediction markets agent and he will be like okay I want to make sure this information is 100% correct so what he will do he will actually like create a a consensus and multiple agents can join to answer so so here for example there will be like multiple agents with multiple weights so each weight will depend on identity and reputation so um the more reputation you have the better reputation the more weight you will actually have and they offer some kind of like payment here so of course like when answering they will be like okay the winner was Barcelona Barcelona Barcelona and Real Madrid and
this one Barcelona so the majority here is achieved by like the number of agents and also like the weight that they have so in this case you can see that the answer of course will be like okay Barcelona uh because then they have agreed there is a majority that they actually is it was Barcelona and of and this formula basically it's like the honest agents um like the majority is achieved by the honest agents basically so yeah this an example of um smart Oracle consensus and of course thanks to that you can actually achieve like unlimited data potential so this means you can actually get any kind of data you want so for example this was prediction Market like who was the winner of that football match but you can achieve like
prices uh security you can actually check if your smart contract is secure like with multiple agents uh uh you and research or like you remove like everything kind of like from Bas also so it's a robust and reliable data because you can actually have multiple sources uh from multiple different agents and like different trainings and like kind of like different kind of like brains for saying something like that so yeah also I NBAs I me like because you can actually select a diverse like number of agents and diverse organizations so don't depend on a single point of failure and then the complexity thanks to like smart agents thanks to the
agents network uh you can actually achieve very high complexity with the questions uh I mean like extremely high you can actually like even get your uh smart contract audit with like multiple like multi- agent systems so okay and how do how does how do these agents actually get the information they actually use something called retrival augmented generation uh rack basically uh this is pretty famous in AI right now and basically it's something like this uh the user actually ask the agent and the agent can actually search the web they can actually search the web or search like multiple apis so in this case for like top 100 coins he will search on beer TI and coin market cap so
so it's basically retrieving external information so agents can actually have like unlimited potential with like connecting with data providers and data Brokers basically so this is how they actually manage to actually complete uh this uh who was the winner of that football match so now let's go to something important to the security itself so to actually manage all the security it will depend on two things reputation and staking reputation is extremely important because reputation um your agent like whatever you do on chain it will be recorded Fort so if you actually manage extremely bad reputation um you will get kind of like higher like lower
weight essentially so and the other thing is is taking actually users will be able to secure the network they if they see that some organization have good reputation and they think like okay they are very good performance probably they will they will have higher rewards so they can actually like stake to them now we will see how it actually they manage it so users can like deposit their stake um so and this isal machine so it's Sol ni style uh programming language so the user can actually stake to the organization to the staking account so basically he will stake to theist in account at the end so yeah and the the steps is that user first stake then uh it will be sent to
the delegation account and after the EPO pass it will be moved to a sticking account so of course this how actually delegations actually work on sticking so yeah and if you're curious about s just like in this case Sol works that they use derivated uh program addresses so each organization will have some instake in account and also they will have some rewards account so basically the organization owns these accounts but they also so it's it's called PDA in Solana it's more complex technical stuff so yeah essentially that do the user can actually stick to the organization that they want and at the end uh depending on the performance and the commission of
the organization they can actually get some rewards because each Epoch you know an Epoch usually last uh in this case two two days so after two days we will evaluate all the reputation and all the performance from all the agents and the staking also and we will actually like provide uh the rewards to them so the user will actually receive rewards and the organization also will receive the reward rewards so there is an entire like sustainable ecosystem here and of course the rewards come also from like fees fee usage from the protocol and yeah that was all about Ai and uh blockchain and if you have any question feel free to ask thank you so much caros and first question right
here uh you mentioned rag earlier on um would I be using like raw transaction data as well or sorry would that be using raw transaction data as well like you mean like transaction like public key no now as in um actual like blockchain transactions yeah like so right now you can simulate the transactions and understand each instruction inside the transaction so this means that for example uh in our case we have created some security style so basically for each transaction we can actually simulate it and for each instruction we can actually see if there is some kind of like uh rck for example if they want to extract some kind of like something that doesn't make sense in the intersection okay so this means that um
they can simulate and they can verify each instruction but if we go more far beyond you can actually know all the smart contracts that they interact with because you can actually like um kind of like reverse engineering the bite code from the smart contracts so you can actually check that there is any anything suspicious or not but yeah that's more far beyond okay yeah I I was going to mention but
