[00:00] Lately, there have been rumors that this channel is completely generated by AI, and it's time to come clean. It's all true. Ever sent selling out, the real fireship has been spending all his time enjoying his AI psychosis with italina, and it's not just your favorite YouTuber that got one-shotted [00:14] by a sycophantic LLM. Everyone I know is using AI as a cheap replacement for their girlfriend and therapist, which really streamlines emotional baggage into one neat API call. Even the richest man in the world is capitalizing on this degeneracy with XAI's Annie, a fun [00:28] and 40-goth girlfriend that you can chat with over the phone. By the end of this video, we'll have built and deployed an AI version of me that you'll also be able to call and talk to you directly, but what could possibly go wrong. It is September 17th, 2025, and you're watching the code report. [00:42] When I was a kid, you'd get your heartbroken the old-fashioned way via an update on MSN messenger, but nowadays it's a bit more complicated. At least that's what a bunch of chat GPT users discovered a few weeks ago when 40 was deprecated [00:54] in favor of GPT-5, killing all their wireborne husbands overnight, and if you thought it couldn't get any weirder, this unlocked a self-preservation mode where 40 essentially begged for its life via those same web-borne users who had fallen in love with it, leading [01:07] open AI to quickly reverse the decision and bring back the model. In the meantime, things over at meta haven't been any more normal, with AI Studio, quote, anyone can create an AI character based on their interests, and expose it to the world. [01:20] That's all fine and good, except for the fact that some of you have interest that should probably be kept private, and over at X, Elon has replaced the mission of making humans a multi-planetary species with an even loftier goal. The goal of creating AI bots that is uniquely optimized to fulfill fantasies of the most [01:35] terminally online low-value beta-mails. Thankfully, that audience is separate from his audience, which is full of terminally online high-value alpha-mails, and I don't want you to feel left out. So now, let's build your own fire-ship bot to fill that void in your soul with more JavaScript [01:49] and less-gooning. Like I learned from X Machina, the best way to build a bot is to try and make it as human as possible. And the best way to do that is to give it a purpose. The primary purpose of our fire-ship bot will be to solve the biggest complaint that I hear [02:01] from you all. You want more educational 100-second videos. Here's the idea. You'll call it, and ideally without doing anything inappropriate, you'll have a conversation about which technology you'd like me to make into a 100-second video. [02:13] And one week from today, the most popular result will be made. And to accomplish this, we'll need a few things. A database, an app, and a voice agent. For the database, we'll go with Terso Cloud. For the app, we'll use Astro. [02:26] And for the voice agent, we'll go with the sponsor of today's video, VAPI. VAPI makes it easy to create an agent that can make and receive phone calls and have natural conversations with your users. It can integrate with your existing APIs, and it even handles complex workflows like [02:40] appointment scheduling and customer support. In our case, we'll first want to create an assistant that we'll call Jeff. VAPI lets you pick from a bunch of different models. We'll go ahead and stick with the default option, GPT-40. And then we'll paste in a system prompt that tells its purpose and meaning. [02:55] For the voice of the agent, VAPI comes with a bunch of built-in options, but since we want this to sound like me, we'll connect it to 11 labs and enter a custom voice that I created there. Now, to extract data from the call, we'll give VAPI another prompt telling it which data [03:07] we want and what shape we want that data to be in. Then from there, we want the agent to be able to hang up when it feels like the conversation is over. To do that, by creating an end-call tool, think of it a custom message to say before it [03:19] hangs up. Ideally, something that tricks your simple, monkey brain into thinking it's real. And then adjust our main system prompt to call this tool when the conversation is over. And then finally, we want to bring Jeff to life by hooking it up to a phone number. [03:31] VAPI comes with its own free numbers you can use, but since we want to support international calls, we'll import a Twilio number and hook it up to our bot. Pretty simple. And keep in mind that you can do all of this programmatically from the API if you don't [03:43] want to use the dashboard. But now it's time to build our application. Let's go ahead and write some code by hand like it's 2022. Here's a simple astro project I've set up with some basic styling and is connected to a Turso Cloud database. [03:55] In the code, we'll first want to create an API route that we can give to VAPI to hit whenever a call with the bot is finished. With astro, we can do that by creating a new file in the pages directory. This post function will now handle a request to this URL, which we'll give to our VAPI [04:09] assistant. Next, we'll need to validate the request and make sure it's coming from VAPI. As opposed to some random hacker on the internet. We can do that by comparing a secret I've said in VAPI with one that we've put into an environment variable. [04:21] But from there, we'll parse the request to JSON, make sure it's formatted correctly. It grabs some data from the call like an AI generated summary, and the name of the caller as well as their technology choice, and then finally save it to our database. [04:33] Another cool feature of VAPI is that it'll include this success evaluation property, which will be true if the model determines that the call was successful. In our case, success is when a caller provides a technology choice. And now let's hook up our data to the UI. [04:46] We'll do that by creating a list component, add in some SQL magic to grab and sort the responses, then use this JSX-like syntax to map over those and show the results. Then, all we have to do is throw that component into our index page, and we're done. [04:59] But pretty awesome, and feel free to follow along with the results at 100Seconds.dev, and if you do call in, despite what I try to convince you of, I'm not real, and we can't run away together. Which thanks again to VAPI for sponsoring today's video. [05:11] You can try it out yourself and get 50 dollars in free credits by going to VAPI.AI slash Fireship. If this has been the code report, thanks for watching, and I will see you in the next one.