In short
Podcast Summary: Vercel’s Developer Frameworks with Ary Khandelwal and Max Leiter
Episode Overview In this episode of Software Engineering Daily, hosts Ary Khandelwal and Max Leiter from Vercel discuss their developer frameworks designed for building AI-powered web applications. They explore tools such as the AI SDK, V0, and the ShadCN component framework, emphasizing how these tools enable developers to create robust applications while simplifying complex tasks like model deployment and natural language processing.
Key Participants
- Ari Khandelwal: Product and engineering team member at Vercel, with a background in computer science from Princeton.
- Max Leiter: Staff engineer on the AI team at Vercel, involved in the development of the AI SDK and V0.
- Kevin Ball (KBall): Host of the podcast, Vice President of Engineering at Mento, and an independent coach for engineers.
Main Topics Discussed
- AI Model APIs
- High-quality AI model APIs have made it easier to develop AI applications.
- These APIs abstract complex tasks such as:
- Model deployment
- Scaling
- Data retrieval
- Natural language processing
- Text generation
- Vercel's Development Tools
AI SDK
- A TypeScript framework designed to simplify AI application development.
- Facilitates easy switching between different AI models and providers.
- Provides utilities for building basic application components, focusing on business logic without getting bogged down by underlying complexities.
V0
- A tool that allows developers to generate UIs on-the-fly.
- Utilizes ShadCN components for composability and reusability.
- Functions as an "always-on pair programmer" that helps create React applications.
ShadCN Component Framework
- An open-source library designed for React applications.
- Provides basic UI components (e.g., buttons, cards) without dependency on third-party packages.
- Allows for a high degree of customization.
- Core Features of AI SDK
- Comparison with other frameworks (e.g., LangChain).
- Focus on unopinionated, low-level primitives for flexible user control.
- Split into two parts:
- Core: Facilitates model calls and switching between them.
- UI: Provides reusable components for rendering AI application elements.
- Development Practices and Challenges
- Differences in how various models handle prompts and responses.
- Discussion on managing errors and ensuring model reliability through deterministic functions.
- Importance of providing “recipes” or guides for common tasks in the SDK to facilitate user onboarding.
- V0 Usage and Integration
- V0 serves as a versatile development environment for both technical and non-technical users.
- Potential for integrating with Git or other services to streamline the development workflow.
- Examples of innovative usage: sales demos, UI generation based on prompts, and generating visuals from data.
Key Takeaways
- Accessibility: Tools like V0 and the AI SDK are designed to empower all types of developers, making it easier to build applications without deep technical expertise.
- Community-Driven: The AI SDK is open source, encouraging community contributions and collaboration.
- Future of Development: The tools discussed are evolving quickly, reflecting a trend towards higher abstraction in programming and improved usability for developers.
Conclusion The episode highlights how Vercel's tools are reshaping the landscape of software development, making it easier and faster to create complex applications. With ongoing advancements in AI model capabilities and a strong focus on community involvement, developers are encouraged to explore these tools and integrate them into their workflows for enhanced productivity.
For further information
- [Vercel's AI SDK Documentation](https://sdk.vercel.ai)
- [V0.dev](https://v0.dev)
---
This markdown summary captures the essence of the podcast episode, outlining key discussions, participant insights, and pivotal moments in the conversation about Vercel's developer frameworks.
Written by AI. May contain mistakes. Listen to the episode to check what was said.
Transcript
Automatic transcript. May contain errors.0:00The availability of high-quality AI model APIs has drastically lowered the barriers to developing AI applications. These tools abstract away complex tasks such as model deployment, scaling, data retrieval, natural language processing, and text generation. Vercel has developed a complementary set of tools for building AI web applications, including their AI SDK, v0, and the Shad CNUI component framework. Ari Kandelwal and Max Leiter are on the AI team at Vercel. In this episode, they join Kevin Ball to talk about the AI SDK, V0, Shad CNUI, and the AI tooling ecosystem at Purcell. Kevin Ball, or KBall, is the Vice President of Engineering at Mento and an independent coach for engineers and engineering leaders.
0:50He co-founded and served as CTO for two companies, founded the San Diego JavaScript Meetup, and organizes the AI in Action discussion group through Latent Space. Check out the show notes to follow KBall on Twitter or LinkedIn, or visit his website, kball.llc.
1:18Hey guys, welcome to the show. Thank you. Happy to be here. So excited. Yeah. So let's maybe start out with some intros. So actually, I'm going to go to Ari first. Can you introduce yourself a little bit about your background? Yeah, my name is Ari. I was a computer science student at Princeton. And after graduating, I worked on a design-to-code startup that Vercel acquired around a year ago. And after that, I started working on the V0 team, and I do product and engineering work there. How about you, Max? I'm Max. I'm a staff engineer on the AI team here at Vercel. And I've been on the AI team since its inception, probably around two years ago.
1:53I was there for the AI SDK, I'm sure we'll talk about a little bit. and then I was there for V0. And before joining Purcell, I was an intern there back in 2020. So been here two and a half years now and then plus some change on the back end there. Nice. So you sort of bring us into our topic, the AI team. Y 'all, as I understand it, are both working on ShadCN as well. So do you want to kind of give us a little bit of an overview? Like what is this thing and what's the origin story? Yeah, for sure. Real quick, so when it comes to ShadCN and the ShadCN components, we work very closely with them.
2:26ShadCN works at Vercel. But on the AI team, we're largely working alongside ShadCN. So we want the components to not be AI specific. We want everyone to be able to use them. You don't need to use Vercel or any of our products. But we work very closely with ShadCN to make sure that they work well for V0 in our use cases. And the AI team itself has two different products that we really work on. One, which Max alluded to, is the AI SDK. The AI SDK is a mini TypeScript framework that makes it really, really easy to build AI-powered applications. The goal is everyone is building AI applications these days.
3:00The AI SDK lets you switch between models really easy. It gives you access to utilities that make building basic parts of this application, like streaming utilities and things like that, super easy. So you can really focus on the business logic of your application and not how to stream from an open AI provider so that it renders in the UI super well, which is a solved problem. And the second thing that we work on is v0. And v0 is a tool for all developers to generate UIs on the fly. And yeah, v0 uses ShadCN components as a base component library to make those UI generations that it makes composable and reusable and actually built on top of a component library as opposed to being just spaghetti JSX.
3:43Got it. Okay, so let's maybe dive in first then to that AI SDK a little bit. You mentioned a few different things. Would you compare this to something like LangChain? Or is there another comparable that people who haven't used it should use to kind of get their heads in the right mode? I think it works with LangChain, for one. So we have a LangChain provider, and we have some tools so you can use LangChain with the AI SDK if that's what you want. And it provides a lot of more core primitives you could use to build something that LangChain might provide for you. because I think which is very common in software is you use a library and then you hit some opinion of the library developer and you're a little stuck.
4:19So at the AI SDK, we try to be very unopinionated and a little more low level. So you can piece together these parts and make your own pipelines, your own LLM apps without us getting in the way of how you actually want to structure your program. Got it. Okay. And so looking at it, there's sort of a bunch of different pieces, right? There's like the core, there's the UI pieces, things like that. If I were jumping into it and wanting to use the SDK, Is there like a mental model I should have in place for getting started with this? Yeah, I'd say there's two basic parts to AISDK. One, as you mentioned, is core.
4:49And core is really the basics around which the whole AISDK is built. The easiest way to think about core is like, this is the way that you actually call an LLM. So instead of calling an open AI provider or an anthropic provider or whatever model you want to use under the hood, you call the LLM via the AISDK core and you pass it a model, which could be any model across the different providers, across Anthropic and OpenAI and Llama and things like that. And the goal with Core really is just how can we make it really, really easy for you to switch between models, test different things out. And if a new state-of-the-art model comes out, you should be able to use that out of the box without having to go back and rip out a provider and change a bunch of stuff.
5:30The second part of it is UI. And here we really focus on building reusable primitives that make parts of the UI very, very easy. Parts of the front end that are typically required for AI applications, very, very easy. The basic component there is a function called use chat, which does a lot of the streaming behavior for you. It handles keeping track of messages, and it handles rendering those as they stream in. So together, they help you build AI applications pretty fast. And I think kind of an encompassing idea at Vercel is we're always building for ourselves, and we love dogfooding. So the AI SDK came out of us building the AI Playground, which is a web app we have on the AI SDK website that lets you try a bunch of different model providers all on the same screen.
6:13You have a bunch of columns. And then you're able to see the same response from like 20 different providers. And you can see how they all compare against each other. And we built this and we were like, wow, there's a lot of streaming code in here that's kind of tough to write. A lot of places you can mess up. A cool thing about Vercel is we have people here that know every part of the network or browser stack. So we had experts coming in and helping us fix our streaming code. And then we were like, why should we be the ones with this? And why shouldn't we give it to everyone? So we pulled out the core from the AI playground and made it the AI SDK.
6:44And since then, it's grown a bit. But I wanted to highlight on Ari's first point about core, which is switching between models. Every model provider has their own APIs, and they've kind of generalized around OpenAI's schema. But they all have different implementation details. They all have slight different things that are really annoying when you run into them. So the AI SDK covers all those. It gives you one interface to use all the different providers. And we also give you the ability to, like, when this model airs, switch to this model, do a lot more advanced things like that, which are essential for production LL applications.
7:13Yeah. So one of the things that is different across all these different models is that they expose different levels of completion stuff. So OpenAI, for example, seems to be standardizing towards chat completion. And they've done a lot of training. So they're exposing that. They've been deprecating a lot of times some of the lower level APIs. Some of the models you might use are just like full-on completion models. So I'm kind of curious, do you hide that layer? Do you have an abstraction above it? And what tools do you provide to let people dive through those layers as needed? Yeah, so I think the way we think about it is that the base completion, like base inference is usually shared across all the different model providers.
7:51They all provide some kind of endpoint to do completions. In addition, they also provide additional endpoints to do more specific tasks. And so the way that we've thought about it for the ISTK is that some of the functions that you can use in the ISTK are provider specific. So you still get access to the individual specific things that individual providers are giving you. For example, some models let you generate images. Some of them don't. So the generate image functions in the ISTK can only be used with providers that provide you that image functionality. So our goal is that if providers come out with new cool endpoints that allow you to do new different things, we will still add those to the AISDK.
8:29They might not be available across all the providers until each of them implement it. Typically what we've seen is that the rate of convergence for what these endpoints actually are is very, very fast. When OpenAI comes out with something new, Anthropic, Google, et cetera, like all race to kind of provide similar functionality. And the same happens in the opposite direction of Anthropic or Llama or Google come out with something faster. Got it. Another question kind of related to this. So, for example, OpenAI versus Anthropic is a good example. They deal with system prompts quite differently. Is that something that if I'm wanting to be able to swap quickly between model providers, you'll take care of for me?
9:07Like, how do you navigate that? We don't manage the prompt format, although it's something we're exploring. Like, Anthropic is very strong about their models work with XML. OpenAI doesn't really say the same thing, but I think a lot of people use Markdown for their prompts. And we don't have a layer for doing that. But we do have the ability to tweak certain behaviors that they support differently. A really powerful thing you can do with models is called assistant response prefills. So you can, in your messages list, give an assistant message, and then the LLM will pick up where that left off.
9:38So if you wanted to write JSON, you could put a little curly bracket there, and that strongly hints at the LLM as you continue writing JSON. on. Providers all treat those a little differently. And the AI SDK works around those bugs. So when you switch your provider or you switch your upstream, you don't hit those bugs. But overall, we try to keep it those changes to a minimum. That makes sense. Now, as we talk about building applications with LLMs, there's a lot more than just the like model level interaction. And there's some amounts of, I don't know if I'd call it standards, but like patterns that are emerging around like how do you build agents and agentic behavior?
10:12How do you handle memory and context loading and things like that? Is that something that y 'all are tackling as well or is that deferred to the end user? Yeah, 100%. So the way we think about it is that there's two ways we could have done this. One is we build more complicated abstractions and force you to use those abstractions for agent behavior, for doing rag, for doing basic things like this. We've purposely chosen not to do that. And the reason is because we've found that our users typically care a lot about having the lowest level primitives possible so that they can, you know, customize and do things at will.
10:42The way we really handled that is we provide you with recipes or like cookbooks on how to put together different primitives that we provided you in the AISDK to do very common tasks. So I think like RAG and agents and tool calling are like three examples of things that we have very good recipes for. So if you want, you can, you know, lift up our code snippets and just use them as is. But more often than not, what we're giving you this recipe for that you have a good understanding of what was the mental model we had when we were building these primitives and how we thought about putting them together to do some of these more complicated use cases.
11:18And we found that this still allows you to have the flexibility to do whatever you want with the primitives, but still gives you an easy way to get started when you're like, hey, I want to do something complicated. I'm sure people have done RAG before. How do I do RAG with AISDK? You can use our cookbooks and recipes for that. And one thing that's super useful for us is because, you know, V0 and AISDK, like those teams work very, very closely with each other at Vercel, a lot of the product influence for the AISDK comes from use cases in V0 because V0 is built on the AISDK. So it's very frequent that Max will be like, hey, AI SDK team, we're facing this problem with streaming this kind of response on this provider.
11:58And the AI SDK can be very responsive and be like, oh, there's a bug there, we can fix it and update it. And a lot of the cookbooks and recipes we have are pulled out of patterns that we built into v0. And real quick, I'll hop in and say that a lot of what we release in the AI SDK is also pulled from v0. So we build it for ourselves there, and we're like, this is really good. We try to nail the abstraction, and then we try to share it with everyone. One cool example I really hope more people start using is auto-continue responses. So LLMs have an output limit and when they hit that, they stop outputting.
12:27There's no reason you can't auto-loop back to the LLM and have it continue its last message. So now you can have really long code blocks or responses from LLMs with one line of code. And I think that's so powerful. So let's maybe actually, now that you're referencing V0 a lot, dive into V0. So first, I guess, from a user perspective, high level, what is V0? What does it let you do? And then I'd love to actually get into the patterns you're using inside of it to build it as an LLM application. Yeah, the way we think about v0 is it's like an always on pair programmer that's an expert in all things front end.
12:59This means that it's like an expert on topics like React, Next.js, Tailwind, ShadCN UI, all of this part of like the modern front end stack. If you ask v0 very, very specific questions about new APIs released in next versions or how to migrate to server components, how to use all these kind of new features in React and Next. V0 is very, very good at talking about those. And the other part, which is what V0 is probably best known for, is part of building frontends is building really beautiful aesthetic UIs. And V0 is most famous for being able to, given a prompt, generate UIs that give you the React code built with Next, full stack applications that actually render that UI.
13:40And you can preview them on v0 in the web very quickly without having to spin up a dev server doing those other things. Nice. So thinking about that, I'm going to dive into a few pieces there. So you said, OK, it's very good at answering particular programming questions. What layers are you influencing to do that? Like, are you fine tuning some underlying model with more developer focused data? Or are you do you have a search layer that you're then ragging that context into? Like, what does that look like under the hood? So we can't go into too much details on the specifics of the pipeline, but I think I can say that one reason we built the AISDK to let you switch between models so easily is we don't want to be locked into a single provider or model.
14:18So, so much of what we've done on the V0 engineering side and what I think all good LLM apps do is the non-LLM engineering to make your results good. So that can be rag and having a great data set to rag against, or that can be having just a great pipeline of trimming down the user queries or doing all sorts of things. And I think that's where we've put a lot of effort. It can be very hard to make V0 write bad code sometimes. We do a lot of work to clean up the outputs. We're always improving that, though. And I think it's really important that when you're able to switch models, you have to build around all their little mistakes, and you have a really resilient product that way.
14:54And now if someone goes down or if we want to switch to our own for cell models someday, that's a very easy thing for us to just plug in and do. I think this gets into one of the interesting things in this space, which is that I think led by OpenAI, the big model providers are often very fuzzy in their language about what's happening in the model layer and what's happening in applications, right? We'll talk about, oh, people will say, I'm using chat GPT. And you're like, okay, but some of that functionality is coming from the model and you'll talk about that. And some of that, it's making an API call off somewhere else.
15:27It's doing a tool call. Some of that, it's ragging in the right data. And it gets very fuzzy and people aren't breaking those down. So one, I love the idea of like separating that out and be like, all right, this has to be model agnostic. Some models might work better for this. Some might not. But like the fundamentals of it are agnostic. I'd love to dig into understanding you can't go into the specifics of your pipeline, but how you think about what those different components are in building an effective application on top of an LLM. Yeah, I think one good way to illustrate this is to think that when vZero started, it was August 2023, I think.
16:02We started working on it a month or two before that. We had GPC 3.5, 4K context, I think. It did not know about ShadCN, did not know about new React features. So we were starting with a model that did not inherently know what we wanted it to do. And we had to teach it all of those things. And I think the key thing is having that data set and having a data set that you can rag against and then going really deep into the ragging. How do you chunk your content? How do you embed your content? Does it make sense to embed the user query? Does that user query really map to whatever your responses are, if they're code or images?
16:33So evals are really essential for doing that sort of thing. We've been on a wild ride figuring out how to do evals before anyone really talked about them, or at least publicly. So it's been a fun ride. And I think always treating it like it's August 23 works well for us. The model is always dumb. What can we do to make it smart? That is the fascinating thing I've found with these models is they seem smart at first chance. And the more you use them, the more you're like, no, it's dumb. It's dumb, but it can do some amazing things. So how do we make it smart? Absolutely. And I think a big unblocker for us with how to make it smart was digging really deep into how users used it.
17:08Because when you give someone just like a prompt form or a text box, they can type whatever they want there. They can paste crazy things. They can be really rude to it. They can speak not English. When I talk to V0, I often send like two words and I'll write out my whole sentence. Because I know at this point what it will understand and take away from that. But you have to learn those things first. and that just takes a lot of work and grinding and working with your model. I think the second part of that is like once you have a really good understanding of what your users think your application can do, you can make as many of those things non-AI based as possible.
17:38So what we've tried a lot of is like, okay, the LLM is dumb. We know that it's dumb. If there's simple things that we can do deterministically, especially if we have a very good idea of what users want in those cases, we can pull those out, don't have the LLM actually generate those and do those deterministically ourselves. And we found that's a really, really good way to enhance output, which is like, let's not try to give the LLM infinite information and be able to do everything. Let's actually limit its scope, make it do something very, very well. And as much as we can pull out of that that doesn't need to be done with the LLM, let's not do it with the LLM.
18:11So like one example of this for V0 is like people very frequently want to change the text that they see in their UIs. There's two ways that this could happen. One is, you know, you put in some new text, we give it to the LLM and we're like, hey, LLM, go change this text with this new text. The problem is this is a non-trivial problem for the LLM. It has to go find where you need to change. It has to do the exchange itself, and it takes a really long time. The user is waiting for an entire model call to happen and be returned to actually make this change happen. And what we found is that, okay, the user actually knows where in the UI they want to actually change the text.
18:46We can use source maps to go back to the source code that actually renders this text, and we can deterministically change the text there. And we can do that all without A, making a model call, which means B, there's very low latency for the user and C, it's deterministic. It will work the same way every single time. The user can get a very good understanding of what's going to happen. And finally, it's more accurate. We do evals on all these kinds of things, but when we do a deterministic change, the chance that it's correct afterward is way higher than if we do a non-deterministic AI-based change.
19:16Yeah, no, I like that a lot. One of the things that I've been playing a lot with within my day job is we'll tell the LLM, here's a domain-specific language that you can use. And then when it uses it, then we deterministically render the pieces of the DSL out into useful code or other things that might happen. And I don't know if this is the case, but I can imagine with something like shad-cn, you could expose to it the component model, but then just deterministically drop in the components as you need them. Right, exactly. And I think something else we do, similar to what Ari was saying about the refinement is what we call it, the selecting something and being able to type it without an LLM call is, for example, LLMs are often lazy.
19:55So they will emit code. They don't want to write it all out. And we have a second pass that fixes the laziness. And I think that's a really powerful idea of don't spend a ton of time trying to prompt out these behaviors that are inherent to the models based on their training or whatever. Work with them. You know, if you wanted to output JSON and it's messing up the JSON, make or find a lazy JSON parser and fix that JSON. Don't try to keep retrying the LLM calls or wait for it to work. Make it work for yourself. And that's how, as I was saying before, like you build a really resilient product. Yeah.
20:23Another thing I've seen in this space that I'd be curious, and maybe you can or can't say something about this, but tools like Cursor not only have the core LLM call, but they have a diffing model. That's like, okay, how do I apply this to the code that I already have? That's a separate model, totally fine-tuned on its own. And having different layers of, even if you are using models rather than deterministic output, but having different layers with more refined purposes can really up your reliability. Absolutely. And that's a great case for like fine-tuned models or small models or something you don't want for your main response, but you can use them to clean up that main response.
20:56And I think that's something super powerful that we'll be seeing a lot more of in this agentic 2025. Nice. So let's maybe talk a little bit as we're on V0 about ShadCN. You mentioned that's kind of the default component model. Can you explain a little bit what it is and why use that over something like Material as your default? Yeah. Yeah, I mean, ShadCN is an open source component library built for React primarily, which gives you the most basic building blocks that almost every web application needs. So you can imagine the kinds of things you're getting here are like, okay, cards, buttons, badges, dropdowns, modals.
21:31These are all like very, very basic parts of like any kind of web application that gets built these days. What ShadCN gives you is it gives you the code to render these components. And it's not an install. It's not a package or anything you install. It just gives you the code. You copy paste that code. And it gives you a really, really great starting point to customize and build your own design system. And so the biggest unique part about ShadCN is that you are not dependent on some third party system where, you know, Material UI can update their package at any given point in time and like, you know, change your design system and you have to work around it.
22:03ShadCN gives you building blocks to start off with that you can customize at will and kind of build your design system from scratch around it. And yeah, that's ShadCN in a nutshell. And I think it's also important to highlight ShadCN components are built on Radix UI, which is a headless library, which means it has no styles, but it's very accessible. So you're starting off with ShadCN, you're like set up for success. It's accessible, it looks good, it's very customizable. And it turns out that it looks really good without a lot of code around it. So LLMs are actually pretty good at throwing it together because they know there should be two buttons at the end of a form.
22:36It doesn't necessarily need to know what that button looks like to ensure it will look okay. It helps to give it some knowledge to make it look good, but it's a great place to start from where you're guaranteed kind of something that's reasonable. So you highlighted the thing that's different is it's not a third party dependency. It's essentially copy and paste, which is kind of an inversion of traditional best practice. What's the thinking behind that? And I think that's it's ingenious, particularly in an age of LLM based coding. But I'm curious how you all think about it. Yeah, I think there's two reasons why this works here and it maybe doesn't work everywhere else.
Read the full transcript
23:10The first is like ShadCN is not a static utility that once you use it once, you want to use it exactly the same every single time you use it. So typically you want to import a package when it's like, hey, you know, this is a date formatter. It will work exactly the same way every single time. And I want it to work exactly the same way every single time. If there are changes and updates on their end, I actually want to get those changes and updates. So that's the second piece. It's like typically it's, A, I want it to work the same way every time. And if there's a change, I actually want to get that change and be able to use the new version of it.
23:39for a design system typically like both of those are not true a you don't actually want to use a component the exact same way every time components change and grow over time it ends up being a block for you if you're like hey i actually need to modify this component slightly and suddenly i like no longer have the ability to do so because i'm importing it from some package i have to wrap it and like use a wrapper for it instead and then change the wrapper it ends up getting kind of complicated and the second is you don't necessarily want all of the updates from like shad cn you You know, like if he releases a new component, you can just use that new component, copy paste it.
24:13But if he changes the interface by which you interact with an existing component, you don't necessarily want to see that, like get that upstream change. And so that's why it's actually, you know, our thesis is that it's actually better for this kind of design system use case to not have it be a package that you import and like consistently keep updated. Yeah, I think the key there is that you're able to change the components. So you really are. Once you install them, they're the default ShadSan components. Then you can customize them. as you're building your app or building your website, you start changing the border radiuses, you start changing the colors, and all of a sudden it's yours now.
24:43It's no longer really standard chat. The approach here reminds me a lot of what you were talking about with regards to higher level abstractions in your AI SDK, where you're not providing, here's an installable thing with skimming all these things you have to do. You're like, here's a building block. Go, create. Right, and I think that's all because we're building it for ourselves. Like this is what we would want and we would get upset if we couldn't change our button styles or if we couldn't modify how our rack works. So bringing back a little bit to the AI SDK, we talked about core, but there was also SDK UI.
25:16Is that related to ShadCN? They're completely distinct. They play nicely. Like what is the relationship there? Yeah, they're completely distinct. The way to think about UI is like, it is utilities for you to use on the front end to do basic parts of AI applications. So a very good example is the most basic thing that people are building with AI is still chatbots, right? There's a lot of parts of a chatbot that are shared across every single chatbot that's ever been made. You have to have some kind of messages. The messages are either, like there's a role for what those messages are. They need to be rendered on the front end and they have to be, like typically the AI messages get streamed in from some third party, like from some API.
25:55So those are shared across every single chat application, no matter what. The thesis with UI was like, hey, we don't really need you to come up with these abstractions from scratch every time you want to build an AI application. We know that you're going to build some kind of message object. We know you're going to render that message object and we know you're going to need it to be streamed in. Why don't we give you like good abstractions for a message, for example, that you can use out of the box. And that way you can get started with an AI application really, really fast. And the goal, again, the balance here is like we're giving you these abstractions and the goal is to keep them as low level as possible such that you can customize them and use them at basically at will, while still giving you the benefits of like, some abstraction where you're not worrying about the low level of how am I streaming in content and rendering it in the UI optimistically or not optimistically.
26:45UI kind of does that part for you. Got it. And for both of these libraries, you mentioned that the team works very closely with the v0 team. Are these going to be community projects at some point? Or is Vercel more or less run them top to bottom? I mean, AISDK is an open source framework. Anybody can contribute to it. We have a lot of community contributors to it already, especially when new providers come out and new models come out from new providers. The community typically builds providers for the AISDK for those. So AISDK, totally open source, already very community-driven. V0 right now is a Vercel-branded, Vercel-run product.
27:22It is built upon ShadCN, which is itself another open source. you can open a PR to chat CN today if you wanted to. And that's kind of how Vercel thinks about all of its products. Even it's our managed, you know, paid products are built on top of very, very strong open source foundations. It's like built into Vercel's DNA. That's awesome. So looking now at these things, and you mentioned one source of changes, new models, things like that. You also said that, you know, as you uncover needs often from VCR or other things, you know, those get sort of baked down into the AI SDK, where would you say kind of the growth edge is for these libraries?
28:01Like, what are the pieces that aren't quite where you want them to be yet, or where, you know, these libraries are really evolving? I know something we're actively thinking about a lot, there's an RFC still, I think, on the GitHub, if anyone's interested in poking their head in there, is agents and OpenAI release swarm, and how do you coordinate multiple models together, and then also render those outputs on the front end in a nice streaming-friendly manner, perhaps. So that's a lot of where our headspace is at right now. I think models have gotten so good, you can now let them kind of do their own thing for a little bit.
28:31You can give their outputs to other models. And we need some kind of tools to help pair those together a little bit more. Is that thinking advanced enough you could sort of explain a little bit? Like, how is the AISDK thinking about agents? Or how do you at vZero think about agents? That is a loaded question, because I know there's a lot of discourse right now about what is an agent. Hot take. What is an agent? I have put a lot of thought of this. I still haven't convinced myself fully. I go more on the second. It's not just giving you an output. So when you are having it do tool calls to third party services or having it make decisions besides what to respond, I feel like that's agentic.
29:08You have multiple steps and it has to make decisions. and that's already fully supported but now it comes into this like multi-model agent where you have this whole graph of all these different things calling each other and that's a really fun problem that I don't think I have a great answer to on if I consider those more agent or not, I guess. Yeah, I think people typically think of agents like there are two requirements. It must be able to do something, right? It must do something that is not just return text and the second is it must be able to take multiple steps to do the thing that it wants to do.
29:39So typically, I would say if it satisfies both of those criteria, we call it an agent. There's obvious questions about, okay, if a single call can do multiple round trips of a tool call, is that agentic behavior? Maybe. I think that's where the discourse gets super granular and very in-depth. But I think in general, it's like, okay, if you're taking multiple steps and it is doing something that is not just returning a text response, we would call that an agent. so you described in in v0 having for example loading different types of contexts doing making decisions about doing things deterministically doing other stuff would you call v0 an agent yes again some people might argue about that but it is definitely an agent yeah i think the way people typically think about agents is that oh like if i if v0 generated a ui and then fixed it and then added a bunch of features like one after another all without any human intervention.
30:34That's what they imagine when they think agent. We already do a lot of steps for every generation that you get behind the hood that are hidden from the user. And v0 does a lot of things that are not just generate text response. So I think we probably fit those two criteria. Although I know when people say they want an agentic v0, they typically mean I want it to take multiple steps and generate a bunch of UI all at once. And it can take longer going to do that. But yeah. So how do you think about how v0 plays into the product development process? And I know this is an active conversation all over the place of like, okay, what sets of things do you do with a v0 or replet or something like this, where you're like, generating something from scratch and kind of an agentic way?
31:18And then when do you export it out and handle it a different way. I'm curious, what's your perspective? And since it sounds like you dog food everything, how do you all use v0? So the easy answer to this is that we have found that people use v0 for everything. Internally at Vercel, we have a channel on our Slack called How I v0, which is just people posting how they're using v0 for various different things. We have found that people use it for way crazier things than us on the product team ever would have imagined. In general, I think we've seen three to four big, like large use cases. The first is early in the product development process, when you're still at the ideation feature definition stage, typically people spend a lot of time writing feature requirement docs or trying to build like low-level mock-ups or some way get across whatever that product vision in their head is.
32:10V0 is a super easy way to get that across. And we've had multiple features at Vercel start as a V0 generation by some, you know, maybe non-technical person and then actually make it to production because it was very clear what that was intended to be. The second thing we've seen is people start with designs and they want to get like an 80 % way there very, very fast. They don't want to spend three days like scaffolding out what this design is going to look like to build the front end for it. V0 is very, very good at getting 80 % of the way there once you have a like given design. And the third, the most V0 pilled way to use V0 is use it as a quasi-IDE, basically, where you start the process there, you brainstorm, you kind of work with v0 to define what this is going to look like.
32:55Then you build out the business logic. v0 can write full stack Next.js code. You can build out the business logic in v0 itself. And then at some point when you're ready to deploy, v0 allows you to deploy to Vercel super, super easily. So you can really do the full product development process all within v0. and that's the like, yeah, most v0-pilled way to go about it. The final thing I'll quickly mention is that we've seen a lot of just like non-app development use cases as well. So things like our marketing team, when they have to build visuals for data that they have, they give v0 the data and ask it to build really pretty charts.
33:30They can customize that. It's all backed by code. V0 can execute Python and execute in a Node.js environment. So people are actually running, creating scripts and running scripts, doing SQL queries, all that kind of stuff on vZero as well. So there's a whole fourth category of non-application development use cases that we found people use vZero for. And I would just throw out that I think a surprising amount of vZero has been built, at least at the beginning, with vZero. It is such a good tool for, I'm someone that I love writing code. I'm not great at writing CSS or styling my websites. vZero is a fantastic tool for me.
34:04I do all the implementation myself where all of vZero started. I give it the implementation and I'm like, make a UI. and it is fantastic for that. And I think for people that know how to code but don't know how to build front ends, it is an amazing tool right now. Let's maybe dive into a little bit of that back and forth. You said, okay, I give it my code and ask it to build a front end. What does that management of code process look like? Sure, I'll preface this with we're actively exploring this. We would love to be able to have you plug in Git Repos and sync it with Vercel and that is on the roadmap.
34:35Right now, I will take my schema file or my whatever file I'm working in, paste it right in. I might have a chat already where I made that file. So I just go back to that chat and be like, all right, now I'm working on this part of it. I think those are the two main ways you start with v0. And as you use v0 more, you have chats about the things you're working on. So you can go back to those chats. You can fork your old block and you can have a lot more of your kind of like a git message, but it's a whole chat now. So you have all this context about how you got from point A to point B stored in this chat.
35:04I think that's super powerful. so if i'm hearing you correctly right now it's not directly connected to git so if i wanted to go all the way v0 pilled and i wanted to build my whole application with this but i'm you know a seasoned perhaps burned a few times engineer and i want to make sure that i'm committing things along the way and things like that am i copying and pasting is there an export if not an import like what does that look like right you can copy and paste going back to shad cn that's like we always want to support the copy and paste. We also have the ShadCN CLI. That's a tool that ShadCN wrote that lets you easily update and install your ShadCN components.
35:41You can also give it URLs to your chat or to your v0 block, which is the website in that. And it will pull the dependencies, it will pull the files, and it will make sure it's installed and integrated nicely in your project. Oh, so that's interesting. So I can have a chat with v0, end up with a component of some sort, and then use the ShadCN CLI to pull that down into whatever repo I happen to be working in? Exactly. And then you can edit that file if you want, or you can go back to v0, keep working on it, and run the command again to update it, or copy and paste. That's really interesting. And it's cool that, not super v0 related, but we're seeing more products around the web pick up this ShadCN CLI support.
36:18It's an open source. You can make your own registry. So one big one is Framer Motion, or motion.dev now. They have open in v0 buttons and ShadCN blocks. So you can use the registry to pull motion components into your React app. So that's one way, again, we're taking this V0 feature and we're trying to share it with more of the open source community. So one of the things that I think we're all, all of us in software are grappling with right now is how these tools change what our job looks like. And y 'all are not only building the product that's changing our jobs, you're using it to build itself and kind of doing that.
36:51So how do you think about what software development looks like in this LLM world we're in? For me, it really is you can just build more. instead of you working on one thing at a time now, kick off three V0 chats, I'll tab between them, and I'll be working on three things at once while another page is responding. And I think as we go down an agent route and all these models start doing more multi-step things, you'll have more time to wait while your output is being done, which gives you more time to do more things. So maybe it's naive of me. I really am thinking it's like a force multiplier, and that's how I've seen it help me.
37:23I just am able to produce more code. I might have to review it a little more carefully if V0 wrote a lot of it, but that's still faster than me sitting there and writing it off by hand. I think it also lets you work at a higher level of abstraction, especially when you're working with syntax that you're not super, super familiar with. So when you're working with new APIs, new functions, new languages, anything like that, AI makes it really easy for you, as someone who understands computer science and principles behind development, to build things really, really fast without having to spend the time going through and making sure your syntax is accurate and like looking through documentation to figure out what functions to call and stuff like that.
38:02So very frequently what I'll have V0 do is like I will give V0 a like tech plan of sorts where it's like, hey, I need to load this data in a server component, pass it down to a client and like write these hooks, which is like in my head how I plan out what I have to build. And I'll just say like, okay, you go build that, you know? And so the architecture decisions are still being made by me, but the implementations, I don't have to worry about because those are like relatively straightforward already given the architecture decisions. And it certainly helps if you're technical. So maybe, you know, you can guide it a little bit on debugging or what to use.
38:34We see a lot of people using v0 that are not technical. And we just try to make it really easy for them. Like you might get an error screen if v0 writes wrong code or you visit a page that doesn't exist. We give you a nice little button that says fix with v0 and you hit that and now your error message is sent to v0. So trying to streamline the development process also makes it easier for us. So we don't need to copy and paste the error message and people that don't know what an error message is. And I think that's been really powerful for the adoption of Vercel and then for all sorts of people at companies to be able to use it, not just the engineering or product teams.
39:03In fact, the top user of Vercel is not an engineer. Actually, I think the top three people who use Vercel are all not engineers. That's kind of interesting. What would you, and you have this whole internal channel of made with Vercel or whatever, like what are some of the most novel use cases you've seen for this? Some interesting ones that are maybe not super novel, but were not things we were thinking of, is our sales engineering team will use vZero to build customized demos for prospects. So instead of coming with a slide deck, they will come with a demo of whatever it is that they're trying to explain to the prospect, which works way, way better.
39:43And what they can do then is live during a customer call, they can modify the demo based on things that the prospect is saying. So this is never like not something we had thought about at all when we had built VZero in the first place, but we've seen like tremendous usage among our sales engineering team to make that happen. I think one of the coolest demos I've seen was I think Guillermo, our CEO, was giving a presentation. Oh, yeah. Some talk. And he gave the presentation using Google Slides and everything. And at the end, he had escaped and it was Google Slides built entirely in VZero. The UI matched.
40:14It was started with a screenshot. You could add slides, edit your slides and hit present all in this VZero generation. I love talks that do that. I thought it was really cool. And it actually we keep using that we keep forking the block and changing it for different things, because it's just it's such a fun way to build a presentation. No, that's really interesting. And I think one of the things that these tools are enabling is that much more rapid iteration, right? Of like, okay, I'm building a demo, then I'm talking to them, then I'm changing it, then and it's evolving. And that lets you really explore much more quickly.
40:44I am curious on the productionization side. And this is the classic engineering concern, right? Of like, okay, it's great to build a demo super fast. And the CEO says, all right, that's great. We're shipping it next week, right? What does the productionization path look like? You alluded to this a little bit, but like how much work does there tend to need to be to get it from the 80 % demoable version to the 100 % I can sell this to customers version? I think it depends on a few things. One is your experience and your ability to code. We have people that have 200, 300 versions of their block in v0 or their generation.
41:21And those will often be 20, 30 files. It'll have suba base. It'll have login and auth. And those are effectively production ready. People hit deploy and they deploy them to Vercel. It took a lot of prompting for them to get there, but they got there. If you're trying to beat a deadline and you're an engineer, you might want to pull it out of v0, put in your code base and start working yourself. And those are both fine. and we've seen both happen. I think what's key is that by giving v0 the up-to-date knowledge on how to use Next.js, how to use React, web standard best practices, all this knowledge we have at Vercel that we've given v0 to try to make it the best web development agent or LLM, that all pays off in dividends when you actually go to deploy your application and like, hey, it added rate limiting to the server route or it properly didn't block on this really long request or something like that.
42:08Yeah, it is interesting. I find particularly like some of the models from Anthropic, like Sonnet, they write better code than I do when I prompt them correctly. Right. And like if you can code some of that prompting knowledge into your application layer of V0, like, dang, you get good stuff out. Yeah, absolutely. I think one thing we had on the original V0, which we didn't talk on, but that was not a chat app. You gave a prompt, you got generations, no chat. We gave you three versions of something. And that's because models were a lot worse then. So we kind of had to try it three times and hope that one of them worked really well compared to the other two.
42:40And I don't know, I think still there's something there about giving people the choices and the ability to kind of pick and choose. Well, I think that is one thing that's key in all of this use of LLMs for stuff is like you can't turn your brain off, right? Like you need to be engaged. You need to be checking. Is this actually doing what I wanted? You know, you need to look at it and approve it or correct it. But yeah, it makes that in-between process of I have an idea to let me see a first version of it just goes so fast. I would say the analogy I often use here is that it's like a higher level programming language.
43:14It doesn't mean you need to stop programming. When you stopped writing assembly and you started writing C, it didn't mean that you stopped programming suddenly. It meant that you were still just using programming concepts at a higher level of abstraction. You still have to be able to do that in some capacity here. And this is just another higher level of abstraction that you're now able to work at. Now, you all said you started this project, if I recall, it was like summer 2023. something like that. So we're now a year and a half along. If you project forward six months, a year, a year and a half, what do you see happening in this space in general and with VZ, VZero in particular?
43:54Yeah, I think we can maybe talk about what's happened since we started and then what happened in the future. So as Max mentioned, when we started VZero in October of 2023, it was like OpenAI's 3.5 model class and 4K context window, which now seems like the craziest set of assumptions to begin with. So a few things have changed. One, models have gotten like 10x smarter, and we expect that that will continue. So the cool thing about building applications as a layer on top of like base LLMs is that when LLMs get better, the applications we build get better. The AI SDK makes it super easy for us to keep using the state-of-the-art model as it comes out.
44:37So the number one thing we expect is models will get better, our code quality output will get better, and LMs will get better at coding. The second thing is that context windows are increasing. So at first, you could only give the LLM a little bit of information alongside your prompt to make it do whatever it is that you wanted it to do. You can now give it probably 10x that amount of information. And in fact, Gemini has released models that have an infinite context window. You can give it as much information as you want. So the ability to get custom personalized answers is getting better. Obviously, there are infinite context windows are not as good at dealing with all that context as shorter context windows.
45:17There's like more abstractions and more work to be done there. But in general, you're getting more personal, better responses. And the third is that we're getting better at just building the software 1.0 layer here of like building good web applications around AI. We're getting better and better at being able to do that. So things like being able to do some things deterministically, being able to use different models for different pieces of our generations, and things like that, those are all only going to get better. And I think it's really clear now that all the major model providers are, they're aware of the V0 style or Anthropic Artifact style use case of generating code, probably React and ChatCN and Tailwind.
45:57So now we're expecting models to get even better at maybe that subset of technology because it's so popular right now and it's so good for us as developers. So I'm going to push a little bit more because yes, we can expect the models to get better. What do you see missing right now in V0? Like what would you want to build or what are you already building that's going to make this? I would say like one interesting case is let's talk about error rates, right? So given an LLM output, there is let's say an X percent chance that like that output has some kind of error in it. Right now, our problem is when we want to do more complicated tasks, we can't stack those on top of each other because we compound error rates over time, right?
46:39So if we have a 10 % error rate on one generation and we have four to five different generations happening, you now have like a, you know, one minus X percent to the nth power, like chance of that being wrong, which compounds very, very fast. So right now with the error rates that we see in models, even a three to five step process is not something you can trust the LLM to do because even in just five steps, you're at a 50 % success rate. So just a tiny increase in the success rate of base models allow us to stack model outputs and feed in the output of one LLM into another LLM in a much more agentic fashion and just do more complicated things as a result.
47:21And small increases in accuracy dramatically affect our ability to do that because of the fact that these errors compound over time. So I think that's one example of at least something I'm super excited about, is that as models get better, even slightly incrementally, we can suddenly stack a lot more of those together without seeing a huge, massive increase in our error rates. And I think we'll also see LLMs get better at using just modern technology they're not necessarily trained on. A big thing documentation sites now are doing is they're exposing LLMs.txt. So you can visit this.txt file and it has all of the docs in one file.
47:55So you can copy and paste those to an LLM or run your rag and chunking on them. And I think tricks like that are becoming so much more popular. Anthropica's MCP, which lets models connect to basically integrations. So V0 lets you use environment variables from your Vercel projects. So you can connect to anything your production website can. I think we'll see a lot more of these integrations and third-party experiences kind of merging. So why can't you render part of your super-based dashboard and be zero? I think you will be able to soon. And I think part of it is like, you know, we've been talking about changes that model companies and like, you know, at the AI layer, what's going to change to get better.
48:31But the world is changing to adapt to how people use AI. And I think the llms.txt is a really, really good example of like documentation sites are changing how they do things to be better ingested by LLMs. One of the reasons, for example, Shad Cien works so well with LLMs is that the styling and the component structure are co-located. You have inline styles, like Tailwind class names styles, where the structure of the component and the styles for the component are in the same place. And one of the reasons why this is so good for LLMs is that they no longer have to keep track of two different files and try to keep them together.
49:05So more people are adopting Shadzia and more people are adopting React, more people are adopting Tailwind because LLMs are good at this kind of thing. So basically the world is also changing to reflect what AI is very good at. Yeah, absolutely. We're learning how to use these incredibly powerful tools and we're building all those connecting tissue. I love the idea of being able to pull in your dashboard from Supabase or whatever, run it in your V0. We were talking about import my Git project, make these changes by chat, export it, deploy it, do all these different things. That's an exciting world.
49:41So we're getting close. to the end of our time together, are there any things we haven't talked about that you all want to make sure that people take away, knowing about V0, the AISDK, ShadCN, any of these different pieces? I think I would say that we are building faster and faster all the time, largely in thanks to V0 and AI. So I would expect that to be true for a lot of LLN applications, but they're only going to get so much better from here at a much quicker rate. We're all figuring out what works, what doesn't. people are writing about it and sharing. And I think that V0 and AI applications, if you've used them like a year ago, revisit them, try them again.
50:20Everything is just so much better now. You can get started using all of them for free. You can just go to V0.dev and try out some prompts, like play around with it, see what comes out. The AI SDK is totally open source. Now you go to SDK.vrcell.ai, you can see the docs and start building applications with it right away. And Vrcell has a lot of great templates to actually get started with all these kinds of technologies. V0 also has templates to like get started with building really cool designs. So basically there's no excuse to not be coding. Regardless of if you're a coder. Yeah, exactly. Everybody can ship.
50:56Everybody can cook. I love it. That's a great place to stop.
From the publisher
The availability of high-quality AI model APIs has drastically lowered the barriers developing AI applications. These tools abstract away complex tasks such as model deployment, scaling, data retrieval, natural language processing, and text generation. Vercel has developed a complementary set of tools for building AI web applications, including their AI SDK, v0, and the shadcn/ui
The post Vercel’s Developer Frameworks with Ary Khandelwal and Max Leiter appeared first on Software Engineering Daily.
