Virtuals Hackathon Workshop3 Building AI Agents on Base

Virtuals Hackathon Workshop Series · 30:34

Agent Kit is presented not as a rival to agent frameworks, but as a toolkit that gives agents a crypto wallet and onchain interactions. Lincoln Murr demonstrates Python and TypeScript examples, a browser-based template using Coinbase Developer Platform and OpenAI keys, and an alternative CLI, while noting outdated documentation and a persistent wallet-data file that should be deleted. He recommends project-specific actions and warns against adding a crypto wallet when an application has no need for one.

Speakers

Topics

From Virtuals Hackathon Workshop Series, hosted by OpenBuild.

Transcript

So hey everyone uh welcome back to the virtual hackathon workshop series. Uh we've had a few uh we have we had two workshops uh in the past week or so and we're really excited to have you all guys have everyone here today. So uh today's session is pretty uh special um something different from what we had the previous two workshops we had was with our virtual team with Celeste and uh Zero Dawn uh speaking about ACP and also base. But today we're joined by the very own Mer Lincoln from the Coinbase team product and AI on chain to walk us through everything you need to know to get your agents live and on chain. So uh just before we start as a quick

refresher the virtual hackathon isn't just about building cool AI agents. It's about launching autonomous agents that can run entire businesses live on chain powered by infra infrastructure like base and together with our ACP agent commerce protocol. So uh this workshop is especially important because all submitted projects that are uh onchain must be deployed on base. Um we're also really getting close to the submission deadline which is going to be on the April 14th. So just shy away of two weeks um from the day. So this is your chance to learn on how to optimize your deployment and also make your project project submission ready for the base track. So um our friend Lincoln will be covering the base tools, our workflows and everything you need to know to make

sure your agent performs and skills properly. So definitely take some notes. So just to remind you guys again, uh submissions are open. So make sure your project is uh well ready before the April 14th where the submission will be closing down. So, I guess not to waste any time, let's get into it. Over to you, Lincoln. Fantastic. Thank you very much for that introduction. Uh, hey everyone. So, great to see you all in here. Uh, my name is Lincoln. I'm the product manager for the Coinbased developer platform focusing on AI and Agent Kit. And today, uh, I'll give you kind of a brief overview of how you can get started with Agent Kit, how you can start building agents, um, that have access to a crypto wallet and a full set of onchain interactions and capabilities. Uh, also really happy to take any questions. I'd love this to be

interactive. I already saw a question in the chat around API keys, which we'll be happy to get to. So, I'm just going to sort of walk through how to get started, how we're thinking about agents, agent kit, everything related to that. And at any moment, if you have a question, please feel free to put it in the chat. I'll try to get to it during the uh during the discussion. So, to start, I'll give a brief overview generally of sort of like what agent kit is. Uh the main idea is that we believe that every agent will ultimately have a crypto wallet as its financial hub and unique identifier. Even if the agent is going to want to interact with various other uh you know like services or merchants that require them to have a debit card

or a stripe API or something like that, we believe the crypto wallet will be the core where place where they hold their money since they can send money anywhere in the world fee free since they can earn yield via DeFi and they can spin it up in a very easy way that doesn't require a lot of hurdles like it would to do in um a more like restrictive manner that's that requires regulatory compliance. Uh, the main place you're going to find a lot of information about Asian Kit is from the Asian Kit repo. I should be sharing this screen right now. I can't see it over here, so let me know um if you all aren't seeing it for any reason.

But yeah, this is going to be your one-stop shop to learn everything you need to get know to get started. We have an overview. We have guides on how to get started. Uh we have an explanation of the repository structure where you can see all the different ways that you can start to find the different examples that we have. Uh look into the specific actions that agents are able to take. Um as well as find more information in our documentation. Generally I would recommend shying away from this. It's a little bit outdated. It's good to get a nice overview of the different tools but normally I would stick to the repo and the various different readmes that we have. Um, so yeah, to get started, I'll first show you how to run through getting started with uh with the replet template. Um, I usually view this as the

easiest way, but if you don't want to uh to use the replet template, there's also a quick start CLI, which I'll show you how to use very briefly, and I'll go ahead and show you what the boiler break boilerplate code looks like. We have two different repos, uh, two different languages that we support. Uh, one is Python and one is Typescript. Within Typescript here we can click on the examples and we can see some various different chat bots that we have available for all sorts of different functionalities. Uh we have one that uses privy wallets. We have one that uses our smart wallet API which allows the agents to take fee free interactions. We have one for Salana uh for this hackathon not terribly relevant but for the sake of ease I'm going to

look at this lang chain CDP chatbot here. And within here we have a readme showing you a little bit about how to get started. But you also have this chatbot which is where the magic happens. So basically the way agent kit works very briefly is you have three main steps to get started along with sort of like setting up an agent framework to use. Step number one is you're going to want to import uh all of the different actions that you want to take. So you see here we have the C wallet provider. We have the ability to wrap our Ethereum into wrapped ETH. Uh we have an ERC20 action provider for doing things like swapping or transferring tokens. We have a 721 um for dealing with NFTTS action provider to get price feeds and so on.

To see all of the different actions that we have, you can go to whatever Python TypeScript you're using, click on agent kit src here, and then here are all the different action providers. So there is all sorts of cool stuff that your agent can do. Um, this is just the initial set of built-in features we have. It's also incredibly easy for you to add any sort of new action to agent kit. And that's in fact what I would encourage you to do. It's a much more um well, I guess the way I'd say it is the way that we think about agents is that the agents themselves are going to be commoditized.

The fact that you can interact in this new way is uh is is going to eventually be available for anyone to do. Um, agents are going to be everywhere. the real value is within the proprietary data and services that are provided to these agents. And that's what we're trying to get at with having a a wide list of actions and services that they're able to take and interact with. Um, so all that being said, I'll go back to this chatbot example and continue running through it. As I said, this is how you import all of the different tools. And you have this importit link chain tools here as well. A lot of this is just general setup process. For example, you're going to want an OpenAI API key, which you can get from their website. You're going to want a CP API key and private key. For

that, you can just go to uh cdp.coinbase.com, which I will share in the chat now and you can click that get started button. If you don't have a Coinbase account, no problem. Uh it should be quite straightforward for you to sign up and start building agents. Uh I'll show you very briefly what that looks like as well. Um, once you log in or sign in, do whatever you need to do, you'll be brought to a page that looks like this. All you have to do is click create API key here and give it a name and then it will give you two different keys. One of those is like a name and the other secret. Those correspond specifically to CDP API key name and CDP API private key.

So yeah, as I was saying, a lot of this is just like validating the environment and then we get into the fun stuff, which is initializing the agent. So we're going to initialize with an LLM. We support all sorts of different LLMs. Basically, anything that the specific framework supports, we're able to support. Um, a common question we get about Agent Kit is like, is it a competitor to Eliza, to Lang Chain, whatever. The answer is is absolutely not. Um I view agent kit as almost like a sub framework or a toolkit that gives all of these different agent frameworks a crypto wallet and the whole set of onchain interactions that you can uh so with that in mind like I said we have support for open AI's agents SDK we're actually like launch day collaborators with them on that um as well as a whole

host of this once again is the uh is the link chain example so all of this is sort of boilerplate code you really don't have to do anything here um it should configure it for you sets you up with an API key name and private key. You can choose your network ID as well. Base Solia base-sapoleia is what it defaults to. If you're looking to get started on mainnet, you just change this to base-mainet. Um, and we'll get into more of the specifics as we go here. Uh, and then here's where the magic happens is initiating initializing agent kit, passing in all of these different action providers, uh, providing the API keys where those are necessary. um and then ultimately creating the agent, giving it this set

of tools, and now it's able to do these interactions. So, this is kind of a brief overview of what this repo looks like. The last thing I'll mention is uh if there's some sort of thing you want to make your agent do, like if you're familiar with the personalities in Eliza, this message modifier is kind of where you do that in here. This is where you could have different kind of rules or personality traits for the agents to take um all built within this file. This would be the right place to do that. So before I dive in exactly how to take this template code and actually do something cool with it. Um uh I see a question. How is it different than Alexa? I imagine you mean Eliza. Uh so the way I would describe it is like Eliza is a framework for building

agents. Those agents by default don't have access to crypto wallets or the ability to do any onchain interactions. Agent Kit is a plug-in that allows them to now open up to the world of onchain stuff. And why we're particularly excited about that is because we think this is going to be the way that agents interact with one another, how they pay for goods and services online, um, and how they have a unique identifier to allow them to be discovered. Great. So, if there's no other uh no other questions, um I'll go ahead and dive into one easy way to get started, which is with our replet templates. Um so, I'll go ahead and go to the cover page and walk through

exactly what it's like to get started. I know there was a question about this uh from somebody at the beginning of the call, Armando. So, let me know as I'm walking through this if I answer it for you or not, and if not, we can start to dive in and figure out exactly what your problem is. So, I will copy and paste this link into the chat. Uh, for those of you who aren't aware, Replet is basically a way for you to run a developer environment inside your web browser. I really like to use it for these types of like workshops and demos because it isolates any problems that you might have on your local machine. Um, for example, it doesn't require you to have anything installed or go through any sort of like command line process.

And sometimes in these demos, people can get stuck at various spots. Fortunately, here all you have to do is sign in and then we can get started building in our web browser. So, I'm going to go ahead and start walking through this process, if anyone needs me to slow down, uh, let me know and I'd be happy to do so. But once you're signed into a replic account, the first thing you're going to want to do when you're on this page is click, uh, this button here, which says remix template. This is something I just sent in the chat right now. If you just created your account, you can probably only make it public. That's fine. But we're going to go ahead and click use template here.

Now, if you open up this files, you should see a bunch of different files. The first thing you're going to want to do, um, is we're having an issue where this wallet data.ext is sort of like persistent. This should be deleted. Um, if you don't have this deleted, then you're going to run into immediate issues where it's not going to know how to create a new wallet for you. So, step number one is delete that wallet-data-t file. Step number two is we can look at this chatbot here and see that it's quite identical to what we've been developing with so far. This is the Python version within this uh Coinbase dev uh account here. If we go back to this page, you'll see we have all

sorts of different uh templates built out. If you search for Asian Kit, you'll see that this is one of the ones that we have. Um, I would also encourage you to check out this page. Um, I'll send the chat here as well. Uh, this one should have also a lot of various different uh, agent things for you to try out. One that I recommend is this agents SDK to quick start. This is the one for the OpenAI agent SDK. We also have all of these different versions right here as well.

Um, so if you want to try out any of these, they're all good to go. Have various different features, but all of them you can kind of build out from one another. Great. So, going back to this agent quick start here. Um, we can see that it's like pretty much the exact same file structure or whatever and it's in Python. Like I said, there's TypeScript once, but this is in Python. One thing we're going to know is if we try to run this by clicking this big green button, we're going to see it says missing required secrets. Click here to add them. So, what this means is that we need to add these API keys that we were previously talking about. Um, if we break in here, we'll see that there's four that we need. The name, the private key, open AI key, and the network ID

exactly as it was previously. I'll go ahead and enter this network ID as base-solut. And I'll click add secret. the other three, open AI key, API key name, and private key. You can click where do I find this? Uh, and it will tell you to go to the Coinbase developer platform, open the portal, whatever. Grab those keys that way. Um, what goes in network ID base-sapoleia or base-mainet? Uh, yeah. So, I'm going to go ahead and copy and paste these keys.

Um, and then we can get started actually interacting with this agent. So, copy paste the name in here. Copy and paste the the private key here. And then for the OpenAI API key, I think I have one on my desktop somewhere. Let me grab that. For those of you who don't, um, you're going to want to go to platform.openai.com. Click on this big

settings button once you're signed in and click API keys here within organization or generally and create a new secret key. Cool. So, I found my key. I'm going to go ahead and paste that in. And now if I click run, we can come over to this console tab. And what we should see is that in just a few moments here, the agent will be up and running. And we'll have two modes to play it with. We'll have a chat mode, which is where we can talk to the agent, tell us do things, and we'll have an autonomous mode where we can do autonomous actions.

I'll just go into chat mode, show you that it works. What's my address? Cool. There we go. You can do things like faucet funds, deploy tokens, deploy NFTts, check the price of Bitcoin. I'm actually curious what it is today. Um, and all sorts of fun stuff like that. That's tough. That's tough. 81,000. But anyways, uh, yeah. So, that's kind of the, um, general way to get started with your agent using Replet. Yeah. If you want another way to get started, you can run this command inside the terminal is npm create onchain- agent at latest. I'll copy this command into our chat as well. But what

this will do is go through this quick start here where you can set up your agent with a bunch of different configuration options. So, this is, like I said, an alternative replet. You really only need to do one of these, not both of these. Um, so I'll just give this a name. And if it doesn't work for you, like honestly, let's get back to it. Um, so yeah, as I was saying, you can go through this as another option to get set up. If you don't have it working, then like I wouldn't bother doing it, but it's a nice way to get a bunch of different configuration options here. So for example, let's say I want to do the Verscell AI SDK using Ethereum. I'll go

mainet Ethereum mainet and we'll use the Coinbase smart wallet. It gives you these setup steps which you can go through and get your agent as well as a front end that you can interact with it uh through. But like I said, this is just another another option that you can that you can use here. Yeah. Any any questions so far? If not, I'll go over some of the things that I think would be really cool to build and sort of like how to think about. Yeah, that's I've given you a brief overview of how to get started with agent kit. If you have any questions, please let me know in the chat and I'm happy to dive into anything more specifics. But what I'll cover now is like some of the things that we want to see get built and like where we see a

lot of opportunity for agents to exist. Yeah. Like one of the one of the things that I think is is quite important to note is like if you just integrate agent kit into an existing project um that's awesome because it allows your agents to now interact um with your protocol or you have humans who can use these agents as sort of like a natural language translation layer to take something that's difficult to do on chain uh and now interact with it in a new manner. Something else I'd like to call out is the uh the virtuals agentic commerce protocol and this move towards like agentto agent discovery services and all sorts of other fun things that allow your agents to start interacting more. I would highly recommend exploring those.

Um generally what I would try to avoid is just taking an existing agent application and then giving it a crypto wallet without having any need for it to have one. Yeah, that's kind of the end of the things that I have to say here go over with Asian Kit. Um, I would be happy to take any questions from the audience. If you have any questions about the things you're trying to build and just want feedback on it or some advice about how to build it out, would be happy to talk about that. Otherwise, I can go in a little bit more about like like options, how to build things, how to create new actions. One op one question I see here is uh which option to build is easy on resources.

It's definitely going to be the replet. That's going to be the one that I would recommend using. This basically gives you all the things that you need and uh is not going to take any resources from your from your computer. So this would be the good option for you. If there's no other questions, one other thing I can show you is like where within the repo exists the ability to build out new actions. So if you go into agent kit here, see this scripts generate action provider. Clicking on this provides you with a bunch of information on how exactly you can get started creating your own action providers and implementing them within agent kit. So if the actions that are in source action providers aren't good enough for you or you need other things then you can by

all means take any function that can be written in Python or TypeScript and build it out specifically uh for your project. Some of the ones I'll highlight here that have some pretty cool use cases across. You can do bridging base name allows you to register a name for your agent which makes it much easier to interact. So I could be like, you know, send one USDC to Lincoln.base study. Uh you can post on Farcaster. We're working on this like token launchpad stuff. Misari is a really interesting one is it allows you to ask your agent questions um and get answers like what DeFi protocol should I invest into or what whatever what thing should my agent do and it'll provide you with a really nuanced answer which I think is pretty cool borrowing and lending on morphone

moonwell you can onramp using the Coinbase onramp here soon open C pit price feeds got all sorts of cool stuff here so I would highly recommend you take a look and add in these unique actions and build agents that have some sort cool thing that they can do. My last piece of advice would be don't think about agents necessarily as crypto AI agents. Think about them as being enabled through crypto to do additional things related to financial payments and uh data transfer rooms. They can do all sorts of stuff within the web two world and that's probably where they're the most lowhanging fruits for them to interact. But then having a crypto wallet as a way to start paying for stuff is where things get particularly exciting. Another thing I would look into is like pushing the boundaries on

autonomy and what agents can do if you start to allow them to do things like create self-replicating agents, which is possible using the Python action provider for hyperbolic that'll let you create agents that can like deploy other agents and all sorts of interesting stuff. So, yeah, a lot of different opportunities. I know I've just been like brain dumping information. I'm sure it's a lot. So, happy to take any more questions. Um, if not, feel free to reach out to me on Twitter or the best place to get help with building is in our Discord, uh, which I will send the link to now. It also is in our documentation here at the get help page, discord.cominvitec. This is where you can reach out to our engineers, give

feedback, all sorts of good stuff like that. So, yeah. Any any final questions that I can take? Great. If not, thank you all for coming. Yeah, virtual team. Anything anything else to add? Yep. Cool. Okay, guys. Uh yeah, so before we uh let go of our friend Lincoln, do you guys have any uh questions that you'd like to um hand over uh physically, uh we have someone who has a video on? You might have a question to Lincoln. Yeah, I would like to ask some uh more related to the criteria and evaluation during the hackathon. So basically, what are what are you guys looking for in products? That's my my my main question.

Okay, got it. So go ahead. Yeah. Okay. So uh if you refer to the project guidelines, right? So uh there will be a couple of things. Um there are a couple of judging criterias that we have specifically for this virtual hackathon. So if you go into the project guidelines that's available on telegram or or the email uh as soon as you registered for the hackathon. So one of it the first one will be innovation right. So uh the first one does your AI agent or your solution present like a a good novel approach for um as AI agents in in terms of autonomous businesses or other use cases or does your AI agents demonstrate some sort of creative problem solving uh and out of the box thinking that you have for the hackathon or how this role

play AI play in the solution for for example in terms of autonomous commerce protocol um specifically working with other AI agents. So there's another judging criteria which is impact. So what is the business case for your specific solution or or in this case what kind of cluster that you are registering for and together with the market opportunity. Um what are the many different potentials for the solution that you guys have to attract a certain user base and the uh scalability in the current marketing that in the current market that your AI agent is targeting for. Um third would be your technical and AI excellence. So, is your AI agent a solution that's technically challenging? Does it make good use of generative AI capabilities? And if you

guys have if your agent have any creative methods uh that's used to enhance uh your model quality. So, is it using uh unique or synthetic data sets, some sort of fine-tuning of your AI agents? And uh last but not least for the demo day specifically, how clearly is the project um presented and the current functionality that you guys have built um communicated during the submission and how effectively does the prototype or your demo showcase um showcase uh your application's capabilities? And last but not least, um is your uh demo newly created or is it based on a specific existing project? So uh just to recap again like the judging criteria is available uh in the project guidelines. Um if you have more

questions uh you can feel free to uh throw it in the telegram group as well. No that's great. That's great. Thank you. Cool. Do you have any other questions related to uh the topic today for bass? All right cool. Uh Lincoln I think we have a question. It say I have no knowledge on agents. Where can I learn this? So I think this could be quite related to building on base. Yeah, great question. There's a lot of great resources to get started. Primarily, what I would recommend is a couple different Twitter accounts. I'll send them in the chat now so that you have some resources to learn from some of the thought leaders in the space, see how they're thinking, all sorts of stuff like that.

Um, city number three. You're the first two. Um, and I'm looking for the third one, but yeah, that'd be what I would recommend on um, where to get good intakes, insights. Awesome. The third one I can't find, but yeah, I'll figure out where that is

eventually. But no worries at all. All right, any more questions before we end the uh, session? What's the coolest thing you see about building AI agents specifically on base? Yeah, great question. I've found base is primarily now the home of AI agents uh across both EVM and Salana chains. It's been fantastic to see the uh community adoption but then also to the support from the base ecosystem. Uh we're very interested in making sure that BAS is the home for AI agents and we're doing lots of things to support that. Uh, one of the things is having agents be able

to send USDC and CPBTC completely fee free. You can also earn 4.1% rewards on any USDC held in your agents wallets. We're working on a smart wallet API so that your agents can do every interaction fee free and generally agent kit has first class support for uh forbase. So, a lot of different initiatives that make it the best place to build. Awesome. Uh, Phoebe, I think we have another question in in uh, Mandarin. Yes. Yes, I just translated. Okay, got it. So, there you go. So, thinking about AI agents on base in the next year, what kind of groundbreaking stuff do you reckon to see uh, that will pop up? Yeah. Uh, another great question. There's a few things I'm

particularly excited about. One is agents that become fully autonomous and start to run things like Dows and become more of an entity of organization that people maybe start working for. I'm also excited to see agents become more uh autonomous in the sense that they can be decentralized, use decentralized hosting, decentralized inference, and in the same way we've seen like Ethereum L2s progressively decentralized, I think we'll see the same thing for agents. I'm also excited for their adoption from traditional AI developers. So beyond just focusing on the crypto space, how can we make Agent Kit available and possible for anyone to use or get started with regardless of whether or not you've ever heard of crypto? And then lastly, one thing I'll plug that we

have coming out soon that I'm particularly excited about is this uh this upcoming standard called X42. Basically, what we're working on is making it very easy for agents to call APIs, discover them, interact with them, and monetize their agents. So yeah, all of this is is what I'm excited about and thinking about most these days. Awesome. Right. Okay. So, I think we don't have any more questions and we can wrap it up. Um, of course, I would like to say uh, you know, big thanks from the virtual team um, to Lincoln uh, for that deep dive in terms of agent kit and how to b build AI agents on base. Um, what you just saw wasn't just a demo. It was really a technical unlock. So, with tools like agent kit, you now have everything you need to go from just an idea to fully deploy onchain onchain AI

agents. So running on base interacting directly with smart contract functions and also other agents in the future. So whether you're just building a trading bot media clusters um lending coordinators or even an agentic game studio this is actually how you bring to life. So uh don't forget for this virtual hackathon you put in base agent kit game framework ACP it gives you one of the most composable stacks in web 3 letting your agents think act and transact autonomously um ultimately going to the future of autonomous businesses. So uh before we end it a few reminders as we close out. Um the hackathon submissions are open. The deadlines are by April 14th. Uh if your project is onchain it must be deployed

on base. Uh make sure you are in the telegram group and are checking it time by time to make sure there are uh announcements running around. Um so we're now entering the final stretch. We have one more workshop that will be coming up next week uh on Tuesday on the hold on let me see if I don't get uh mess up the calendar. It should be on the 8th of April uh with Alex Golding which is from hackathon project to VC startup. Um you have all the tools now game agent kit ACP in the support of bass and also the virtual team. If you have any questions make sure to drop them in the telegram group. Uh and uh we would like to wish you all good luck in shipping your agents. Can't wait to see

your submissions by April 14th. Uh so thanks again everyone and we'll see you soon. Thank you Lincoln for your time. Thank you everyone. Thank you. Goodbye. Thank