Laravelstream· Feb 9, 2026· 2:05:19
And we are live. Hello, everyone. Good to see you all. We have a very special guest today. We have the Taylor Otwell. Taylor, how are you doing this morning? I'm doing good. I'm rocking and rolling. How are you? I'm doing pretty good. It was a good weekend for me. Hopefully, everyone in the chat. I know we have already had quite a bit of people in the chat already.
so a lot of people waiting so if you are here and you are uh ready to see what the aisdk has in store for us and also just to hear taylor's thoughts on the aisdk why he built it i'm excited for that personally i haven't gotten a chance to talk to taylor yet about the aisdk specifically but if you're here let us know where you're watching from and um i guess taylor what's a good what's a good question what's something that's been on your mind like outside of work like maybe
tv show what something like that oh man i don't even know everything's been a blur since i did the aisdk and then i was in um india in dubai for larik on india so like i feel like i love the place yeah i feel like this is like maybe the first week i feel like i'm kind of getting back in the groove um there you go yeah so i don't know i don't even know what's going on in the world i guess what was your whenever you travel somewhere what is like the the food or like
thing that you try to make sure you you do i try to just like have especially if i'm going somewhere like india um try to have like whatever food that the people there really like so okay for example like the first time i went to india i was at the hotel and like the room service guy i got back kind of late to the hotel and he was like you know do you want any food like what do you do was like almost midnight and he was like i was like just bring me like whatever you would eat
at this time like whatever your favorite thing to have would be just like bring that and i'll just try it uh so i just try to do stuff like that um just so i can get a feel for like what people are like you know what they're really doing in these places i love it i guess then for everyone watching i already see a bunch of uh all all over the place so we got um evan from switzerland uh bakersfield california god to see you here albania kuwait uk i love just like the uh how how global
everyone is india um good day from pakistan i guess everyone what time is it for you right now i always love to see that and then also kind of similar to taylor what is uh what is the thing that you always tell people to try whenever they are visiting your region so food that you always tell people to try oh that's a great question actually i think like in arkansas and maybe other states in the south a lot of people like to try the barbecue you know and when i say barbecue
i don't mean um like you know like yeah yeah like barbecue with like barbecue sauce like pulled pork brisket with barbecue sauce stuff like that around here it's a lot of like pulled pork but um yeah in texas it's more like the brisket you know yeah that makes sense i i have not been to arkansas and in arizona i guess i would tell people to try any hole in the wall mexican restaurant
like that would be my good yeah unless we have a lot of good mexican places here too it's so good yeah it's great unless you're like in scottsdale then there's some like good burger places that i would recommend uh good old greg sausage roll i have not had one unfortunately i've heard good things uh 9 p.m dubai time well thanks so much for staying up staying up late uh we got 14 o'clock
here in brazil uh 10 03 p.m in pakistan i think that might be oh no mind 103 a.m right now in ph all awesome i love it uh macedonia 1603 god or 1803 glad to have you all here any ghanaian developers in the room says ovac for you um joshua what is going on gents i'm excited for this well we're excited to have you here joshua glad to have you here um and liam says i'll buy you a sausage
drill next time you're in the uk josh okay sounds good to me i am always down for some food i did have taco bell when i was in the uk so and it was actually pretty good man i've got a taco bell it's like right outside my neighborhood i mean i'm talking across across the street basically i didn't know i didn't know this about you if you love taco then that's awesome i love it it's so quick i can like run over there and get like lunch and be back home legit like 10 minutes yeah even
if i eat at the restaurant you know what's your what's your go-to current taco bell menu item right now oh man like if i just want to be like really efficient in and out i'll do just like two bean burritos and a drink and okay crush them and then dip out of there it's like five minutes what do you get i i get um like either the cheesy bean and rice burrito like that's kind of like one of my go-to or i always love like anything chicken from them so like the there's the the
cheesy chicken chipotle flatbread thing i like that yeah um yeah like cheesy bean rice burritos i've always had since i was like in high school so those are kind of like my you know uh go-to for nostalgia's sake yeah for sure and then a baja blast i used to do full sugar now i'm baja blast zero my daughter does the baja blast zero too yeah i i tried it full sugar again like for the first time in like i don't know 10 years and i was like wow this is this is a lot i can
feel it awesome well glad to have everyone here it's it's crazy to see how many people are here mostly i to see taylor and also to hear about this ai sdk um so if you do have questions in the chat be sure to drop them i'll try my best to be watching but mostly the goal of this live stream is one to get taylor's thoughts on the ai sdk what it is how you would build with it within laravel maybe like why it was built and then two hopefully like the towards the latter half of this stream
being able to build something. There's some projects that I've built that we can kind of show off the AI SDK and just like what's capable of. But I think like the perfect part is being able to say, okay, what actually is capable when you're building things? And then the why. So again, if you do have questions, again, everyone's kind of shouting out where they're from. I love it. Keep doing that. It's awesome to see people from all over the world being able to come together and say hey this is some cool things that we're building with this cool software that we love
um so taylor powered by taco bell uh what was the reason like why do i i think like the first thing i saw you start talking about the ai sdk it was probably i don't know probably in october november of last year i could be wrong on the timeline but why did that come into fruition that was one of of your projects, I think, that you kind of picked up and you're like, I'm just going to, I'm going to dedicate my life to this. Yeah. I mean, obviously everyone was just kind of
tinkering around with AI stuff as they have been for the last few years. And, you know, it's just like such a important part of the dev workflow at this point. It felt like we needed some sort of first party opinion on interacting with AI providers. I mean, just like we have like opinions on sending email or like queuing jobs and just like, this is becoming such a common part of what people do when they build apps that made a lot of sense to bring something first party and
have an offering here. I usually try to think of if I'm going to build something into the framework, I kind of think to myself, is this applicable to 70, 80% of devs in the Laravel world if I'm debating whether something needs to be in the framework? And then for a package, the AI SDK is maybe a little bit more lenient. Like, is this applicable to maybe half of Laravel devs in the
world? Probably so, right? With AI and probably increasing dramatically over time. So it made sense to have something. And yeah, I did build it myself. And it was the first package I've written at Laravel in a couple of years. The last stuff I wrote was Livewire Vault and Laravel Folio. And then as we were building Cloud, building Nightwatch, I didn't really write a lot of packages at the time and now i'm kind of like back in the driver's seat with the ai sdk
i just kind of like one most other people here were busy with other stuff right so it's like so someone has to build it but everyone's busy so it's like well i i it'd be good for me to like get back in the code and like building something uh fresh and it sounds fun so like i'll tackle it and plus i had some ideas for what i wanted to do with it um there was already some cool stuff being done in the community around ai stuff with like tj miller's work on prism which we kind of
of built upon in the ai sdk i kind of see like that as like almost like a queer builder and eloquent type of relationship like you know i think the ai sdk i try to put like a little bit more opinions on top than people might typically build in a in like kind of a generic ai sdk yeah um yeah that's that's awesome i guess like for for those in in the chat some some quick
questions as well. So we'll be paid or free. It is already out, Salah, and it is free. It's a free package to use for the AISDK. I guess for people who are just joining us as well, thank you so much. We're going to kind of take the first little bit, talking a little bit to Taylor about his thoughts about why we built it, what's it for, and then the second half of this stream, we'll be able to jump into some code and see okay what what does this look like practically building um in today's day
and age uh but uh for those joining what is your favorite outside of the ai sdk because that's a little bit of a curve or home run type of question uh what is your favorite laravel package either first party or third party love to hear it in the in the chat um taylor what's your favorite package that you've built outside of the ai sdk oh man if it's like something that's in laravel it'd it'd probably be eloquent. It's also the hardest thing I've pretty much ever built. If it's like a package,
I'm a pretty big fan of like, I think Reverb is cool. I think Echo is cool. Like kind of the real-time stuff in Laravel. What else do we even have? Let me look at the docs. We've accumulated quite a few packages. There's quite a bit out there. I mean, I think Octane is pretty cool. To some extent, like the bulk of octane is sort of handled by other people right like the franken php team
and swool and stuff like that and but uh just the ability to like boot the laravel app and kind of keep feeding your requests really quickly um yeah yeah pete bishop said my favorite package pennant cannot live without fortify it's crazy how many packages there there are that the laravel ecosystem has especially when on our laravel youtube channel during the advent season of last year so for 24
days and then a special guest message from taylor on the 25th day uh we had one video for every package and there were some packages that we we didn't make a video for so enough to have at least 24 videos is pretty crazy and some of those could be split up as well uh yeah i i think my favorite personal favorite is cashier and i didn't really get into cashier too much because when i started my laraville journey i started with um spark and so i didn't really have to touch cashier too much
it was kind of already done for me uh yeah but over the last year using cashier i was like oh this is actually incredibly easy man yeah we're working on some other some new cashier stuff and some new fortify stuff actually um hopefully we can show pretty soon but like man cashier is like that is a i don't think like back when um i first wrote cashier like integrating with stripe and all that it is a lot of work to like catch all the webhooks store all that so yeah i think a lot
of people find that package pretty valuable yeah and especially if you look outside of the literal ecosystem most people you know have their own set way of okay hey here's how to not make stripe a incredibly difficult to work with and everything like that so you know it's you know it's valuable uh we got some people saying uh reverb uh cues and jobs i guess we'll call that as part of a package working with keys and jobs is incredibly easy yes love for octane uh prism is insane uh i agree we
got inertia love laravel nova uh favorites love uh octane um sail octane reaver for you fortify i love it i love it uh reverb is also cool i i do love i do love reaver makes everything makes everything easy uh so taylor when it comes to the ai stk what is how is this different than maybe
like working with ai in laravel so how is this different than like a boost for example or even mcp where does this uh sdk kind of fall into yeah so like right now we have kind of three ai related packages at laravel um um i i think mcp was actually the first one so mcp is MCP stands for Model Context Protocol, MCP, right? Model Context Protocol.
And it is basically a way to like, I think of it as a way to like expose a standardized API for LLMs and AI things to talk to. So like I have an app on the internet and I want to allow like chat GPT to do things or some other tool to do things with that. Then I can use MCP to expose functionality and OpenAI started coming out with this new kind of like, I don't even know if it's out of beta yet, but eventually like sort of an app directory of things
you can like interact with from chat GPT and things like that. But that's all kind of powered by MCP. So then there's Boost, which is actually a little local MCP server that runs on your machine that Cloud Code and Cursor and other like agentic dev tools like OpenCode can plug into.
And what it does is it just like makes available some tools to those agents so that they can query the Laravel docs, they can run Tinker commands, they can inspect your database schema. And so the idea is it improves like the quality of the Laravel code that things like Cloud Code and Cursor can write because they have access to the latest docs. So like if I release a feature, you know, tomorrow in Laravel, because we release every Tuesday, LLMs have like no idea that that feature exists, right? Because they've been trained on old data.
But Boost actually allows us to feed them like the latest info. So they always have access to the most up-to-date docs. If you're writing Laravel and you're using CloudCoder Cursor, which at this point you probably should be using some sort of like AI assistance. I think installing Boost is just like a no-brainer because it's like a free package. that is probably only going to make the quality of your code better. So I would definitely install that. So that's the second AI package we released.
And now the AI SDK is the third, which is sort of like a streamlined, unified interface for working with different AI providers like OpenAI, Gemini, Anthropic. So I want to generate some text. I want to stream some text or I want to generate an image or audio. I can do that with the AI SDK through a unified interface and kind of try different models, try different providers without going and like researching what what is the you know what's the
http endpoint for generating image on gemini and now what is it on open ai uh it's just a really streamlined way to work with ai yeah yeah i love it um yeah someone someone asked the question uh for someone that does not know what level ai sdk is how would you describe it if you was i think taylor just did that uh but i think if i could put it into another words and maybe taylor you you can correct me. It's like an eloquent way of interacting with all these things that
now in this world of AI, you would expect you have to interact with at some point in time. Yeah, I think so too. And then, which I'm sure we'll get into a little bit later. It sort of is integrated with a lot of Laravels, the rest of its stack. So like if I generate an image, I have a method to like store that image using the file system stuff in Laravel. Or if I want to like cue the generation of an image it's actually integrated with the queue system in laravel so
um it's an ai sdk that really leans into like the full stackness of laravel i love it i love it uh when you think of um and some people are saying uh your your video quality isn't doing too good i don't know if there's a way for you to bump it up but if that means i don't know you start stuttering i don't know um but for everyone who's saying that uh oh i'm on standard definition so i
can go up to do i go to full high definition is that recommend full high definition uh maybe do i look good now do i look better let's see um i think i think it should look crisper video enhance says someone uh yeah exactly taylor will get on yeah
Yeah. Sweet. But yeah, let's take a turn into, okay, all of this AI stuff is fun to work with, but I'm curious of maybe what you're seeing within current applications, enterprise applications, et cetera, or just why would people start adding AI into their apps? What are the things that people are generally going to be using it for? What are some practical applications that you
can now build with the AISDK. Yeah. I mean, I think some of like the most common things that you see people build with it are sort of like almost text summarization type features. So like on Nightwatch for us, which we've already launched was like, you have an issue in Nightwatch, right? Like an exception has occurred or you have like some slow query. You can actually click a button in Nightwatch to let the AI write like a summary of that. So, and it will tell you like,
okay here's kind of what happened here's some suggested solutions here's where you might look next or whatever i think that sort of like category of ai usage is super common like i have a i have a bunch of text that i need to basically like classify or summarize it's super easy to do that with ai and pretty fast and affordable um you know i think another like chunk of ai is around like audio and
transcription and sort of real-time applications that's another like popular um use case for ai i mean this is kind of i don't know if this is like people consider this like full-on ai in the normal sense of the word phrase but i mean i think it kind of is related is around like embeddings and vector search which is part of the ai sdk where we can generate embeddings from a given like string of text vector embedding store them in a database and then do semantic search querying and
And then AI-powered re-ranking of those results for like the most semantically similar results. So, you know, I think those are like some of the more common use cases. I think that then there's like image generation, which I think is a little bit more like, you know, I don't know if it's a little bit more like the consumer side of like the use cases for AI where you're generating sort of fun images and things like that. But at Laravel, we've been using it mainly, I would say, for like text summarization, issue summarization, things like that.
Yeah, definitely. And the neat part, I think, with the AISDK, kind of like you said, is now you have this one central point. I know in the past within things, there are great packages like Prism that I know you said that the AISDK is built on top of and expands in a lot of ways. but it's great that you can kind of have this one central place to say okay when i'm working with images or when i'm working with audio the infrastructure behind it the the code behind is
exactly the same i'm curious your thoughts and when we dive into building something within the code i i've already used this within things like cloud code and boost and everything like that it's it's crazy how much better it gets because it's just one package for the llms that you're working whip to say, okay, hey, this audio is going to be generated the same way that I generated this chat. Do you think that's intentional that you built? What are your thoughts on that when it
comes to this new world of coding in that sense? In terms of how much effort do I put into the elegance of the API? Yeah, either that or is that elegance of the API matter now? Yeah, I know. It's something I thought about myself. I think it does sort of matter in the sense of like, the LLMs still do well with things that are like, easy to parse and understand and summarize and read about.
I don't know if it's like, you know, obviously the LLM doesn't derive the same joy from it that like the human consumer might. And I used to put like a lot of effort into these sort of like whimsical fun APIs because as humans writing the code, it's kind of fun to like use these tools that are sort of like charming in a way. And maybe it still is, but yeah. I mean, it's still important, I think, to have good API design just for the discoverability of that LLM to be able to figure out what the heck's going on.
And I think like we've tweeted about this a little bit, but like frameworks that sort of lean into conventions and structure, I think do well with LLMs. I think we've seen that with like Laravel and things like Rails, where like the LLMs are doing a pretty good job because there's lots of training data. there's this very conventional structure to the projects where it's like, there's a models directory, there's a controllers directory. So they kind of like, it's very discoverable, you know? Yeah. Yeah. I, I, I completely agree. And it's, it's, it's neat to see the,
you know, I feel like the joy from those clean APIs comes now of, of seeing it when you're, when you're looking at your, maybe your code being generated or you're just looking back and it's very easy to know, okay, this is exactly what's happening rather than having to jump through 50 different files to say, okay, what actually is happening. It feels like you're, even if you're not handwriting all that code, it still feels like you understand what's happening in that sense. And I think the LLMs do a great job at also saying, you know, we're using this
one package, so we're going to be doing it the exact same way, another iteration of the application. Yeah, totally. For those just joining, thank you so much for being here. I am joined, my name is Josh. I'm joined by Taylor Otwell, you probably know Taylor just from everything, the creator of Laravel and now the creator of Laravel AISDK, which is what we're kind of diving into here on the stream.
So if you're just joining us, let us know where you're joining from, what time it is there for you, and then what's your favorite Laravel package. But if you haven't gotten the chance, feel free to like and subscribe this video. If you're on our YouTube platform, there's a whole bunch of awesome videos that we try to put out as consistently as possible, but we're going to continue to take a look at the Laravel AISDK and then hopefully be able to have a chance to build with it as well. Taylor, what is your favorite part before we jump into each aspect of the AISDK?
Just from an overall standpoint, what is your favorite part of the AISDK? One that you're like, when you built it, you're like, yeah, this is really cool. I like that. I like this. Yeah, yeah, yeah. It's a good question. I really like the kind of like agent class concept, which was a big part of like my initial sort of like thinking behind the AISDK. And, you know, for those who haven't seen it, basically when you use the AISDK, you make agent classes using like a make agent artisan command.
And it's basically a class that sort of encapsulates the system instructions, the message context, the tools, maybe the schema of sort of like what you're doing with the AI provider. So you might have, for example, like, I don't know, I think in the docs we use a lot, this sort of like sales coach or like lead extractor agent that's like reading transcripts of sales calls and giving advice and things. But I think it's like this very Laravel-esque way of working with AI where everything feels sort of like nice
and tucked in this little class that I can reuse throughout my application. So maybe I use it in an artisan command in one place and I use it in a HTTP controller in another place and it's just sort of all like self-contained. And also very easy to test where you can fake agents, you can fake other AI interactions. I think the testing story was something I tried to make decent. I think testing with AI is something that's often overlooked. One, because testing AI can be hard.
It's not deterministic. There's all kinds of quirky things that can happen. So I tried to make that pretty streamlined. Yeah. No, I love that. And I think that's an interesting standpoint that I've personally loved as I've worked with it just in like the past couple of weeks before launch. And then also even just after launch, I've built probably a couple, two or three different applications just familiarizing myself. And one of the things that I really love about the agent SDK specifically is that aspect
where it feels like, I don't know, similar to a job or an action I guess would be a better use case. But where now I'm abstracting that from every single job or controller that I'm using from that specific logic it lives in one place i can change the as we all know for if you've built anything within ai you have a prompt and sometimes you might want to change that prompt it sucks to have to change it in 10 different places that you're using that exact text prompt so being able to have in one
place is is really awesome yeah awesome i want to jump into the the landing page real quick and just kind of talk through some of the some of the aspects before getting into the the rest of the actual code i'm going to plop this open right here perfect so oh lost you for a second there we go okay so for those who don't know that the
the Laravel AI SDK is out. It is out. It is Laravel.com slash AI. So Laravel.com slash AI. And it's the AI toolkit with batteries included. It's as simple as running this composer require command, composer require Laravel slash AI. I guess one question for you, Taylor, is what was the, you kind of mentioned it, but what was the thought behind putting this in one single package
versus like, hey, here's a package for image, here's a package for voice. What's your kind of thoughts or idea behind that? You know, I kind of just wanted people to have a complete toolkit for working with AI and not have to pull in a bunch of different stuff and kind of like overthink it. So for me, it's just kind of nice to be like Composer, Require, Laravel, slash AI, and boom, I'd sort of like have everything I need to do AI, SDK-related things, whether that's audio or images or whatever.
it doesn't really like you know significantly increase the size of the package to add these things on the bulk of the work is handled by people like Gemini and you know to actually do this stuff so it's just kind of nice to have this like one self-contained package to have a kind of a complete toolkit I love it so yeah just like Taylor said one SDK for every capability I wanted to walk through some of like the elements that we have here on the bottom of the page
hey that's you that's us today uh but there's these kind of like uh you know there's seven different uh or eight different aspects and this is only again a small part of it but there's prompts context tools provider tools structured output streaming async and attachments i kind of wanted to get your thoughts and walk through of like when you might use each one because i feel like especially in today's age one of my thoughts is that as you are learning how to build with with
Laravel, of course, maybe your LLM as you're building this within Laravel or adding AI SDK so that you can build. And so for those who are installing the AI SDK, if you run and you are using AI agents, which like Taylor said, it's a good thing to be using them. I think now, if you run boost install, PHP Artisan Boost install, after you install the Laravel SDK, it will ask you to install the AI SDK skill, which will help the LLMs learn how to use this better.
But like I think Taylor, it's one of those things where the more you understand what can be possible behind the scenes, the better we can help prompt our LLMs how to do that and so that we know what's actually happening. What do you, just maybe like a couple sentences, maybe we can go through each one of these. And I just want to hear your thoughts on when you would use prompts, what is context and when to use it, tool, et cetera.
Yeah, prompts are sort of like the basic way to ask the LLM to generate some text in response to like text you give it. So, you know, if you've ever used chat GPT and you ask it a question and you get some text back, that is like you're prompting the LLM. Very similarly, like in the AISDK, this is how you do that in code, right? So we're going to send the LLM some sort of like text a question, maybe like a command, like in this case, we're saying analyze
this transcript and we're kind of passing it along this file and it's going to give us back some text so this is like a super common use case for ai right yeah um similar to that summarization aspect that you had said before yeah exactly um and it doesn't have to be like you can see even in this case it's not actually like we don't have to use prompting just for chat so to speak right we can just like give it a task almost as a prompt and we we don't intend to ever revisit like the
conversation, right? It's not an ongoing conversation, but we're just prompting the AI or the LLM with a specific task and we're getting a response and we're storing that or we're sending it to the user or whatever, but it's not really an ongoing chat. And to your question, like the context tab, are you, well, this is actually good. You can go back, you can look at this. Okay. Yeah. This is a good example of like that sales coach agent. This kind of shows you how you can kind of like encapsulate the system instructions within this class. And then we can kind of reuse this
throughout of our application so that we can just new up the sales coast agent and then give it a prompt and we can do that in a variety of places throughout our app without sort of like re specifying those system instructions yeah so that's super convenient one question i had here just i think this is a good place to talk about is so um you kind of mentioned it's one central place to be able to interact with everything so we have all these tools available to us that we
see up here but you're we're not saying uh send a prompt to open ai or even send a prompt to a specific model or even send a prompt to you know gemini how does all that work behind the scenes like do you have different sections providers what happens yeah so a lot of that is driven by your config slash ai file um and that's where you specify i don't even know if that's on this page but we definitely talk about it's kind of like multi-provider and failover and stuff but similar
like in your Laravel app, if you've used Laravel, you probably know you have like a config slash database file or a config slash file systems file. When you install the AISDK, you get a config slash AI file. And that's where you configure, okay, I want my default AI provider to be open AI or I want it to be anthropic. And you can actually customize that based on the types of things you're doing. So you can have a default provider for text, like how we're prompting here, but you can have a different default provider for images. So maybe for images, I want to use
Gemini and Nano Banana, but for text, I want to use Anthropic. And so if you specify that in your config file, you actually don't have to specify it here when you actually prompt, you know, it's just going to use whatever defaults you have. Of course, we can override that in the code, but it's kind of nice, you know, you can just sort of like use it, you don't have to remember, okay, what is the like code name for Claude, Haiku-401, whatever that is. Yeah, 40235, yeah. Yeah, exactly.
You can just use the features. Yeah. And it seems like that's the eloquent way in a lot of ways where you're building out database queries in the same way where I could be building in SQLite in local production or local instance. And then when I put it into production, none of my code changes, just my config. Yeah. It's basically the same concept, almost like a ORM type concept for AI providers. I love it. What about context? What is that? Yeah.
So context is kind of how you actually would build something more like a chat where, you know, what's kind of interesting about like dealing with LLMs is when you ask LLM for some text, it, you know, chat GPT and like Claude give the illusion that there's this ongoing state, you know, with the LLM where it's like aware of all the previous messages. but that's not actually the case by default. You have to feed it the whole string of messages
that came before your prompt so that it knows. And you have to do that every time actually that you call the LLM. It has no concept of like historical interactions with you. So this is where you do that. So this is where like, if you are actually are building more of like a chat like interface where the user is sort of like having an ongoing conversation with an agent, you need to store those messages in a database And then this is where you can pull them back out and give them to the RM.
So we're going to, in this example, we're like pulling all the recent messages for a given user, maybe the most recent 50 in this case, and we're passing them sort of in chronological order to the LLM. So this is an example of how to do that manually. But the tab you're on now kind of shows us this is built actually into the AISD case. So like the previous tab showed, we allow you to do that manually. But if you use this Remembers Conversations trait like you have here, the AISDK will actually just do that for you.
And the AISDK actually is in beta. And I would say this is one of the areas that I'm like most working on between now and stable release is some kind of more features around this. But the kind of like bare bones skeleton of it is here, where if I use this Remembers Conversations trait, it's going to automatically store conversations in a conversations table. it's going to put the messages in like an agent messages table and it's going to automatically pull them back out when you continue the conversation it's just super nice because
it's a lot of kind of like boilerplate code to store those messages get them back out make sure they're sorted in the right order pass them to the llm so to just be able to use this trait in like one line of code it's like oh i just have like conversation state um that's great yeah to be able to not have to do uh any of this and store it yourself and then you're in this aspect of it it just kind of obfuscated for you. Yeah, totally. I guess there was a question that I saw in the chat that was what was the most challenging part of building the variable SDK?
Is this it or is there a different part? No, I mean, a lot of it was kind of like, I wouldn't say there was any one area that was just like, oh, wow, this is just uber hard. I would say it was a lot of just like sitting and thinking about what are the right like APIs or like how do I want to design it? Kind of what we were talking about earlier of like I really like to design things that feel like really thoughtful and really like, really like well-designed and easy to use and intuitive. And the process of
arriving there is usually just like a lot of sitting there and staring at the screen, you know, like being like, or even just like writing pseudocode of like, oh, what would be like, what would feel the best, you know? And sometimes I'll actually go into like an empty file and just start typing code as if I'm using the ASDK, even code that just doesn't even exist to try to discover like oh this feels nice or this doesn't feel nice and um so yeah i mean to get back to the answer i don't think it was any one particular thing it was just figuring out what's the most
like delightful considered apis to give people yeah i love that and to your to your point before where you're like you're kind of uh or the posed question does it matter like i think it that that means it does matter in a lot of sense because it it's becomes this unified platform where you know what's available to you even if you might not be handwriting every single piece of the code you know what's available and it feels unified which i think is the biggest yeah jason you
mentioned uh jason torres okay fine i'll go install it you had your santa app that uh that was hosted on laravel clouds i'm curious of if you swap out the ai sdk it'd be cool to see um all right taylor what is uh tools i know we kind of talked about this a little bit on the streams before when it comes to like mcp and what's the difference between tools and stuff like that what is tools in the context of the ai sdk yeah tools are one of the coolest parts i think
of building agents and they kind of give you the most uh interesting possibilities for the kinds of things you can build because um it lets you like basically supercharge llms with things that they couldn't do otherwise so and this example is a very basic example but i'll share some other cool examples in a second where maybe you want the LLM to be able to generate like a cryptographically secure random number. I don't think that's actually built into LLM. So like if I asked
ChatGPT, hey, give me a number between one and a hundred. Yeah. That's probably not actually a random number in the true like mathematical sense of the word, but I can actually give, using the AISDK, I can define a tool that when I prompt the LLM, I give it a list of tools that has available to it. So it's going to see, hey, I have this tool that can be used to generate cryptographically secure random numbers, and it can invoke that tool, which will then invoke this
code on your end, this handle method that's like right in front of us will actually be called. But the LLM will actually decide to call it. I mean, it's pretty wild, actually. And so a lot of times if you look at like model evals, when OpenAI or Anthropic comes out with new models, it will actually have like an eval for tool use of how good it was at using tools you know and the
lms these days are are pretty good at this so this lets us actually augment the llm with cool stuff so i mean a real world use case for tools that probably a lot of us are familiar with is if you've ever used clod code or open code or cursor you'll see that it like um it inspects files like Like it reads files, it writes files, it runs bash commands.
Those are actually tools that the builders of CloudCode and OpenCode have built, right? So they have like a run bash command tool that they have given to the LLM to run bash commands. And so actually the first time when I demonstrated the AISDK out in San Francisco a few weeks ago, I actually wrote like a little tiny nano version of CloudCode. I think I actually called it nano code, where I gave it like seven tools. I gave it like a read file tool, a write file tool, a bash tool.
And it actually worked. Like you could chat with it. It would update files. You could say, hey, make a new Eloquent model and update the routes to like return all the data using the model. And it like actually works. So tools let you do all sorts of random stuff. And I think we'll get into it in a second. We actually give you some tools built in. But this is how you can like start to integrate the LLM with your system. Yeah. No, I love that. And that's essentially what Boost is doing in a lot of ways too.
You mentioned like Cloud Code, but Boost has a specific number of tools. Would you say then, Taylor, tools are a great place to keep the things that your app likely does over and over or that your LLMs through your app are doing over and over again? Yeah, yeah, I think so. And some of the tools we give you are some common tools that people like those are like search. So go to provider tools. What do we have here?
I think this is, yeah, this is web search, web fetch, and then file search. So like people use tools a lot for this kind of thing. So if I throw like the web search tool or the web fetch tool onto this agent, and these are two tools that are just built into the AISDK, you don't need to write them yourself. It will allow the LLM to actually search the web for the latest data or fetch a web page from a given URL.
And then with file search, it will allow to search like vectorized PDFs or other data to find things that otherwise didn't have access to. So if we have maybe uploaded, I don't know, all of our company policy PDFs to a file store, we can now search this and have like a chat agent that can search over this data. And that's data that the LLM otherwise wouldn't have access to. I love it.
A question around these lines, how should we organize our tools? I guess when you're building out an application with this, what do you think are the thoughts of, one, how many tools MPC can or should we use? And then how should we organize our tools? I guess the SDK gives you a way to organize them within this tools namespace. But what are your thoughts on this? Yeah, I know it's been kind of a pretty hot topic of discussion
around like the amount of tools that you should expose to an LLM. I would say like, you know, you shouldn't have like 50, 60, 70 tools probably exposed to the LLM because you get what's called context bloat where, kind of what I was saying where you have to send all of the messages to the LLM to provide historical context. You also have to send all of the tool definitions, what they do, and you have to send that on every message as well. So if you have too many tools, you can sort of consume a lot of tokens
in a lot of context. I think that really comes into play on some of these local coding agents where you start to plug in like different MCP providers and they have maybe a dozen tools and you've got like maybe five of those and now you've got like a hundred tools and it can kind of get pretty out of control pretty fast. I think if you're using the AISDK to build something in your own application, you probably aren't running into that quite as much where you have like a hundred tools. I think that's probably pretty rare.
So, yeah, I mean, I don't know what the exact number is, but it is a thing you have to watch out for. Let's put it that way. Yeah. I am curious. I actually don't know the answer to this, but I am curious if there's going to be a way or if there's already one way to be able to say to conditionally load up tools would be very interesting. I know there's probably people. And what's cool with the AISD case, you can do that a little bit in the sense of like,
you have the agent class. And so whatever you return from that tools method can be sort of like determined at runtime. So maybe one user, maybe you pass a user into the constructor of the agent and they're using that user to say, okay, well, this user has access to this list of tools and maybe this other user doesn't. So you can do a little bit of like dynamic tool registration here. I know people are starting working on sort of like other things around tool
discovery um so yeah it's pretty ongoing i think evolving topic in the ai world yeah so that does make sense that that uh a great use case for like a tools array on a particular user would be maybe they're a paid user and would have access to specific tools that you might not have for free users for example exactly yeah awesome for those just joining again thanks so much for being here we have taylor outload talking through the level aistk we'll get to actually building things like
what that actually looks like practically here in a little bit but i want to give a good overview bare bones for those watching in on demand of what it is what do you how we think through different pieces of this because there's so many cool options that you can build with this even one app probably would only touch two or three of these it's really hard to find a singular app that could have all of these things provided if you do have questions feel free to drop them in the comments i am checking it as much as possible i can't promise we'll get
to all those questions but we're glad to have all of you watching here feel free to like and subscribe to help us show more content to you in the future as well uh so taylor what is structured output so i've heard of you know we've kind of talked about in prompts that you get a text back when you're saying hey give me this what is the difference between that and structured output yeah so when you prompt an agent sort of by default um you just get sort of free form text
back in the response. So very much like you would get from like chat GPT, you know, it doesn't really have like a defined structure or schema to it. You're just getting back a paragraph or two of text. What structured output lets you do is actually say, okay, when you respond to me, I want you to respond in this structure. And I think if you scroll down a little bit, you can see like in this case, we're saying, give me back a score and that needs to be an integer and it's like a required field. So when the LLM response, it's going to give you JSON that matches that
schema, which is super convenient because then you can parse that JSON, you like know what to expect in terms of what data is on it, and then you can reliably store it or do whatever you want. If you're just getting back freeform text from LLM, like, you know, how do you parse that? I don't know. It's just arbitrary text, you know, but if you're getting back JSON, you know what to expect. And this is actually powered by a new Laravel component, the JSON schema component, which you can see there in like the type signature.
So we actually used this on the MCP package to define JSON schemas for your MCP tools. And it's used here. So we actually wrote this component because we needed it, you know, in the AISDK, in the MCP package. But it's a really slick little component for defining JSON schemas. Yeah. I remember the first application, actually the first Laravel application I ever made was an AI application where I was, we didn't have structured output at the time.
This was about like three years ago. I think it was GPT-2 or something like that. But I had to hope and pray that the agent responded in the way where I said, okay, here's, use the response, put equals, equals, equals, and then separate it. And then I had to parse it out from that. Structured output makes that so much easier. Yeah, it's like, yeah. I mean, even on Anthropics models up until recently, like to get it to return structured output, you were literally telling it in the prompt, please respond with this JSON structure.
It's pretty wild. Yeah, it's crazy times that we live in now where we could have it be exactly the way we want it. And so the way the AI SDK does that makes it extremely, extremely easy. A couple of questions that I want to do. Someone said for using SDK, we need to purchase multiple models like Gemini Cloud Code. So Cloud Code would probably be like your local one. And then Gemini, if you wanted to use that within the AI SDK, whether that's returning text responses or even image generation,
multiple models would have to be added as API keys to the config locally and in production. But I'm correct, Taylor, where you can use, like let's say you're building something locally and just want to test it. You can use local models through O-Long. Is that correct? Yeah, that's correct. Yeah, we released that pretty quickly after launch. Another thing you can do if you don't want to sign up for multiple model subscriptions is use something like Open Router where you sign up for Open Router
and you have one key and then you can actually access anthropic models uh open ai models all all the models through one apis or through one sort of like paid service uh but yeah you can also just use local models i actually did that myself the other day just testing stuff you can download olama and then pull in some kind of local model whichever one you want and you can um
just run ai stuff locally yep so that's olama o l l a m a um and i think actually open router now that you mentioned it i think they also have like a uh of course they have like a paid one where you can pay them and they'll route it to different things but i think they also have a a free where they'll route it to like free providers as well which is really really interesting um uh I saw another one.
Okay, you mentioned embeddings and vector search. Can it replace LangeChain as an example? And can the tools be a RAG replacement? Yeah, a lot of the tools kind of can be a RAG replacement. As far as it can replace LangeChain, it probably depends on kind of what you're doing with LangeChain. But a lot of the ideas behind some of the built-in tools are around sort of like RAG and similar concepts in the sense of like vectorizing files,
searching them, doing similarity search across data, using tools, things like that. I think that's like a super common use case for tools in general. So yeah, there's opinions on that kind of built into the AISDK because it is so common. Yeah. And then there is, we'll get to that question in a little bit. I will jump back in. What is streaming? So yeah, so streaming,
is just a really easy way. So instead of calling like the prompt method on the agent, if I call stream, super easy way to send back a stream or a stream of text to the front end so that, you know, like in the same way as when you interact with chats online, how the text sort of like streams in line by line as it's available. The stream method in the AISDK makes that super easy. So So this uses a HTTP server set events called SSE for streaming text back as it's available.
And then in this example, you can see we're using this kind of then method. We can actually do something once it's all been streamed. If there's some sort of like either follow up action we want to do or something, I don't know, some arbitrary code we want to run after the stream is complete, we can do that here. but then on the front end in our javascript or using livewire or something we can actually consume that stream to like show text as it as it is available so that you don't have to wait for
the entire response to be generated before you see anything yeah that is a really nice part of it being so succinctly tied in with the front end i like that for example within view and react we have the use stream hook uh livewire has the the wire stream field to take all this and make it look like you would expect within chat gpt where it's kind of streaming line by line yeah um what about async this is this is interesting to me because i've i've i've heard a lot of cool things
about it but i'm i'm not quite sure how it how it actually works behind the scenes yeah so this is another example of how the s a istk is sort of like uh leaning into a lot of laravel's full stack you know batteries included opinions where um instead of calling prompt or stream in this case we're calling queue where we're actually basically queuing a prompt. So we're saying, hey, we want to call the LLM with this prompt, but we want to do that in a queue job in the background because we don't necessarily need or want to wait for the response right now.
We just need to queue this to happen in the background and then we'll do something with the response later. So when you call this queue method, it's actually going to create a background job on your Laravel queue to respond to this prompt. And then the then and the catch callbacks will be invoked when the response is ready or if something goes wrong, respectively. So once we get the response, we can store it in a database or send an email or whatever we want to do with that response. Or if something goes wrong, we can handle that as well in the catch callback.
But basically, you know, this would be used where the user submits something that we want to analyze with AI, but we don't really want the user to have to sit and wait for it to be done right then. So we want to return a response to the user like, hey, we're processing this. We'll let you know when it's ready or whatever. And then that happens really quickly, right? Basically instantaneously. And in the background, this job is running. And then we'll do something. We'll notify the user maybe when it's ready or when it's done or whatever.
This makes it super simple to do that. Yeah. So I would say like off the top of my head, it seems like a good use case for this would be maybe transcribing a 100 megabyte 200 megabyte audio upload where you don't want them to wait for a full request until they get the response for that that's awesome i love that a question on the async stuff uh from len is the async stuff non-blocking does it use the react php psr18
browser yeah this async stuff is more like queue related um so it doesn't really it doesn't really have anything to do with like async in the sense of like concurrency or like you know uh go co-routines or anything like that um it's more about just like putting something on your background queue and then doing something with it later yeah um i think i saw another uh question uh yes the sdk is compatible
with the olama api i would assume yes as well correct yes i think so yeah yeah and you can even And there's a new, I think we just documented this the other day, maybe two days ago. There's a, in your config file, you can actually override the base URL for any provider. So you can actually use any AI provider that is like OpenAI compatible or OLAMA compatible just by overriding that base URL. Yeah.
Question here that we kind of glossed over here at the top. I'm curious to hear how this was kind of built, Taylor. and then also what your thoughts are in terms of, I know that there's also a use cheapest model trace and stuff like that. So in terms of automatic failover, and then how does all that work behind the scenes? Yeah, so yes, you can do this. And it pretty much works how this person is asking, where you pass multiple providers and models
to the prompt method or either, or specify them in the provider attribute on the agent itself, where if one provider is either overloaded or you are rate limited on that provider, it will actually just fall back to the next provider in the list that you give it. So maybe you try Anthropic first. If Anthropic is overloaded or you're just rate limited on Anthropic, it will fall back to OpenAI, for example.
We do that by checking the response codes from the AI providers that we get back so we can see, oh, they're overloaded. we get like a I think it's like a 429 http code if you're rate limited or something like that and then we can fall back to the next provider and we actually raise an event that you can listen forward to know that you got you had a failover and we're working on bringing a lot of this event visibility into nightwatch so that you're going to be able to see you know like how much tokens am I using on which providers and how long are my tool calls taking and things like that
um anyway so that that's kind of like model failover and then uh you mentioned kind of like some of the attributes you can put on agents like use cheapest model, use smartest model. I kind of wanted to have this nice way to just like annotate an agent with use cheapest model, for example. And sometimes you have tasks like it's basic text summarization or something like that where you don't need like Anthropic Opus 4.6 for that, right? It's like too expensive.
It's slower. Yeah, exactly. So if you're just trying to summarize like a paragraph of text into one sentence, for example, you can just use like haiku. So the benefit of putting use cheapest model on the agent is like, let's say tomorrow a new cheapest model comes out. You don't really have to go look, okay, like what is that model? What is, let me copy the ID for it, like paste it into my code. If you're just like use cheapest model and you just like compose or update to get
the latest AISDK, you're just like always on the latest cheapest or smartest model. So this is kind of nice you don't really have to update your code if you know that this agent is doing something that's not very like doesn't require a lot of intelligence yeah no i love that uh because it's one of those things similar to what you had mentioned at the beginning where you having the one package then makes it easier and more eloquent in the sense of you're not having to you have those opinions already formed for you when it comes to cheapest when it comes to smartest
even when it comes to automatic failover for uh those are things that you probably mostly want when you're building a full stack application. You just don't want to do it yourself in a lot of ways. Yeah, totally. Lastly, what about attachments? This is interesting. Yes. Yeah. So attachments kind of come up in a few places throughout the AISDK. So in this example, we're using it when prompting and during text generation. So, you know, maybe we're giving it, I think in some of my demos, I've given it like a CSV of sales leads, or maybe you're giving it a
PDF of a transcript and you're saying, analyze this, this document or parse it or do something with it. So we just make it super easy to give attachments in various places. So you can do it here with text. We also actually let you do it when you're generating images. So you could give it, you could prompt the model, hey, here's an image and I want to make it like cartoon style or like a painting, or I want to change something about it, like basically remix an existing image.
You can also use attachments for that as well. So yeah, just super easy to attach and upload files and kind of interact with them. Yeah, here's this image example. Yeah, or maybe you're asking what's in the image. So I can give it an image and I can combine that even with like structured output to like analyze images and generate structured output that I can do something with. I love that. Quick question.
I'm going to close out this screen or stop sharing my screen real quick just so we can answer this question. I'm going to pull up a demo that I built so we can walk through it in a practical sense before we maybe we still have some time we can build something from scratch because i'm curious to see uh claude code also works with the aistk and to get getting to show everyone there but question says now that we have a level sdk what's next level is focused on asprey is exciting i think it's the right step forward are there any
future plans so i guess what you kind of mentioned the the the whole um uh remembering agent being one of your things that you're focusing on. What do you think is happening? I've actually got a list of things that I'm working on sort of like post-beta and even after the stable release. So yeah, I've got a list of features I want to keep working on for sort of the conversation, storage, context, retrieval, all of that stuff. I mean, it's stuff like some basic stuff
like pruning of the historical conversations or compaction of the history and sort of like summaries and snapshots and things like that. There's some stuff around tools and sort of agent loops that I want to look at. So like human tool approval is a good one. So like say you want the LLM to be able to invoke like a refund customer tool, but it needs human approval if the refund amount is greater than $200.
So like stuff like that, it's kind of these more advanced, complicated tool use cases. And then there's other agent stuff like agent loops, um you know more customization of when the agent actually stops doing things this is sort of gets into like some of the uh you know you've seen people have these like so-called ralph wiggum loops of where you can can you have like infinite loops of agents doing things so a lot of like
agent loop uh configuration and stuff like that i also want to build like a cool artisan command like um artisan agent chat so where like if you have an agent and you just want to like chat with maybe to see how it's behaving or what it's doing i can just come into the command line and do agent chat and then i can just like pick an agent from a list using laravel prompts and then just chat with it and see like okay is it behaving like how i would expect you know uh yeah almost like the uh
the dd of you know like agent debugging in a way the a i dd in a lot of ways and that'd be that'd be really interesting i almost imagine then you could have its own agent mcp or your clod code or LLM whatever is kind of can interact with the agent, talk to each other. Yeah. And then there's a, there's a, you know, there's already a bunch of PRs open from the community. And one of the ones I think that is most requested or most on everyone's minds is a
so-called like sub agents. And one easy way to think about this is almost like the ability to expose another agent as a tool from another agent. So like, imagine I have, you know, one primary agent and in its tools method maybe i don't only return tools i can also return other agents so it can actually call on okay you are sort of like an orchestrator agent and you can call on maybe this
planning agent or this research agent or this other type of agent that is more specialized to do things there's actually a pr open for that right now um that i need to uh review hopefully i get it reviewed today and um but at least it can kind of uh get out that sub-agent behavior this week but a lot of it will be driven by the community you know i think there's like dozens of pull requests already out there and um that's kind of how it always goes in the open source world you know like i i'm driving i have one hand on the wheel but the community also has a hand on the
wheel and you know we're hopefully getting to a good destination yeah co-piloting together yeah exactly it's a great place uh that they're kind of similar you kind of answered a couple questions in the chat of a sense of uh can you call an agent from another agent doesn't sound like it's possible right now that is something that's coming in terms of agent orchestra orchestration and everything like that again thanks so much for everyone being in the chat i want to talk i want to walk through
a demo that i actually built and i'm curious to get your uh thoughts taylor on what could be what could be added to this but then we can jump in and maybe build something from scratch as well uh but thanks so much everyone for for joining if you're just joining or maybe you've been here the last 10, 15 minutes, haven't heard me do this spiel yet. We are with Taylor talking about the
AI SDK that was just released last Thursday, Friday, Thursday. And so it's only been out for four days. And so it's been crazy to be able to see how many people are already building with it, how many, like Taylor said, how many new PRs have already been added. But just walking through the possibilities of it as well as just talking through why it was built in the first place. If you're here, let us know you're here. If you have any questions, we'll try to get to them as
best as possible. I wanted to show this little demo that I built. It's actually live right now. I'm not going to tell everyone the URL just because I don't want to crash while we're on stream, but I'll share it at the end so that you can have it as well as a GitHub repo. I'll put it the description if you're watching this in um in review but this is a little i wanted to try to
find a way to build using almost everything or almost as much of the ai sdk as possible and the premise for this was i always save a lot of links that i always forget what those links are bookmarks have never worked for me um even most ai tools have never worked for me because it only saves like the link and maybe meta description doesn't necessarily save any of
my thoughts on it or anything like that and so i wanted to build a thing using the ai sdk that either takes a file that i upload maybe a screenshot a document or a url and then have it upload to this vector store so we're actually using the vector storage uh part of the ai sdk to auto chunk that embed and this is one cool thing that i actually didn't know i'm curious to get your
thoughts on like what's the difference between storing something in vector using open ai's vector storage versus putting this in postgres pg yeah yeah this kind of came up at a lyric on india i mean they are the end goal is really similar i would say in the sense of like we want to store embeddings about things and then search them or query them what is cool or i mean i guess
let's start with like um the pg vector stuff so like in the aisk docs we show you how to take a string of text and generate embeddings for it and then you can put that in a vector column in a postgres database now as long as it has the pg vector extension which um most local uh postgres things do like the herd version and then laravel clouds postgres has it um and then you can run queries on that to find um things that are similar to your query so like if i to go back to our
Mexican food example, which we both like, like if I stored like, you know, restaurants that have great cheese dip, and then I search for good appetizers, those things are semantically similar, even though they don't actually have the same words contained within them, there are similar ideas. And so that's the purpose of semantic search is to be able to pull back things that are related. So you can actually store those embeddings in your own Postgres database,
or you can actually upload files or data to OpenAI or Gemini and they will vectorize and store them for you. So it's just sort of like one of the convenient things about storing them on OpenAI or Gemini is you can just hand them a PDF. They will extract all of the text and vectorize it for you out of the PDF and all of that. You know, like doing that all locally, you're going to have to pull the text out of the PDF. You're going to have to vectorize it.
you're going to have to store it. So it is kind of convenient to just be able to like throw files and open AI and say, hey, like vectorize these for me. I don't want to even have to think about it. Yeah. It's just, you know, it's two different ways of doing similar things. Yeah. No, I love that. And so, yeah, this works in the sense of there's a couple of cool things I really love is how easy it is to take an attachment, let's say an image, and grab specific things out of this using an AI agent to say,
okay, I have this image. Now I just want, like, I save a lot of screenshots either on my phone or just like I'm grabbing things. And usually I have like a directory on my device. I wanted a place to be able to save all of those, but then also be able to query them in later things. So again, the goal of this is one, to kind of scratch my own itch and build with the AISDK, but then two, be able to show as much as possible off of the AISDK. So I wanted to grab, we'll go to, we'll go of Laravel News, I want to just find like a quick little link that I might be able to save.
So let's go ahead and maybe we'll see here like OpenAI releases GPT 5.3 codecs. I'm going to grab this link and go back to my URL here. And if I just paste this in, I can add a specific comment about this URL or I can just capture this. And this is one of those async things that's happening
then on in the background where I can still go to different links, but it's still being stored and retrieved in the background. And it looks like because it's JavaScript front end, this failed. So here, we're going to upload a screenshot instead. I'm going to go back to that link. I'm just going to upload. We'll zoom out here. And I'm just going to paste a quick screenshot
just of this. There we go. We'll go back to here, go paste this in and upload and analyze. So what should be doing within the AI SDK is it's going to grab the process using the vision to say, hey, let's describe what is actually happening in this image and not even just transcribing it. But the cool thing about that vision SDK is like you get additional aspects. You can send a specific
prompt in with vision to say okay I actually want these particular things if we're building a research library I want to know what's pertinent to this you can see here it says it's a detailed description of the image screenshots a top header a large rectangular card with rounded corners and a soft drop shadow all all the neat things that you might want from image it's a lot more than I actually thought it would be from just one one simple image but the neat part with this is kind of everything
that's happening in the background is a couple people mentioned uh what would you recommend for front end things some people said polling versus broadcasting what are your thoughts taylor and i'll say say what i did in this particular demo oh man um i like there is something is which would be a good answer a question i guess there is something just like really nice about for simple stuff is
throwing like a wire pole on a div and it just like works so if you don't have anything else yeah if you don't have tons of users like um or maybe it's just a tool for yourself even you know like you're the only user um which i think in the age of ai we're seeing more sort of just like personal software right of just like tools people are creating for themselves that are really intended just for them i think throwing like some polling or especially with live wire makes it so
easy with wire polling. I guess Inertia has polling as well now since Inertia 2. I think that's nice. But if you're in like more of a production use case, like let's say like Laravel Forge or Laravel Clouds dashboard where there's hundreds of users in there at a time, wire polling can be a little bit more inefficient since you're kind of like continually hitting that back end whether there's data ready or not. Broadcasting kind of gives you more of like a push mechanism to where you're just pushing data as needed. So it's a lot more efficient.
yeah yeah in this particular demo i did use broadcasting with uh with the use like with reverb and then like to use echo uh hooks to watch for that so that way um when we're uh you know when we're grabbing something from the web or we're up uploading a screenshot for example if i go into here and i just say something like uh i don't know we'll just grab this from the from the
aistk and if i go into and actually paste it it's happening behind the scenes yes but once it finishes you'll see that happen live so this is one of the things that of course like taylor said you could use this with wire pull where it's just constantly pinging the server every five seconds or whatever and it will update automatically so this is using specifically for this demo it's using the vector storage to store all this once it does read it from the vision and then we're
getting a structured output so that when we chat with it and you can see that kind of popped up right there now we can chat and have all of those things and if i pop over to this chat this is where we have a couple additional features that we kind of already walked through with the ai sdk we have conversational to say hey here's like remembering those particular agents but then we also have streaming set up as well as file search and web search these are the two
tools that me personally tell i those were like incredibly easy and i loved having them to not have to uh i i've built a couple ai tools where i'm relying on uh maybe my maybe you know web search within php for example instead of giving ais the tools to be able to use it themselves yeah uh i'm curious of like what were your we kind of talked about the tools but what was your
thoughts on those three tools, the file search, web search, and image search? File search, web search, and web fetch. Web fetch. Are the three built-in, well, I guess there's also a similarity search, which we haven't really gotten into. But yeah, I mean, I wanted to give people, you know, I think these are just like incredibly common use cases. Web search and web fetch, of course, used to sort of overcome the
training knowledge cut off for the LLMs where we can actually go out and fetch relevant data. I actually use this type of functionality in LLMs a lot when I'm maintaining the Laravel docs and um or when I'm writing the docs for a new framework feature. So one thing I will do is go into the docs, fire up cloud code and say hey can you write docs for this PR and I will like paste in
the PR URL on GitHub. And it works like incredibly well, actually. So it's super convenient to be able to give the AI the ability to fetch web pages in a variety of scenarios. Yeah. No, I love that. I love that. I'm just going to ask you a question about, let's see, maybe we'll say, what was that latest model from OpenAI? We should see it search the
specific things that it already has pertain to my local user and we should see those tool callings that should be made here so it's searching the knowledge base and then it found you know the open am model mentioned is gbt 5.3 codex in our save notes so this is a use case of particular conversational api that we kind of talked about in the sense of it's remembering the things if i
was to ask um without having that context of something like uh what uh and you even have like what was that you you even had the tool call thing like show up too that's that's pretty fancy that was that was a fun uh i i didn't know that that was possible um because i've only ever worked with chat where it was just returning text so returning me when it returns and i could be wrong uh or
or misremembering, but I would, I think when you return the structured output, open AI specifically, which is what the provider I'm using with gives, says when it's calling particular tools as a JSON. So it's really easy to parse that with a new stream. Is that correct? Yeah. Yeah. Yeah. When you stream stuff, you get sort of like tool call start, tool call end, you get like, you know, these various events for when tools are being used.
yeah i'm curious uh i actually haven't tested if i can search on the web then uh of like what what link is that associated to on the web i i think i marked this down so it doesn't actually go on call but i'm just curious now if that um if that does it a couple of questions um some people said
I didn't uh there it is using a web search tool. Okay a blog post. We'll call that. Found something yeah. Yeah we'll we'll call that good openai openai blog post which is probably what Laravel News is referencing so we're good there. Some people said I made it easy to guess the url. Yeah I'm sorry I mostly uh I did not scale I think I'm using a very small Laravel cloud server for this uh so if it if it crashes that's not Laravel cloud's fault that's my fault
for not scaling it up um what did you used to build this josh is this uh is this a cloud code special or is this cursor what is this this is all handwritten this is mostly clod code uh with some handwritten stuff for the for the chat so i i did figure out quickly uh what stuff uh clonco doesn't seem to do a great job um with and the use stream stuff of uh it took me it took me
a while to figure out that it returns the json for structure for for streaming um and being able to kind of push that back and forth it was trying to do some uh i whenever claude codes goes out and tries to build like five different files and i'm like no this should probably just be like one option in the laravel ai because i know it's a lot cleaner than that that's when i start having some second guesses so most of this was built within claude co with with me referencing by hand
each particular AI capability and being able to prompt to saying, hey, I know that the AI SDK can do this. Let's make it do that. Right. Someone has said, in an AI first future, do you see Laravel becoming an orchestrator of AI agents rather than just an HTTP framework? I'm curious your thoughts on that. Yeah. I mean, I could definitely see that. If there's one thing I've learned in like the 15 years of maintaining Laravel is that people will use it for all kinds of things I didn't expect.
So yeah, you know, I mean, like I think people building AI agents and like AI features is going to be the thing for a long time for the foreseeable future. So I think it's, you know, it's good for Laravel to sort of have this good first party option there. I love it. why don't I fire up maybe a Claude code instance
and we can create a Laravel application from scratch and maybe Taylor, I'll have you talk through with me of how you might maybe help start from scratch and I'd be curious to see your thoughts on what are the things you're kind of looking for to make sure everything is working the way, what kind of revisions you look at. The idea that I have, and we can maybe kickstart this a little bit more.
The idea that I have, mostly because I have a fallback to show what I built right before this, just in case things don't work out. But the idea that I have is we maybe upload some markdown files about us or about the user as an individual. and then we can use 11labs API as a voice to be able to talk to it, transcribe our voice, get an answer, and then have it talk back to us. Okay. Yeah, that sounds good.
So let me go ahead and share my screen again real quick. So for those still in the chat with us, what's your favorite drink of choice maybe while you're coding I know Taylor just took a swig of a Coke Zero so who else is Coke Zero fans or what else is your particular drink of choice
how many Coke Zeros have you consumed so far today Taylor I think like three I drink a lot of Coke Zero i i saw some research on it that like everyone talks about like oh you know you know diet cokes are still bad for you and coke zeros are still bad for you and all this um but then uh uh some research said you had to you had to have i think somewhere around 40 yeah 40 or something coke zeros
before it even before you even get to the required limit which is like a thousand percent lower than what the actual limit is or something like that yeah yeah it's pretty wild um uh taylor what ide do you use i'll say that before we oh i'm still using a lot of sublime text you know i'm kind of interested to see where like the ide space goes like as a concept you know i think you even see
this with kersher right with them like kind of leaning more into their agent mode it's like the default view even for booting up the IDE. And it's like, you know, previously when we were like handwriting so much code, I remember when I was first starting in my career using Visual Studio to write .NET and the IDE was just so incredibly important in terms of like the intelligence it gave you and the shortcuts. It was kind of built for like handwriting code productively, right?
Yeah. And now as we move into a future where like handwriting code to some extent starts to feel painful just as a concept of like why would you hand write all of the code i'm curious to see like how the ide arena sort of like evolves with like you know vs code and php storm and you know sublime text is more of almost more of an editor than an ide but i'm still using sublime
text paired with a cloud code and open code i love it i'm similar not not with sublime but i'm using zed editor with paired paired with claude code um and open code mostly because i i kind of like the when i'm writing handwritten stuff i don't want like even autocomplete maybe a little bit of autocomplete i'm okay with yeah uh most kind of the same way yeah i find that in sublime like
zed is the closest thing to sublime that like i've ever really used that's not sublime you know i find them so similar i've not i never used sublime i think i did when i was first writing html files but i didn't learn it enough to when it stuck so i was using vs code for the longest time um people in the chat want water we got coke zero a lot of water boring water for code pepsi zero i'm a villain yeah that's not bad
uh i i don't know if i even had diet pepsi i've only i think i've only had pepsi zero but sometimes here it is in a pepsi establishment right and you just like don't have a choice because it's like a pepsi household um so i've definitely had it that's true i do like dr pepper zero that is like yeah that is good i agree with that that's good that is one of my specialties um we got tim horton's steep tea some lemon iced tea i'm i'm i'm thrilled at how many coke zeros
there are in the chat i love that yeah and i i actually went to the store this morning after the kids went to school because i was out of coke zero and so i pull into the parking spot and like as i'm getting out there's this lady loading her car next to me and she is loading that car with coke zero and i'm like oh man this this is one of my people ready full-size hands too uh yeah they were actually bottles they were like big plastic bottles of coke zero i almost like said
something but i figured she'd just be weirded out why do you care about my coke zero i'm curious if if you've ever had the thought of putting Coke Zero, maybe like getting a whole bunch of two liters, putting it on tap and doing that? Or just like can all the way? I mean, I like the can, but I mean, some places have like a really good tap. You know, like to me, McDonald's, they have like some kind of magic tap where it's just like the soda comes out so much better than it does other places.
But to me, actually, the peak is like glass bottle Coke Zero, which is not easy to find, to be honest. But they do have it, and I've found it occasionally. More in Europe, actually, than in the United States. But a glass bottle Coke Zero, that really hits different. Maybe we'll get it, have this happen at this year's Laracon. By the way, Laracon US tickets are out live right now. We're going to Boston this year, Laracon.us.
But I pitched this, that last Laracon. maybe we'll get it have it happen this one I want to do have you ever done like those blind tasting things but we'll do Taylor good blind tasting Coke Zero behind like glass can McDonald's Coke Zero or McDonald's Diet Coke and have you figure it out yeah that'd be fun actually so we'll we'll we'll put it now that it's in the atmosphere we'll put it out there um let's let's do a new let's do
Laravel new. Okay. Um, I'm going to call this, uh, the Larvis agent, like Laravel Jarvis. Um, and, uh, we'll, we'll go ahead and we'll make this, uh, react just for simplicity. We'll go no authentication scaffolding, uh, past. How do you like to do Laravel new Taylor? Like what's, what's your dash dash everything? Or I was just thinking we need a Laravel new dash dash Taylor
that just like it's all my own opinions oh um so usually oh man this is a good one i mean it kind of depends on what i'm doing i do like the blank starter kits like you picked here with like just no authentication scaffolding for stuff like this um and then uh you know i usually just use the defaults like pests or whatever yeah yeah i didn't know if you were a dash dash react and then dash dash because you can put all that into yeah i don't really do that yeah i don't i never do that
Yeah. Do you do the empty prompt then in terms of like the Laravel new and not even any name after? I usually do specify a name. So I'll do like Laravel space new space something. It's like I actually forgot that you can actually leave off the app name, I guess, and it will just ask you. Okay. I kind of forgot about that. I usually provide the app name. Yeah. I provide the app name as well.
but yeah one of the things i've learned with when i'm scaffolding something out with uh with llms like cloud code for example is uh the blank no dashboard and no authentication almost is easier because otherwise it tries to confine it into the dashboard sometimes and from a ui standpoint and it looks a little then i just have it you know i i usually do manually like cutting that
out and clearing it up so i like that i like the blank side um we will i'm not going to use the herd mcp i'm going to use claude code um now i'm curious taylor what are your the ways if you like let's say you're scaffolding something out with with llm you're not jumping too much into the code to start until you get to a certain point whatever that might look like um do you
install packages first? Do you do any kind of like PHP artisan model creates or how do you, what's your way of going about this? Yeah, that's a good question. Sometimes I will put a little bit of light scaffolding in place first. And I did this as well as I was even just building the AISDK where I would actually just scaffold out a few like sometimes even empty classes of like, hey, here's kind of like the structure of how I want things to look. So maybe I had to find like an
interface or a few classes just to kind of like put some kind of like rails in place you know as far as okay here's kind of the shape of what we want this app to look like and then let the model kind of like you know paint between the lines from there yeah yeah i kind of go i couldn't go back and forth myself most of the time i i install all the packages that i want and set all the packages up first and then i get and usually then like any kind of like maybe tables migrations that i know
i specifically want and then i jump in uh but yeah i found that it feels like i'm i am setting the the course for example right yeah let's go ahead and install the laravel ai sdk and then we uh we i believe we publish uh yeah um i always forget the under publish and then we can search for it
yep tags yeah yeah service provider oh okay that works yeah there you go that's just the guy yeah so that should be all we oh we actually need to publish the uh uh the let's go into the docs we actually need to publish the you need the migrations yeah yeah so we'll go ahead and do that as well
Perfect. I'm going to hide my screen and input some environment variables because that's usually what I would do next. So I'm going to do this mostly just I'm going to delete them anyways right after this. But just in case I don't I don't don't pull those up anywhere. So we're going to use 11 labs.
and we're going to use probably openai.sdk because it makes it a little bit simpler. I'm going to copy this. Perfect. All right.
and so taylor you said that you had used uh claude code mostly and like open code do you do you do uh like the dangerously pretty much yeah get permissions all the time or do you do yeah pretty much um no i pretty much do this to be honest yeah uh here's a here's a quick tip that
I actually didn't know until like the last couple of weeks for those, for those who do use Claude code. If you go to and bypass or dangerously skip permissions, you can still do the shift tab to go into plan mode, for example, without going back and you can go back into bypass permissions on. I do that mostly because I always, I always like to do plan mode just to get things up and running. Yeah, I do too, especially for bigger features.
So I'm going to do a PHP artisan migrate and we'll make sure I'm on the right one. Perfect. And so we're going to, in Cloud Code, we are going to build an application where we can upload or have some local markdown files.
and using the Laravel AI SDK, we are going to take those markdown files and generate or and have an assistant be able to answer questions using the voice mode. So when we talk to the assistant
And then in an extremely simple UI, they can transcribe our voice with voice to text from AISDK, pass that to an agent to be able to generate an answer based on our markdown files.
and then generates a response using the voice from AISDK. So I'm curious. What was the difference between the Larvis directory and the Larvis agent directory? Oh, are we in Larvis? Yeah, we're in Larvis. This is the one that I already did. Yeah, cancel that. We'll cancel that one out. We'll go to Larvis agent.
there we go thank you uh i already i already did this mostly because i wanted something to show at the end if we either didn't have enough time or or for anything so um but it's it's a good uh good for those uh uh i'm curious then for those in the chat who are using llms what is the thing maybe one or two things that you do or that you've found that have been helpful maybe with building
in Laravel or something that you always like to do even if you are having AI do most of the work? Like what's something that you either look at something that you make sure you review? Taylor, when it comes to like reviewing the work or testing it out, what's your first thing maybe like after you run a prompt, even plan mode, what's the first thing that you like go to double check in the code? I kind of pull up, I pull up the whole like diff in the GitHub desktop. Okay.
And that way it's just like this really easy visualization of every file that changed. And I can really quickly just kind of scan through them and see what's going on. And then I will usually clean up a variety of things. It might be like really nitpicky things like method order or where it put a method in the class. I kind of like organize methods logically or in a certain way that I like. I haven't really reliably been able to automate that with like an AI guidelines or anything.
and then like um i'll just kind of continue the conversation with the ai you know like maybe sometimes it um it duplicated something i was like hey you could actually have a more general abstraction around this and like make this file and extract this here and then use it both places yeah i'll kind of coach it along um or try different things but um yeah that's kind of how i approach it i don't use a lot of like really let's call them like fancy ai workflows
in the sense of like, I usually have like one or two cloud code tabs open. I'm kind of working on a couple, maybe one or two things at most kind of specifically at a time, you know, I haven't really dug too far into like, I've got, you know, 10 different cloud codes churning on in parallel wise tasks on the same code base without them like running into each other. And I haven't really experienced that or like found a need for that.
But I'm a pretty simple guy, I guess, when it comes to the AI usage and how I use it. Awesome. So then have you jumped into the open claw stuff yet? So for those who don't know, you can run open claw and forge right now. It's super simple to get it set up. Have you dumped into it, Taylor? No. I've only scratched the surface of it. I have got an open claw up and running when I was playing with the forge stuff. I can't say that I'm super deep into it, automating my entire life.
but I do love the concept. I think like I actually wrote my own Telegram chatbot for AI a year or two ago, just because I find like Telegram or like WhatsApp, like the super convenient sort of just like interface for talking to AI on the go. Mine was just a simple chatbot. I had no other like functionality that OpenClaw has, but I think it's a really cool project. You know, I'm curious like how it evolves and where it goes from here,
but pretty crazy how it's like you know got everyone buying mac minis all over the place awesome uh we're doing some plan modes where should the uh markdown files live let's go resources docs i'm curious taylor you get your thoughts on like if you're doing anything locally like would you do storage app seems like ai loves storage app i don't know what it is about that so are these these are files that is this files that the user is going to upload uh maybe either
user or if this was just meant to be deployed locally like let's say okay if it's just going to be deployed locally i think i would go resources docs i think that makes sense uh direct attachments we'll probably do that instead of a instead of a filed search let's do that um and then we can text to speech let's do 11 labs and we'll do we'll do a single session so Super, super simple, super, super generic.
I forgot to publish the skills for the AI SDK. So before it jumps into actually implementing this, I'm gonna cancel out and do that. We have some questions in the chat. If you're still here, thank you so much for being here. Taylor's been awesome to be able to answer some questions and now we're just having some fun building with it as well. But some great questions specifically for Taylor about AI. I had a feeling Taylor didn't like AI much.
made him change his mind what was the turning point i uh i never have actually been anti-ai or against ai i think um you know when a coding agents and ai kind of first got started there was this big um wave of like vibe coding as a concept right it sort of like dominated the discourse for you know a chunk of 2025 was this concept of vive coding where you're like not even reviewing the
the code. And I think I don't relate a lot or maybe don't for like production work, let's say, or for like real work that I'm going to like give to customers. I don't relate to that way of coding as much. I think that's a fun way of coding for like, you know, personal projects that are sort of low stakes and you actually don't care about the code quality. But you know, what we've seen is just like over time as the models get better, I think like the quality of the code has gotten so
much better. And I'm actually curious if you've seen like any, I know Opus 4.6 just been out, not even, I guess a week yet. Are you seeing like any big improvements from like Opus 4.5 or has it not been long enough to really even judge? Yeah, I don't think I have seen too many big improvements in the sense of like, I haven't used the new codex as much. I think the biggest
improvements that I've seen from both of those just in my gut reaction and feel has been more in like the the thinking through something before doing it I feel like I I'm I'm uh telling it no that was wrong let's think about this let's do it this way instead much less um and I don't know if that's just because it's using skills better it's using context better or it's just smarter it's always hard to tell in that aspect you know what I'm sort of like I'm curious to see where AI
coding goes in the sense of like i've seen dax and open code kind of say similar things we're like i almost feel like even if the models only got marginally better from where they are now at writing code if they got like let's say they got like 10 better but they got 10x faster at like actually doing it i actually think the speed for me is like what i crave even more than like more intelligence at this point you know what i mean like i find that for most tasks that i'm asking
them to do, they're intelligent enough to do because I don't, I don't, I'm not doing rocket science, right? I'm like building web apps and pulling stuff from a database and it's sort of like CRUD interfaces. But if they could do it like 10x faster, like for me, that would be like such an even bigger unlock, I feel like, than like, you know, like here we've been waiting for six minutes, but what if it only took it like 15 seconds to do all of this? Like that would be incredible, you know, and hopefully we get there over the next few years. I'm going to run boost install again.
So when we scaffold it out, Laravel knew we installed boost, we ran it, but if we run it again, because we installed Laravel AI SDK, it's going to actually ask for us right here to do these third-party AI guidelines, which I'm going to enter and make sure that our code here, because we're clearing context and bypassing permissions, it should use the skill now that has access to it as well, but it might not at the same time. I'm always curious if I think
we have to close out of it and then open it back up again for new skills. We have some people in the chat probably know a little bit more about me in that particular aspect. Question about when you were creating the AISDK, did you want to try and create a competitor to Lingraph and that suit of code? Or I guess your thoughts? I sort of approach things pretty fresh. I'm not really like a heavy user of Lingraph or Lingchain.
you know like or anything like that um and i've approached a lot of things in laravel this way for better or worse to be honest over the years where i just sort of like come at the problem with no really preset opinions or like uh baggage or like kind of historical experience around it even and just sort of look at it all fresh and based on my own like opinions and use cases trying to
build something that I think is interesting. And I try to put like, when I build a new package, like the AI SDK, or even other features in Laravel, I try to build just a good foundation that I can feel confident about and release into the community for like a further iteration, you know? So like, in V1 of the AI SDK, I don't necessarily set out to solve every single conceivable problem around developing with AI. I try to give like, okay, here's a good foundation
and like some scaffolding that we can start from as a community and like have a conversation about and then iterate from there over a period of months and then, you know, eventually years to where things can evolve from there. But I try to put like a foundation in place to start from. Yeah. No, that's awesome. You mentioned like the fast code. Have you tried? Someone in the chat said Kimmy 2.5. Have you tried Kimmy 2.5? It is fast. It is quite fast. Yeah.
I think it's a glimpse of like, man, a life-changing OBS, things get even faster. Yeah. And I'm with you, though, in the sense of like most of the time, unless I'm doing like some kind of MVP, like the initial kickstart of a project, I might be using something like COD code with Opus 4.5, 4.6, something like that, or codex or a big feature.
But most of the time, if I'm just like wanting to nail out certain things, either I'm hand coding it within Zed and I'm just tweaking UI design or tweaking like how I like parts of the code. Or I'm just using something like Kimmy 2.5 or something very quick because I like the feel of it being, hey, I'm asking questions about my code base. I want it now kind of thing. Yeah.
So you use the Git desktop UI. Is that new or have you always been using that? I really only use it for a few things. So like I don't use it for just like committing or checking out branches or anything like that. I'll just use the CLI. I use it for like kind of reviewing history in the repository. So like I want to see a list of the previous commits and kind of what files they changed. I find it just like a nice UI for doing that.
or like if I want to quickly like look at the stage changes and then revert a few things it's really nice just to be able to like right click a file revert changes like I don't have to like remember kind of like how to do this on the command line um and then again just kind of for quickly reviewing things visually that the AI does I kind of use it for that kind of thing so it's more like I almost use it more of like a diff viewer like review tool than I don't really use
it as like a you know kind of the branch switching or committing even or anything like that yeah for me it's just a really quick kind of like review tool yeah uh and for those of us just joining we're kind of uh using uh cloud code to help us generate a application using the aisdk so we'll jump into the code that it's generated to make sure one that's doing it the way that we would want it to be done and then two make sure that it works the way we want to be done too but the neat
thing with the ai sdk is that since it is built you know by taylor in an eloquent way it is designed in a way that's whether we're using it for our chat context like we're going to be using it with an open ai or the 11 labs voice context it's the same you know the same api the same model kind of uh the same uh knowledge kind of model when we're when we're writing with it Looks like it's almost done. Got his test to pass at least.
I like how the AI, I see this a lot when I use AI too. It's like, let me run Pint one more time to be safe. Some of my personal looks like it just finished. Some of my personal projects that I use I have it set up with Rector, PHP stand and Pint and so it's fun to have it make sure that it does all of that. Is there anything Taylor that you usually feel that like it still doesn't get quite and so usually like you know every single thing
that you build you check this one or two things that's a good question I don't know I didn't yeah it can change nothing huge jumps out at me I try to like kind of coach it along with my guidelines as much as I can so let's go we have a knowledge assistant that created looks like it's using the i'd even use attributes nice yeah that's okay i love that
so a friendly knowledge knowledgeable assistance um and uh if the documents do not get enough information to answer the question say so honestly keep your answers concise to conversation so just so everyone in the chat knows we're building um an app that if we go to resources and docs we can create a markdown file in here and maybe even ask claude code to to generate some for us. I might even do that just for fun.
I'll say, I'll open up a new CloudCo and I'll say, we have this app that uses markdown files about the user in order to answer questions. Find some info on Taylor Otwell and generate relevant markdown files and the resources docs directory.
Kickstart that off. But the goal is to be able to then take all these markdown documents and with this knowledge assistant, and so we should go into, I believe it's probably in a controller. Yeah, we have this ask controller here that's using looks like Laravel AI transcription, files with document audio. So I would assume, hopefully it's using it in the proper sense where we're getting an upload
an audio. We're going to transcribe it, get all the docs and the markdown and the resources docs directory. And then we're going to create a new knowledge assistant or a new instance of the knowledge assistance. And with that prompt, attach the attachments that we have in the markdown file, get a text. And then this is so clean. I love this Taylor. Like how easy it is to say,
I just want an audio of this, this answer. Um, and so is 11 correct? I don't. Yeah, that's correct. Yeah. Okay. Yeah, that is correct. Sweet. Awesome. Uh, the, the one thing, uh, the one thing that I've noticed, and I don't know if this is just, uh, me not prompting well, but the one thing I've noticed within, um, specifically within like the react context
within Laravel for some reason when it does stuff like within like a controller where it's hitting and hitting our API it's not an inertia like use form request because you wouldn't use that for chat for example for some reason it always likes to return it as an inertia page and so you get like this json resource so I always usually try to tell it to use axios or something like that then it seems to do well. Are you still an Axios user?
I do use Axios quite a bit, but this is actually something that's coming up in Inertia 3, which I think will be coming up in the next... I don't want to speak for when it's coming out. I think it's coming out pretty soon, let's say, like in the next month or so. There's going to be a use HTTP thing that um you won't have to really use axios anymore with um i don't even think we're including axios
by default anymore which we do now in many different things um so yeah we're kind of giving people uh kind of dropping that and doing a little bit lighter weight but still giving people some of the like affordances of axios yeah i love that i think joe tandenbos is going to talk about that at his Laracon Europe talk, actually. He's going to kind of give like an Inertia 3 preview or kind of demo. Perfect. So, yeah, stay tuned. I don't know off the top of my head if Laracon Europe talks are being streamed,
but they're probably going to be recorded at the very least. So be sure to stay tuned for that. Question for Taylor. What's the recommended approach to implementing production-grade guardrails? So I guess within the AISDK, let's say you're doing this, And I can maybe talk about even for my simple demo of what I made sure to do. What are some things that you can think of in terms of prompt injection, misuse of LLMA API keys, that kind of thing?
Yeah, this is something we haven't really built any opinions in thus far. I'm curious to see what PRs come in or what sort of community feedback is around this. Certain types of apps are sort of more vulnerable to this than others, depending on sort of like what you're doing and what tools you're exposing. And if you have tools that can like, for example, delete records out of your database, that's of course like much more potentially serious in terms of like prompt injection or things like that versus some other
use cases. So yeah, this is something we haven't baked anything in on yet, but I'm curious to see sort of like what people want and what people have found, you know, most effective in other ecosystems that maybe we could learn from or borrow from. Yeah, perfect. I love it. Can the level AI SDK be extended or improved with plugins or add-ons? Yeah, so I think like one of the cool areas we'll see sort of like community extension and
collaboration is you could actually package up and distribute either tools or agents and tools as composer packages to give to other people. So maybe you write a tool that is reusable and it does some kind of functionality that maybe a lot of people would benefit from in different kinds of applications. You could actually package that up and distribute it on Packagist as a tool that other people can use. So I think that's one of the primary ways you'll see people sort of like have plugins
or so-called add-ons for the AISDK is like distributing those types of things throughout the community. That's awesome. I'm curious to know how much this got it right on you in terms of the biography, philosophy, and projects. What Cloud Code? So we have biography. This all looks correct so far. And we just asked Cloud Code to generate all this for us.
So I'm assuming pulling just internet accessible things. company grew from around eight employees started 24 yeah this is all yeah that all looks correct simplicity and elegance warned against clever code yeah I think backwards compatibility has been a you know something that has been more important in more recent years of Laravel I think people would question that in the early years of Laravel
probably as most projects go in the early years of Laravel you know we were moving fast and breaking things but lately i try to make it to where most people can upgrade you know without any changes and it seems like the backwards compatibility uh is even bigger now for ai because you almost have to have like uh oh like things that happened a year ago which models are getting smarter and it's more up-to-date of course but things happen a year ago if it's using that it
still works correct yeah yeah yeah it is more important like not to break things in the ai world I agree. Some projects. Yeah, cool. Okay. I'm curious to see how this works. Let's go ahead and composer run dev. That is my preferred way of getting things up. Are you still the same way or PGP artisan server?
I use either this or herd. Okay. Open this up. Okay, we have Larvis. I don't know if my sound is very minimal. Let's go ahead. I don't know if my sound is going to work. Let's see. Can you tell me a little bit more about Taylor's way of thinking through things when he builds a project?
Oh, audio must be webmoggwave. I actually ran across this, I think, in my initial thing because I think it tries, whatever AI did in the initial thing, I think it tried to save it as WebM. And by default, that's classified as video instead of audio. Oh, wow. Okay. WebM.
see have this air i think it's because when we initially try to uh save the vid uh audio file saves it a video format of it question mark uh back to the chat uh if people were want to contribute to the level sdk any specific tasks or areas you would like the community to help out with? Oh, that is a good one.
I mean, some of the recent PRs have been around just like adding different providers. So like someone contributed DeepSeek, someone contributed Mistral. This is also like a tricky one because some of the more complicated features, like, you know, some of the conversation stuff I want to improve. Like I've got stuff in my head and sometimes it's hard to like, if PRs are coming in and sort of like conflicting with that.
yeah um you know so let me think i think that like agent chat artisan command thing is a is maybe a good one the community could riff on a little bit and then people have been adding providers um human tool approval i don't i mean if someone wants to take a stab at that go for it i haven't started on it um that might be a good one someone could work on but it's a little bit
of a meaty one. It's not trivial probably. Awesome. So yeah, Taylor, I'd mentioned a little bit earlier, kind of like two things is chatting with agents that you automatically generate, maybe like in a PHP artisan agent chat command, and then human tool approval. Correct me if I'm wrong, Taylor, but you mentioned it would be nice to be able to say, okay, there's specific tools that they happen, but before the response is actually generated, you have some form of human interaction to say,
hey, this is good to go. Let's run that kind of thing. Right. Yeah, exactly. Those would be great opportunities. Someone's mentioned token usage. That'd be interesting. I don't know if there's anything currently built in, correct? You can get back to token usage from a given prompt or whatever, a given generation, but we're going to be building a lot of token usage tracking stuff into Nightwatch. Ooh, interesting. you know people can kind of people can of course sort of roll their own because you do have access
to that but we'll be also providing that in night watch all right let's let's go ahead refresh see if it does anything now we'll say uh can you tell me a little bit about how taylor would think through creating a new package for laravel uh upload is nothing for you please try again pdf oh you can't upload markdown files markdown files
i i would assume in our our agents or the uh chat we're just uploading we're just uploading we're just collecting the documents as markdown oh it's passing it it should just like inject them into the uh yeah you know what i mean yeah instead of uploading
because we get this error instead of uploading the markdown files let's inject them directly into the prompt yeah should be like that yeah see if that works see if see if that works i actually noticed that as well that uh open ai doesn't accept a whole lot of file formats on these attachments um i was surprised like you i don't think you can upload like a csv
it has to it's basically like pdf or image or i don't know why exactly or something before you yeah yeah yeah i guess maybe are they trying to uh not to comment on open ai's business plan or anything like that but are they trying to try to move everything into vectors like you do that that first and then we'll do that and that's very very interesting um it looks like it is making the correct change so i saw where it was yeah i saw that it uh yeah so we're doing the docs with the
question and prompt so bigger prompt but we don't probably be a little bit long longer of a wait before we get an audio response if we're generating the prompt pushing into 11 labs but still still should work uh uh i'm curious and that might be a good maybe if you're listening to this and you love 11 labs i was actually going to take a stab at a pr or i don't know if you you've even tried it taylor like the ability to i think they have voice agents where you can like instead of having
to transcribe and then get an answer and then put it back i think they have the ability all wrapped up into one where you could upload a voice and it yeah with a prompt or something like that which would make this a lot faster at least for this this demo one more time let's try try this out uh if i was taylor how would i think about building a new uh package for laravel
That's great. When building a new package, consider internal opt-in's development philosophy. Focus on simplicity and elegance, ensuring that the package is intuitive. Okay. It is working. Sick reverb. It doesn't look like it was sharing my audio. But yeah, that worked. We have it.
I'm assuming we could speak. It looks like we have a little bug speaking thing. Yeah. Oh, there we go. Maybe I added, maybe clicking a couple of times added it. I think because we're still saving it as memory in terms of the Ask Controller, do we have a... Okay, it probably is just a one-off. It probably would reset then, I'm assuming. Yeah, I think so. Sweet. Awesome.
It's cool to be able to get something like that up and running rather quickly. And honestly, there's not too much code involved with this. That's one of the things I like about the AISDK is like we have a knowledge assistant being able to have and kind of as a good recap for those watching. You have assistants that you can create them. php artisan make um agent sorry not an assistant uh where we have a particular class that that all
lives in so instructions um as well as tools is there anything else that can live in there taylor yeah like the output schema okay things like that um and then with that agent we can then create a new instance of it in things like controllers where we're creating a new instance of this knowledge assistant or passing it that prompts we're using all the the configuration that we're doing in that assistant which also uses all the configuration of the ai config in terms of
what's the default for audio transcription images and embeddings for example and then it's as simple as using things like audio of the answer we're jittering with and getting that particular response and then it's converting that on the front end but yeah it's it's crazy how basically that whole demo was just really one controller if in if and in the sense of that um and doing
a couple things on the back end of how fast it can be uh and probably we could configure this quicker to use i think in my uh my backup larvis i did a use cheapest model or use is there a use fastest model am i correct uh it's use smartest and use cheapest use cheapest i think i did a use cheapest for like the actual response and then that way it just was a lot faster in a lot of ways
um but yeah sweet let's go ahead and i'm gonna we're probably coming short up on time so is there any um i'll jump into maybe one more question those of us who were those who were in the chat for this whole period of time. Thank you so much for being here. Thank you so much for taking a journey along with us on how the AISDK was built, what it's good for, and also getting a lot of questions for Taylor. I know, Taylor, we're appreciative of you and your time of being here.
Let's go ahead and see. There's not too many more questions. Taylor, what would be one thing that you would love to tell people about when it comes to like the AISDK, whether in terms of building with it or just, you know, inspirational kind of phrase to leave? Oh, well, it makes, you know, integrating AI with your Laravel app super easy. So, I mean, it is out, Composer required, Laravel slash AI. There's a boost skill available. So install boost
and you will have the AISDK skill that kind of tells boost how to use it and just start like, you know, kind of like we did here, just like building something fun, some cool ideas, you'll kind of learn how to use it, learn the ropes, and then hopefully can take it to, you know, whatever you're doing at work or whatever kind of like business you're building, whatever. And hopefully it makes your life a little bit easier. Awesome. I love it. And then for those who saw the other kind of demo that I had kind of put together for the kind of RAG instance and chatting
with it, I'll put that link in the chat as well. But I'll also be able to, on that demo, we'll also have like the GitHub link so that you can kind of take a look through what was built with that. I guess one last question to kind of go through that as well as someone mentioned in terms of like Prism PHP, because I know you mentioned a lot of some of the stuff in the background is
using Prism PHP. Someone mentioned what does it look like to switch? What are some of the gaps at the moment in terms of switching? I think of, yeah, we do use Prism for some of the tech stuff Under the Hood, nice package built by TJ Miller. I think of Prism and AISDK a little bit like I think of Query Builder and Eloquent. So like Prism has kind of this fluent Query Builder
interface for like querying and doing AI things. And I think the AISDK is like maybe like a layer of abstraction on top of that you might think of where you have like agent classes and sort of like agent testing and things like that. So it's kind of like a little bit higher level of abstraction in terms of like code organization and like reuse, which I think is kind of like the main difference between the two.
And then it kind of like goes beyond and a little bit around like the similarity search, the file search, some of that stuff that is maybe not available in PRISM, but is available in the AISDK as well as some extra providers like 11 labs and things like that. So yeah, it's just a little bit higher level of abstraction to get started. And then of course, maintained here by us at Laravel, but again, using Prism for a variety of things under the hood and yeah, great library. Awesome.
Yeah. Thank you so much, everyone in the chat. Thank you for being here and for joining us on this journey. And for those who are watching kind of in on demand, thank you so much for watching this. feel free to like and subscribe so we can have additional content be pushed to you as quickly as possible. But thank you so much, Taylor, for joining us and for everyone getting started with building
within Laravel and maybe AI, you can use composer require Laravel slash AI to get started and use Laravel boost because it does have a skill to be able to generate some of those things, even like that little demo that we just did. It was simple, but it was easy to show how the LLMs can use things like Laravel Boost and the AI SDK to create something pretty magical in such little code.
But yeah, hopefully everyone has a fantastic day wherever you are or wherever you are joining and watching us from. Grab a Coke Zero for us and have some Taco Bell in favor of Taylor and the Laravel team. But thank you all so much. Thanks. See ya.
Thank you.