Channel
Interviewed Person
Nico Albanese
Nico works at Vercel building the wonderful AI SDK. He was previously the founder of Kirimase, an Open Source CLI tool for Next.js, and an investor at Ascension. AI Demo Days #8 London ---------------------------------------------------------- Subscribe to the AI Demo Days calendar here: https://lu.ma/ai-demo-days Find out more and join us at our next event: https://demodays.ai X - https://x.com/demodaysai LinkedIn - https://www.linkedin.com/company/demodaysai

Callstack
Interviewed: Fernando Rojo
Perfect. All right. Hey everyone. Um, so I usually do slides, so I'm doing a very stupid thing to try and actually demo and write some code. I've been praying to the demo gods for the last six and a half hours. Um, and something broke right before this, so I guess fingers crossed and we'll see. Um, but if you haven't heard of Versell before, uh, I like to think of Versell as providing like the infrastructure and the frameworks to help you go from idea to fully launched products. Um, and speaking of ideas, we started hacking
around about two years ago now uh on a what's known colloquially now as a coding agent, but at the time it was just like can GPT3 output React code. Um, and in the process of doing so, we ran into some into some problems with what was like a very nent tooling ecosystem. Uh, and so naturally, we kind of built our own tools and then open sourced them. Uh and so that's where the AI SDK came up. So we call the AI SDK a
TypeScript toolkit uh for building AI applications. And um yeah, rather than doing slides, I thought I would walk through this title. The title of this talk was building agents with the SDK. And I figured we might as well try and build one uh live with all you guys today. Um the initial idea, it's it's actually kind of hard to come up with an idea for an agent you can build in 10 minutes. I was going to start with like the weather agent that fetches a weather API and then tells you a plan of what to do, but that's really really boring. It's
literally on every single quick start guide. And I think it's because it's the only ungated API that's exists. Um, but given that we are in the office of a VC and I actually used to be a VC, I figured we could try and build a VC due diligence agent in the next 10 minutes. So, we're going to give it a whirl. If it works, whoopee. If it doesn't, uh, sorry. Um, so what I got here is just a Can everyone see, by the way? Yeah, big enough. Cool. Um, so what I've got here is a TypeScript file. It's got a single
function called due diligence agent that does absolutely nothing right now. It takes in a prompt and then logs out that prompt to the console. So if we run this script, we get out our prompt. Very complicated stuff. Um the first thing that we want to do is take this prompt and send it to a language model and then hopefully do something with that language model output. So what we're going to do is use uh the first AI SDK function that we that's number two actually the first AI SDK function which
is called generate text. Um what we have here is we first specify the model that we want to use. This is the first kind of big feature that we're known for with the SDK in that you can switch out which model and which provider you want to use by just changing out this single line of code. So at the moment this is going to OpenAI's GPT4.1 Mini. Uh if we wanted to go to Perplexity, we would just uh change this out to say Perplexity. And now this is going to Oops, everything crashed. Now we're going to Sonar's
model here. Um and I think at the time of me speaking we support 48 different providers. Um so this is everything from Grock, OpenAI, Azure, Anthropic, Bedrock uh you name it we pretty much have support for it. Um and then we have like quite a vibrant uh community ecosystem that are building uh like things for local models as well. So if you want to work with LM Studio or Olama that's supported as well. Um so enough blabbering. Let's try and actually run
this now. And we've got a prompt going in saying, "Hey, how are you?" Uh, and we run this and we should get out the wonderful, "Hi, I'm doing well. How can I assist you today?" Um, but we had to wait a little bit. So, let's look at how we can update this to stream. Uh, so the AI SDK, we've been very creative on this team. We have the generate text function and now we have the stream text function. Uh, the inards are exactly the same. We pick our model, we pick our prompt. Um, but this time rather than getting out a single oneshot generation variable, uh, we get a stream from the provider. So we