From the course: Create Agents with v0 and Vercel (No Code Required)

Create your first agent

If you've used vZero in the past, you've probably used it to create a website. But you can also use vZero to create AI agents. The most common types of AI agents are chatbots, and we're going to create our own customer service chatbot for a coffee shop. To get started, we just need to sign up or sign in. So you can do so with your e-mail, with your Google account, GitHub account, Apple, and there's even more options there, but I'm just going to log in with GitHub. Now that we're logged in, we can start to interact with vZero. And we just need to write our first prompt here. So again, we want to build a customer support agent. Let's call it a chat agent. For a coffee shop that has a ski theme, the agent should respond to customer service messages in a chat interface. Then we can think about other features that we want it to have. Maybe we want the interface to include a message input, a send button and a scrollable chat history that shows both the customer's messages and the agent's responses. So the dropdown here allows you to select a different model. V0 Auto will automatically pick the best model for your prompt. V0 Mini, Pro, Max, and Max Fast. As you might imagine, these are going to get more powerful. It's going to get more intelligent, but also more expensive. So every time we are asking for various prompts, that is associated with a certain number of tokens. And so if you want to select a higher level model, Usually, I select this one, V0 Max, which is powered by Claude Opus. And as you can see, it's about five times as expensive as the Mini. So if you're just trying to prototype something quickly, you might wanna scale that back to the Mini model. And let's give it a shot, let's see what this comes up with. Again, I mentioned that V0 is an agent itself, so it knows what to do now. what to do now. It's going to go through a bunch of different tools and select what we should do next. So we're going to create it, it's going to load in some AI SDK patterns, generate the design. So if I go over here to the left side, we see all of the different features that are being built, a chat interface, a message input, AI-powered responses, and more. We also, on the right-hand side, have our agent here. It's our little chat application. So we could type in our own message, or we could select one of these. Maybe I'll ask, what are the store hours? This will then return what those hours are. Nice. So that's a pretty short prompt that led us to what looks to be a pretty functional app. Of course, we're going to make some customizations from here, but this is taking us pretty far with just a single prompt. We had to write zero lines of code to make this happen, and this is going to be really useful for our business.

Contents