Laravelstream· Feb 9, 2026· 2:05:19· 51.3K views on YouTube

Building AI Applications with the Laravel AI SDK

Watch on YouTube ↗
0:00

React at a moment you like. The best moments light up here.

transcript

279 moments
  1. And we are live. Hello everyone. Good to see you all. Uh we have very special guest today. We have the Taylor Otwell. Uh 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 It was a good weekend for me. Hopefully everyone in the chat. Uh I know we have already had quite a bit of people um in the chat already. Uh so a lot of people waiting.

  2. So if you are here and you are uh ready to see what the AI SDK has in store for us and also just to hear Taylor's thoughts on the AI SDK, why he built it. I'm excited for that personally. I haven't gotten a chance to talk to Taylor yet about the AI SDK specifically. Uh 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?

  3. Like maybe TV show, what something like that? Oh man, I don't even know. Um everything's been a blur since I did the [clears throat] AI SDK and then I was in um India and Dubai for Laracon India. So like I feel like I've been all over 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. >> [laughter] >> I guess what was your Whenever you

  4. travel somewhere, what is like the the food or like thing that you try to make sure you you do? Mhm. 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 the 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

  5. any food? Like what do you do? It 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 that it for everyone watching. I already see a bunch of all over the place. So we got Evan from Switzerland, Bakersfield,

  6. California. Glad 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 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.

  7. 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 Texas style. >> 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. In In

  8. Arizona, I guess I would tell people to try any hole in the wall Mexican restaurant. Like that would be my go-to to >> Yeah. There are a lot of good Mexican places here, too. It's so good. >> Yeah, it's 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's sausage roll. I have not had one, unfortunately. I've heard good things. Uh 9:00 p.m. Dubai time. Well, thanks so much for staying up staying up late. Uh

  9. we got 14:00 here in Brazil. Uh 10:03 p.m. in Pakistan. I think that might be Oh, never mind. 1:03 a.m. right now in PH. All awesome. I love it. Macedonia 16:03. Glad or 18:03. Glad to have you all here. Any Ghanaian developers in the room? Says Ovak 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

  10. sausage roll next time you're in the UK, Josh. Okay, sounds good to me. I am always down for some food. Uh I did have Taco Bell when I was in the UK, so and it was Well, that's actually pretty good. Man, I've got a Taco Bell that's like right outside my neighborhood. I mean, I'm talking it's like across across the street, basically. I didn't know I didn't know this about you. If you If you love Taco Bell, then that's awesome. I love it. It's so quick. I can like run over there and get like lunch and be

  11. back home legit like 10 minutes. Even if I eat at the restaurant, you know. Hey, >> [laughter] >> 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. I'm It's like 5 minutes. What do you get? I I get um like either the cheesy bean and rice

  12. 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 but yeah, like cheesy bean and 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 uh Baja Blast. I used to do full sugar. Now I'm Baja Blast Zero. Mine's Mine daughter does the Baja Blast

  13. Zero, too. Yeah. I 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

  14. Taylor's thoughts on the AI SDK, what it is, how you would build with it within Laravel, and maybe like why it was built, and then two, hopefully like the towards the latter half of this stream being able to to build something. There's There's some projects that I've I've built um that we can kind of show off the AI SDK and just like what's capable of, but I think like the the perfect part is being able to say, "Okay, what actually is capable when you're building things?" Um and then the why. So, again, if you

  15. do have questions, again, everyone's kind of shouting out where they're from. I love it. Keep doing that. Um 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 when did I I I think like the first thing I saw you uh start talking about the AI SDK? It was

  16. 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 [snorts] fruition? That was one 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 um you know, it's just like such a important part of the dev workflow at this point. It felt like we needed some

  17. 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 [clears throat] is becoming such a common part of like what people do when they build apps, um that made a lot of sense to bring something first-party and like have like an offering here. I usually try to think of like if I'm going to build something into the framework,

  18. I kind of think to myself like is this applicable to like 70, 80% devs, you know, in in the Laravel world. Like if I'm debating whether something needs to be in the framework. Yeah. Um and then like for a package like the AI SDK is maybe a little bit more lenient. Like is this applicable to maybe half of Laravel devs like in the world? Like probably so, right? With AI and probably increasing dramatically over time. So, made sense to have something and yeah, I did build

  19. it myself and it was the first package I've written at Laravel in a couple of years. The last stuff I wrote was a Livewire Vault and Laravel Folio. Yeah. And then as we were like 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, [clears throat] most of other people here were busy with other stuff, right? So, it's [laughter] like So, someone has to build it, but

  20. 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 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 built upon in the AI SDK. I kind of see like that is like almost like a query builder and eloquent type of relationship like

  21. you know, I think the AI SDK I tried to pull like a little bit more opinions on top than people might typically build in a in like a 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 um as well. So, uh um uh will be paid or free? It is already out, silent, and it is it is free. It's

  22. a free package, uh free package to use for the AI SDK. 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 a little bit to Taylor about his thoughts about why built it, what's it for, um 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? Cuz that's a little bit of a curve or or

  23. 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 probably be Eloquent. Um it's also the hardest thing I've pretty much ever built. Uh if it's like a package, I'm a pretty big fan of like

  24. um I think Reverb is cool. Um I think Echo is cool, like the kind of the real-time stuff in Laravel. What what else do we even have? Um Let me Let me Let me look at the docs. We've accumulated quite a few packages in there. >> There's quite There's quite a bit out there. I mean, I think Octane is pretty cool. Uh to some extent, like the bulk of Octane is sort of handled by other people, right? Like the FrankenPHP team and Swoole and stuff like that. And but uh

  25. just the ability to like boot the Laravel app and kind of keep feeding your requests really quickly. Um yeah. Uh Pete Bishop said, "My favorite package is 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

  26. 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. Um and some of those could have been 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 Laravel 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

  27. was like, oh, this is actually incredibly easy. Man, yeah, we're working on some other some new cashier stuff and some new fortified stuff actually. Um that hopefully we can show pretty soon. But like man, cashier is like that is a I don't think like back when I first wrote cashier like integrating with Stripe and all that, it is a lot of work to like catch all the web hooks, store all that. So Yeah, I think a lot of people find that package pretty valuable. Yeah, and

  28. especially if you look outside of the Laravel ecosystem, most people, you know, have their own set way of okay, here's how to not make Stripe incredibly difficult to work with and everything like that. So you know it's you know it's valuable. We got some people were saying Reverb, queues and jobs. We'll call that as part of a package. Working with queues and jobs is is incredibly easy. Yes, love for Octane. Prism is insane. I agree. We got inertia

  29. love, Laravel Nova favorites love. Octane, sale, Octane, Reverb, Fortify. I love it. I love it. Reverb is also cool. I I do love I do love Reverb. Makes everything makes everything easy. So Taylor, when it comes to the AI SDK, what is how is this different than maybe like working with AI in Laravel. So how is this different

  30. than like a boost for example or even MCP? Where does this SDK kind of fall into? Yeah. So like right now we have kind of three AI related packages in Laravel. 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

  31. 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 ChatGPT 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 ChatGPT and things

  32. like that. 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 Claude Code and Cursor and other like agentic dev tools like Open Code 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

  33. inspect your database schema. And so the idea is it improves like the quality of the Laravel code that things like Claude 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 feature exists, right? Because they've been trained on old data, but Boost actually allows us to feed them like the latest info. So

  34. they always have access to the most up-to-date docs. If you're writing Laravel and you're using Claude Code or 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 cuz 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

  35. a streamlined unified interface for working with different AI providers like OpenAI, Gemini, Anthropic. So, I want to generate some text or 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 the What What is the you know, what's the HTTP endpoint for generating image on Gemini and now what is it on open AI? It's just a really streamlined way to

  36. work with AI. Yeah. Yeah, I love it. Yeah, someone someone asked the question for someone that does not know what Laravel AI SDK is, how would you describe it in a few words? I think Taylor just did that, but I think if I could put it into other words and maybe Taylor 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

  37. sure we'll get into a little bit later is sort of this um integrated with a lot of Laravel's 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 queue the generation of an image, it's actually integrated with the queue system in Laravel. So, it's an AI SDK that really leans into like the full stackness of Laravel.

  38. I love it. I love it. When you think of and some people are saying 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 >> know. you start stuttering. I don't know. But, for everyone who's saying that uh I'm on standard definition, so I can go up to Do I go up to full high definition? Is that recommend? Full high definition? Uh maybe.

  39. All right, do I look good now? Do I look better? Let's see. Um I think I think you look better. >> Should look Should look video enhance, says someone. Yeah. Exactly. Taylor will get on that. Let's Yeah, sweet. But yeah, let's uh 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

  40. um you know, current applications, enterprise applications, etc. 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? Um what are some practical applications that you can now build with the AI SDK? Yeah. I mean I 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

  41. like on Night Watch for us, which we've already launched, was like you have an issue in Night Watch, right? like an exception has occurred or you have like some slow query. You can actually click a button in Night Watch 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

  42. classify or summarize. It's super easy to do that with AI um 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 I phrase,

  43. 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 embeddings, store them in a database, and then do semantic search querying, and then AI powered re-ranking of those results for like the most semantically similar results. [snorts] So Um you know, I think those are just 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

  44. you know, I don't know if it's a little bit more like the consumer side of like um 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 and the neat part I think with the AI SDK kind of like it you said is now you have this one central point. I know in the past within things, you know, there there are great

  45. packages like Prism that I I know you said that the AI SDK is is built on top of and expands in a lot of ways. Um, 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." Um, I'm curious your thoughts and I and when we dive into building something within the code, I I've already used this within things

  46. 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 with to say, "Okay, hey, this audio is going to be generated the same way that I generated this this chat." Do you think that's intentional that you built like how what are your thoughts on that when it comes to this new world of coding in this in that sense? In terms of like how much effort do I put into sort of like the elegance of the API?

  47. Yeah, either either that or is that elegance of the API matter now? Yeah, I know. It's something I've thought about myself. Um, 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. Now, I used to

  48. put like a a of effort into these sort of like whimsical fun APIs because as humans were writing the code it's kind of fun to like use these tools that are sort of like charming in a way. Um and maybe it still is, but yeah, I 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, you know? Yeah. >> Um and I think like we we've tweeted about this a little bit, but like frameworks that sort of lean into

  49. 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 these 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,

  50. I 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 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 in that case, and I think the LLMs do a great job at also saying,

  51. you know, we're using this one package, so we're going to be doing it the exact same way another another iteration of the application. Yeah, totally. Uh for those just joining, thank you so much for for being here. Uh I am joined, my name is Josh, I'm joined by Taylor Otwell, you probably know Taylor uh just from everything, the creator of Laravel and Beam and now the creator of Laravel AI SDK, which is what we're kind of diving into here on the stream. So if

  52. you're just joining us, let us know where you're joining from, uh what time it is there for you, and then what's your favorite Laravel package. Uh 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 AI SDK and then hopefully be able to have a chance to to build with it as well. Um Taylor, what is your favorite part before we jump into like each aspect of

  53. the AI SDK? Uh just from an overall standpoint, what is your favorite part of the AI SDK? One that you're like when you built it you're like, "Yeah, this is really cool. I like that. I like that." >> Yeah. Yeah. Yeah. It's a good question. Um I really like the kind of like agent class concept, which was a big part of like um my initial sort of like thinking behind the AI SDK. And you know, for those who haven't seen it, basically when you use the AI SDK, you make agent

  54. 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 um sort of like what you're doing um with the AI provider. So, you might have for example like, I don't know, I think in the 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

  55. I 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. Also very easy to like test. Um where you know, it had you can fake agents, you can fake other AI interactions. I think the testing story

  56. was something I tried to like make decent. I think testing with AI is something that's often like overlooked. One cuz testing AI can be hard. It's not deterministic. Um you know, there's all kind of quirky things that can happen. So, I tried to make that pretty streamlined. Yeah. No, I love that. And I I I that's an interesting standpoint that I've 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 I've built probably a

  57. 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 is that aspect where it feels like I don't know similar to a job where you would or an action I guess would be a better use case but where where now I'm abstracting that from every single job or controller that I'm using from that specific logic and it lives in one

  58. 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 it 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

  59. 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 Laravel AI SDK is out it is out it is laravel.com/ai. So laravel.com/ai

  60. and the it's the AI toolkit with batteries included. It's as simple as running this composer require command composer require laravel/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 in one single package versus like hey here's a package for image here's a package for voice. What what's your kind of thoughts or idea behind that? You know I kind of just wanted people to

  61. 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. Uh so it's for me it's just kind of nice to be like composer require laravel/ai and boom I just sort of like have everything I need to do AI SDK related things whether that's audio or images or whatever. Um it doesn't really like you know significantly increase the size of the package to add these things. All the bulk of the work is handled by people like Jim and I and

  62. open AI and all that actually. >> Yeah. I 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 tool kit. I love it. Um 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. But there's these kind of like uh you know there's seven different or eight different aspects and this is

  63. 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 cuz 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

  64. so for those who are installing the AI SDK if you run and you are using AI agents which like Taylor said it's it's a good thing to be using them I think you know. If you run boost install PHP artisan boost install after you install the Laravel SDK it will ask you to 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

  65. 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 what just in 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 etc. Yeah, [snorts] prompts are sort of like the basic way to ask the LM to generate some text in response to like text you

  66. give it. So you know, if you've ever used chat GBT and you ask it a question and you get it some text back and that is like you're prompting the LM. Very similarly like in the AI SDK this is how you do that in code, right? So we're going to send the LM 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 along this file and it's going to give us back some text. So this is like a super common use

  67. case for AI, right? Similar to that summarization aspect that you had that you had said before. Yeah, exactly. 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 LM with a specific task and we're getting a response and we're storing

  68. 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 this is actually good. You can go you can look at this. 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 coach agent and then give it a prompt

  69. and we can do that in a variety of places throughout our app without sort of like re-specifying those system instructions. So that's super convenient. What one question I had here just I think it's a good place to talk about it is so 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 send a prompt to open AI or even send a prompt to a specific model or even send

  70. a prompt to [clears throat] 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 AI file and that's where you specify I don't even know if that's on this page but we definitely talk about it kind of like multi-provider and failover and stuff but similar like in your Laravel app if you use Laravel you probably know you have like a config database file or a

  71. config file systems file. When you install the AI SDK you get a config 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 our 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.

  72. 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. 402 405 yeah. Yeah, exactly. You can just use the use the features.

  73. Yeah, and it seems like that's the eloquent way in a lot of ways where like you're building out database queries in the same way where I could be building in SQL light in local production or local instance and then when I put it into production none of my code changes just my >> Yeah, yeah it's basically the same concept almost like a ORM type concept concept for uh AI providers. I love it. What about context? What's that? Yeah, so context is kind of how you

  74. actually would build something more like a chat where, you know, what what's kind of interesting about like dealing with LLMs is when you ask LLM for some text, it, you know, ChatGPT 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

  75. 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. Yeah. Um 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 LLM. So we're going to in this example, we're

  76. 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 uh 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 AI SDK, so like the previous tab showed, we allow you to do that manually, but if you use this remember's conversations trait like you have here, the AI SDK will actually just do that for you. Um

  77. And the AI SDK 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. There's some kind of more features around this, but the the the kind of like bare-bones skeleton of it is here. Where if I use this remember's 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.

  78. 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 is 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 yourself and then you're in this aspect of it. It's just kind of obfuscated for you. Yeah. I guess there was a question that I saw in the chat that was, what was the

  79. most challenging part of building Laravel SDK? Is this it or is there a different part? No, I mean, a lot of it was kind of like I 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 and 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

  80. 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 pseudo code 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 SDK, 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 I mean, to get back to

  81. 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 were kind of or the 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

  82. every single piece of the code, you know what's available and it feels unified, which I think is the the biggest thing. Yeah, absolutely. Jason, you mentioned uh Jason Torres, okay, fine, I'll go and install it. You had your uh Santa app that I that was hosted on Laravel Cloud. I'm curious of if you swap out the AISDK, it'd be cool to see. Um all right, Taylor, what is uh tools? I know we kind of have talked about this a little bit on the streams before when it comes to like MCP and what's the

  83. difference between tools, stuff like that. What is tools in the context of the AISDK? 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 I'll share some other cool examples in a second where maybe you want the LLM

  84. to be able to generate like a cryptographically secure random number. I don't think that's actually built into LLMs, so like if I ask ChatGPT, "Hey, give me a number between 1 and 100." Yeah. That's probably not actually a random number in the true like mathematical sense of the word. But I can actually give um using the AISDK, I can define a tool that when I prompt the LLM, I give it a list of tools that it has available to it. So, it's going to see, "Hey, I have

  85. 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. Uh but the LLM will have actually decide to call it. I mean, it's pretty it's pretty wild, actually. Um 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

  86. use and how good it was at using tools. You know, and LLMs 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 Claude code or open code or cursor, you'll see that it like um it inspects files. Like it reads files, it writes files, it runs bash commands.

  87. Those are actually tools that the builders of Claude code and open code 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 AI SDK out in San Francisco a few weeks ago, I actually wrote like a little tiny nano version of Claude code. 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, or

  88. 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. Um so, tools let you do all sorts of random stuff. And um I think we'll get into a second. We actually give you some tools built in. Um but this is how you can like start to integrate the LLM with your system. >> [snorts]

  89. >> Yeah. No, I love I love that. And that's that's essentially what uh Boost is doing a lot of ways, too. Like you mentioned like Claude code, but Boost has has um a specific number of tools that Would you say then, Taylor, tools are a great place to 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. Um and some of the tools we give you are are some common tools that people like those are like search. So,

  90. um go to provider tools. What do we have here? I think this is Yeah, the This is web search, web fetch, uh and then file search. So, like people use tools a lot for this kind of thing. Um 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 AI SDK. 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

  91. 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. Um and that's data that the LLM otherwise wouldn't have access to. I love it. Uh cool kind of question around these lines. How should we

  92. 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 MC can or should we use? Um and then how should we organize our tools? I guess uh you know the SDK gives you a way to organize them within this tools namespace. But what are your thoughts on this? Yeah, I I know it's been like kind of a pretty hot topic of discussion around like the amount of tools that you should

  93. expose to to an LLM. I I would say like you know when you 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

  94. sort of consume a lot of tokens and a lot of context. Um 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 uh it can kind of get pretty out of control pretty fast. I think if you're using the AI SDK to build something in your own application, you probably aren't running into that quite as much where you have like a hundred tools and something that's probably pretty rare.

  95. So um Yeah, I mean I 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. Yeah, I am curious. I actually don't know the answer to this, but I am curious of if if there's going to be a way or if there's already one way to be able to say to to conditionally load up tools would be would be very interesting. I know that there's probably And what's cool with the AI SDK, you can do that a little bit in the sense of like >> [clears throat]

  96. >> you have the agent class and so whatever you return from that tools method can be sort of like determined at runtime. Okay. So maybe maybe one user maybe you maybe you pass it 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 then maybe this other user doesn't. So you can do a little bit of like dynamic tool registration here. I know people are sort of working on sort of like other things around tool discovery. Um

  97. So yeah, it's pretty ongoing I think evolving topic in the AI world. Yeah, so that does make sense that that 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 Atwood talking through the label AI's SDK. We'll get to actually building things and like what that actually looks

  98. 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, be free feel free to drop them in the comments. I am checking it as much as possible. I can't promise that we'll get to all those questions,

  99. but uh glad to have all of you watching here. Feel free to like and subscribe to help us uh 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 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

  100. ChatGPT. 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. Um what structured output lets you do is actually say, "Okay, when you respond to me, I want you to respond in this structure." Um 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 responds, it's going to give you JSON that matches that schema.

  101. 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 free-form text from LLM, like you know, how do you parse that? I don't know. It's It's just It's just arbitrary text, you know? But, um if you're getting back JSON, you know what to expect. And this is actually powered by an um a new Laravel component, the JSON schema component, which you can see

  102. there in like the type signature. Um so, we actually used this on the MCP package um to define JSON schemas for your MCP tools, and it's used here. So, um we actually wrote this component, because we needed it, you know, in the AI SDK, in the MCP package. Uh but, it's a really slick little component for defining JSON schemas. Yeah. I remember the first uh application, actually the first Laravel

  103. application I ever made was an AI application where I was They they we didn't have structured output at the time. This is about like 3 years ago. I think it was GPT-2 or something like that. Uh 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 then separate it, and then I had to parse it out from that. Uh structured output makes that so much easier. Yeah, it's like I yeah, I I mean

  104. even on Anthropic's 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." >> [laughter] >> It's pretty pretty wild. Yeah, it's crazy times that we we we live in now where we could we could have it be exactly the way we want it. And so the the way the AI SDK does that makes it extremely extremely easy. Um a couple questions that I wanted to uh someone said for using SDK, we need to purchase the multiple model subscriptions like

  105. Gemini and Claude Code. Uh so Claude 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 um you know, image generation, uh multiple models would have to be added as API keys to the config locally and in production. Uh but I'm 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 Ollama. Is that correct?

  106. >> that's correct. Yeah, we 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 OpenAI 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 um

  107. download Ollama 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 Ollama, o l l a m a. Um I think actually Open Router, now that you mentioned it today, I think they also have like a uh 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 providers as well.

  108. Which is really really interesting. Um I saw another one okay, you mentioned embeddings um and vector search. Can it replace LangChain 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 it replace LangChain, you know, it probably depends on kind of what you're doing with LangChain, but a lot of the ideas behind some of the built-in tools are around sort of like

  109. rag and similar concepts in the sense of like vectorizing files, searching them, doing similarity search across data using tools, um things like that. I think that's like just like a super common use case for tools in general. Um so yeah, there's opinions on that kind of built into the AI SDK because it is so common. Yeah, um and then uh there is uh we'll we'll get to that question in a

  110. little bit. Uh I will jump back in. What 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 AI

  111. SDK makes that super easy. So this uses uh ACTP server sent events um 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.

  112. But then on the front end in our JavaScript or um 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 uh the entire response to be generated before you see anything. Yeah, that is really nice part of of it being so succinctly tied in with the front end. I I like that. Uh for example, within View and React, we have the use stream hook. Uh but then Livewire has the the wire stream field

  113. to take all of this and and make it look like you would expect within Chat GPT where it's kind of streaming line by line. >> Yeah. Um what what about async? This is this is interesting to me cuz I've 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 AISDK 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,

  114. in this case we're calling queue or 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. Um 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

  115. this prompt and then the then and the catch callbacks will be invoked when the response is ready or if something goes wrong respectively. >> Yeah. Um so once we get the response, we can store it in a database or send an email or whatever we 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 uh the user user submits something that we want to analyze with AI, but we don't

  116. really want the user to have to sit and wait for it to be done right then. So we 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 or I 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 I would say like off

  117. 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 from Lynn. Is the async stuff non-blocking? Does it use the react PHP PSR-18 browser? Yeah, this async stuff is more like queue related. Um so it doesn't really it doesn't really

  118. have anything to do with like async in the sense of like concurrency or like you know go co-routines or anything like that. 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 question. Yes, the SDK is compatible with the Ollama API. I would assume yes as well, correct? Yes, I think so. Yeah. Yeah,

  119. and you can even 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 Ollama compatible just by overriding that base URL. Yeah. Question here that we we kind of glossed over here at the top I'm curious to hear

  120. what how 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 uh and stuff like that. So, in terms of automatic failover, uh and then how does all that work behind the scenes? Yeah, so, um yeah yes, you can do this. And it pretty much works how um this person is asking, where you pass multiple providers and models to the

  121. prompt method or either uh 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, um 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. Um we do that by checking like the

  122. response codes from the AI providers that we get back, so we can see like, oh, they're you know, overloaded or 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 for to know that you got uh 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

  123. 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

  124. Anthropic Opus 4.6 for that, right? It's it's like Yeah, it's like $100, yeah. Yeah, exactly. So, if you're just trying to summarize like a paragraph of text in the one sentence, for example, um 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. Mhm. 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,

  125. and you just like, composer update to get the latest AI SDK, you're just like, always on Yeah. the latest cheapest or smartest model. So, it's just 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 I love that. Uh cuz it's one of those things similar to what you had mentioned at the beginning where you having the one package that makes it easier and more eloquent in the sense of you're not having to you you have those

  126. opinions already formed for you when it comes to cheapest, when it comes to smartest, uh 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. Uh lastly, what about attachments? This is interesting. >> Yes. Yeah, so attachments kind of come up in a few places throughout the AI SDK. So, in this example, we're using it when prompting and doing text generation. So, you know, maybe we're giving it I think

  127. 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 um you could prompt the model, "Hey, here's an image and I want to um make it like cartoon style or like a painting or

  128. I want to change something about it, like, basically remix an existing image." Um you can also use attachments for that as well. Um so, yeah, it's super easy to attach and upload files and and kind of interact with them. Yeah, here's a here's a uh 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 um structured output that I

  129. can do something with. I love that. I love that. Uh quick question. Uh I'm going to close out this screen or or stop sharing my screen real quick just so we can uh 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 and then we maybe if we still have some time we can build something from scratch cuz I'm curious to see uh how Claude code also works with the AI SDK and to get gaining to show everyone there. But question

  130. says now that we have the Laravel SDK, what's next? Laravel's focus on ASP is exciting and I think it's the right stuff for it. 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 after that? Um I've got a actually got a list of things that I that I'm working on um sort of like post beta and even after the stable release. So yeah, I've got a

  131. 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 uh tool approval is a good one. So like say you want the

  132. LLM to be able to invoke like a refund customer tool but it needs human approval if the refund amount is greater than $200. Um so like stuff like that. It's kind of these more advanced complicated tool use cases. Um and then there's other agent stuff like uh 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

  133. these like so-called Ralph Wiggum loops of where you can have like infinite loops of agents doing things. So, a lot of like agent loop configuration and stuff like that. 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 it 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,

  134. "Okay, is it behaving like how I would expect, you know?" Uh and it'll almost like the the DD of you know, like agent debugging [laughter] in a way. >> The AI DD in a in a lot of ways. That'd be that'd be really interesting. I almost imagine then you could have its own agent MCP where your Claude code or LLM whatever is kind of can interact with the agent and talk to each other. Yeah. And then there's a there's a you know, there's already a bunch of PRs

  135. open from the community and one of the ones I think that is most requested or most on everyone's minds is uh so-called like sub agents. Um 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 a you know, one primary agent and in its tools method, maybe I don't only return tools I can also return other agents.

  136. So, it can actually call on, "Okay, you are sort of like an 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 review. Hopefully, I get it reviewed today and but at least get kind of 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

  137. 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 we're hopefully getting to a good destination. Yeah, co-piloting together. Yeah, exactly. >> great place. Uh that there kind of similar you kind of answered a couple questions in the chat I sense of can you call an agent from another agent doesn't sound like it's possible. >> Yeah, that's it. That is something that's coming in terms of agent orchestrate

  138. orchestration and everything like that. Again, thanks so much for everyone being in the chat. I wanted to talk I want to walk through a demo that I actually built and I'm curious to get your 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. 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

  139. are with Taylor talking about the AI SDK that was just released last Thursday, Friday, Thursday. Um and so it's only been out for four days. Um and so it's been crazy be able to see how many people are already building with it, how many like Taylor said how many new PR's have already been added. But just walking through the possibilities of it as well as just talking through why it was built in the

  140. first place. So if you're here, let us know you're here. You have any questions we'll try to get to them as best as possible. Yeah, I wanted to talk show this little demo that I built. It's actually live right now. I'm not going to tell everyone the the URL just because I don't I don't want to crash while we're on on on stream but I'll share it at the end so that you can have it as well as a GitHub repo. And I'll put it in the description if you're watching this in

  141. 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. Yeah. 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

  142. necessarily save any of my thoughts on it or anything like that. And so I want [clears throat] to build a thing using the AI SDK that either uh 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 um the vector storage uh uh part of the AI SDK to auto chunk that embed. And this is one cool thing that I

  143. actually didn't know. I'm curious I'd get your thoughts on like what's the difference between storing something in vector using OpenAI's vector storage versus putting this in Postgres PG. >> Yeah. Yeah, this kind of came up in a Laravel idea. 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

  144. I mean, I guess let's start with like um the PG vector stuff. So like in the AI SDK 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 Cloud's uh Postgres has it. Um and then you can run queries on that to find um things that are similar to your

  145. query. So like if I to go back to our Mexican food example, which we both like, like if I stored like um 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. They're similar ideas. And so that that that's the purpose of semantic search is to be able to pull back things that are related. So, you can actually store those

  146. 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 you know, 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

  147. out of the PDF, you're going to have to vectorize it. Um, you're going to have to store it. Um, so it is kind of convenient just to be able to like throw files at OpenAI or Gemini 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. Yeah. No, I I love that. Um, and so yeah, this this works in the sense of the there's a couple cool things that I really love is the how easy it is to take an attachment, let's

  148. 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 I save a lot of screenshots either on my phone or just like I'm 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 AI SDK, and then two, be able to show as much as possible off of the AI SDK. So, I want to grab

  149. we'll go to we'll go to Laravel News. I want to find like a quick uh little link that I might be able to save. Um, so let's go ahead and maybe we'll see see here like OpenAI releases GPT-5.3 Codex. 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

  150. uh async things that's happening then on in the background where um I can still you know go to different links uh but it's still being stored and retrieved in the background uh looks like because it's uh because it's a JavaScript front end I this this failed. So, here we're going to upload a screenshot instead. I'm going to go back to that link and I'm just going to upload we'll we'll zoom uh we'll zoom out here.

  151. And I'm just going to paste a quick screenshot. Just of this. There we go. We'll go back to here. We'll go paste this in and upload and analyze. So, what should be doing within the uh 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

  152. 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 uh a detailed description of the image. Screenshots, uh top header, uh large rectangular card with rounded corners and a soft drop shadow. All all of the neat things that

  153. you might want from image. Uh it's a lot more than I actually thought it would be from just one one simple image. But the neat part about this is uh 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 tell you say what I did in this particular demo. Oh, man. Um I like there's something >> would be a good answer question, I

  154. guess. There is something just like really nice about for simple stuff just throwing like a wire pole on a div and it just like works. [laughter] So, if you don't have anything else Yeah, if you don't have tons of users like or maybe it's just a tool for yourself even, you know, like you're the only user, which I think in the age of AI we're seeing more sort of just like personal software, right? I'm just like tools people are creating for themselves that

  155. are really intended just for them. I think throwing like some polling or especially with Livewire I mean it's so easy with wire polling. I guess Inertia has polling as well now since Inertia 2. I think that's nice, but if if you're in like uh more of a production use case like let's say like Laravel Forge or Laravel Cloud's 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, you know. Um

  156. 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. Yep. Yeah, in this particular demo I did use broadcasting with with the use like with with Reverb and then like the use Echo hooks to watch for that so that way when we're you know, when we're grabbing something from the web or we're up uploading a screenshot for example, if I go into

  157. here and I just say something like uh I don't know. We'll just grab this from the from the AI SDK. And if I go into and 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 5 seconds or whatever and it will update automatically, but this is using

  158. specifically for this demo, it's using the vector storage to store all of this. Once it does read it from the vision, and then we're getting a structure 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

  159. um remembering those particular agents. Uh but then we also have uh streaming set up as well as file search and web search. These are the two tools that me personally tell you I Those were like incredibly easy and I loved having them to not have to uh I I I've I've built a couple AI tools where I'm relying on uh maybe my maybe, you know, web search

  160. within PHP, for example, instead of giving AIs the tools to be able to do it themselves. Yeah. Uh I'm curious of like what were your We kind of talked about in tools, but what was your thoughts on those three tools, the file search, web search, and um the image search? Uh file search, web search, and web fetch are the three built-in Well, I guess there's also uh similarity search we haven't really got into, but Yeah, I mean, I

  161. wanted to give people um you know, I think these are just like a incredibly common use cases. Um web search and web fetch are 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 for or when I'm writing the docs for a

  162. new framework feature. So, one thing I will do is go into the docs, fire up Claude 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

  163. um let's see. Uh maybe maybe we'll say what was that latest model from open AI? We should see it's search the specific things that it already has pertain to my local user and we should see those tool calling that should be made here. So it's searching the knowledge base and then it found you know the open AI model mentioned is GPT 5.3 codex in our saved notes. So this is a use case of

  164. particular conversational API that we kind of talked about. In the sense of it's remembering the things if I was to ask without having that context of something like what And you even had the tool call thing was that you even had the tool call thing like show up to us this really fancy. That was that was a fun I I I didn't know that that was possible because I've only ever worked with chat where it was just returning text so

  165. returning the when it returns and I could be wrong or or misremembering but I would I think when you return the structured output it 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 within you stream is that correct? >> Yeah yeah yeah when you stream stuff you get sort of like tool call start tool

  166. call end you get like you know these various events for when tools are being used. Yeah I'm curious actually haven't tested if I can search on the web then of like what what link is that associated to on the web I think I marked this down so it doesn't actually go go on call but I'm just curious now >> [laughter] >> if that if that does it couple questions some people said I didn't

  167. I said there it is using a web search tools. Okay it'll blog post we'll call that. >> something yeah. >> Yeah, we'll we'll call that good. Open AI open AI blog post, which is probably what Laravel News is referencing. So, we're we're good there. Uh some people said I I made it easy to guess the URL. Yeah, I'm sorry. I mostly I did not scale I I think I'm using a very small Laravel Cloud server for this. Uh so, if it if it crashes, that's not

  168. Laravel Cloud's fault. That's my fault for not scaling it up. Um What did you use to build this, Josh? Is this a Is this a Claude code special or is this cursor or what? Is this Is this all handwritten? This is mostly Claude code uh with some handwritten stuff for the for the chat. So, I did figure out quickly uh what stuff uh Claude code doesn't seem to do a great job um with and the use stream stuff of uh it took me took me a while to figure

  169. out that uh it returns the JSON for structure for for streaming um and being able to kind of push that back and forth. I was trying to do some uh I whenever Claude code 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 cuz I know it's a lot cleaner than that." That's when I start having uh some second guesses. So, most of this was built um within Claude code with with me referencing by hand each

  170. 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. Um 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

  171. all kinds of things I didn't expect. So, [laughter] um 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. Um why don't I fire up uh

  172. um 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 of how you might maybe help start from scratch and and I'd be curious to see your your thoughts on what are the things you're kind of looking for to make sure everything is working the way what what kind of revisions you you look at. Um the idea that I have

  173. 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 11 Labs API as a voice to be able to talk

  174. to it, transcribe our voice, get an answer, then have it talk back to us. Okay. Yeah, that sounds good. Um so, let me go ahead and share my screen again real quick. Uh so, the for those still in the chat with us, what's uh uh what's your what's your favorite drink of choice maybe while you're coding? I know Taylor just took a swig

  175. of a Coke Zero. Uh so, who who else is Coke Zero fans or what what else is your your particular drink of choice? How many Coke Zeros have you consumed so far today, Taylor? Uh I think like three. I drink I'm I drink a lot of Coke Zeros. So, that's I I saw it 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.

  176. Um but then 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 Taylor, what IDE do you use? I'll say that before you Oh, I'm still using a a

  177. 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 Cursor, right? With them like kind of leaning more into their agent mode as like the default view even for booting up the IDE. And it's like, you know, um previously when we were like handwriting so much code, I remember when I was first starting in my like career using

  178. 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 and 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 handwrite all of the code? I'm curious to see like how the IDE arena sort of like evolves with like, you

  179. know, VS Code and and PHP Storm and you know, Sublime Text is more of almost more of an editor than an IDE, but um I'm still using Sublime Text paired with uh Claude Code and Open Code. I love it. I'm 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 I kind of like the when I'm writing handwritten stuff, I don't want like even autocomplete maybe a little bit of

  180. auto-complete I'm okay with. >> Yeah. But most of the >> I'm kind of the same way. Yeah. I find Zed and Sublime like Zed is the closest thing to Sublime that like I've ever used that's not Sublime. You know, I find them so similar. I've not I've 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 cuz I was using VS Code for the longest time. Um People in the chat want water. We got Coke Zero. A lot of water.

  181. Boring. >> [laughter] >> Water for code. Pepsi Zero. I'm a villain. Yeah, that I don't know what he >> Really? >> [laughter] >> I Sometimes I'm at like a >> or Pepsi Zero? Uh I I don't know if I've even had Diet Pepsi. I've only I think I've only had Pepsi Zero. But sometimes you're just 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. >> [laughter] >> That's true. I do like Dr. Pepper Zero.

  182. That is like Yeah, that is good. I agree with that. That's good. That is that is one of my specialties. 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. And I actually went to the store this morning after the kids went to school cuz 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

  183. like this this is one of my people. Right? >> [laughter] >> Full size Cans 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 you've ever had the thought of of putting Coke Zero maybe like getting a whole bunch of 2 liters putting it on tap and and doing that or if you just

  184. like can all the way. Uh I mean I 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 Oh, yeah. Yeah. But to me to me actually the peak is like glass bottle Coke Zero, which is not easy to find to be honest. Um but they do have it and I've I've found

  185. it occasionally. More in Europe actually than in the United States, but a glass bottle Coke Zero that that really hits different. I I I maybe we'll get it have 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. Uh but I I pictured 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

  186. things? But we'll do Taylor blind tasting Coke Zero behind like glass, can, uh 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 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

  187. Jarvis. Okay. 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 I was just thinking we need a Laravel new dash dash I was just thinking we need a Laravel new dash dash Taylor that just like it's all my own opinions. Ooh, that'd be awesome. >> usually Oh man, this is a good one. I mean it

  188. 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 past or whatever. Mhm. Yeah. Yeah, I I I I know if you were dash dash react and then dash dash cuz you can put all that into one >> Yeah, I don't really do that. Yeah, I don't I never do that. Yeah, do you do you do the empty empty prompt then

  189. in terms of like the 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. So, like I I actually forgot that you you can actually leave off the app name, I guess. It'll just ask you. Okay, I kind of forgot about that. But, I usually I usually provide the app name. Yeah, I I provide I provide the app name as well. But, yeah, one of the things I've learned with when I'm scaffolding something out with

  190. with LLMs like Claude code for example is 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 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 I like the I like the blank side. Um

  191. we will Um I'm not going to use the heard MCP. I'm going to use Claude code. Um and then 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? Uh

  192. 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 AI SDK where >> [clears throat] >> 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." Um so, maybe I'd define 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

  193. let the model kind of like, you know, paint between the lines from there. Yeah. Yeah, I kind of go I kind of 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 yeah, I found that Yeah, that's the way I like to do it. It feels like I'm I am setting the the course, for

  194. example. Right. Yeah. >> Um Let's go ahead and install the Laravel AI SDK. >> [snorts] >> And then we uh we uh I believe we publish uh Yeah. Um I always forget the Yeah. We need to publish and then we can search for it. Yep. tags Yeah, I got it. Yeah, service provider. Oh. Okay, yeah, I think that works. Yeah. There you go. That's just the

  195. Yeah, 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 uh >> We 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 um some environment variables cuz that's usually what I would do next. So, I'm

  196. 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 uh don't pull those up anywhere. Um So, we're going to use 11 Labs. And we're going to use uh probably OpenAI SDK cuz it makes it a little bit simpler.

  197. I'm going to copy this. Perfect. All right. And so, Terry, you said that you had

  198. used uh Claude code mostly in like open code. Do you Do you do uh like the dangerously Pretty much, yeah. >> all the time or do you Do you Do you watch it? >> much. Um No, I pretty much do this and 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 of weeks for those For those who do use Claude code, um if you go to and bypass or

  199. dangerously skip permissions, you can still do the shift tab to go into plan mode, for example. Um without going back and And you can go back into bypass permissions on. I I do that mostly cuz I always I always like to do plan mode um just to get things up and running. Yeah, I do too, especially for bigger features. So, I'm going to do uh PHP artisan um migrate and we're going to make sure I'm on the right one. Um

  200. Perfect. And so, we're going to in Claude code, we are going to build uh an application where we can upload or uh have some local markdown files. And using the Laravel AI SDK, we are going to

  201. take those markdown files and generate or and have uh an assistant be able to answer questions using the voice mode. So, uh when we talk to the assistant in an extremely simple UI

  202. uh they can transcribe our uh voice with voice-to-text from AI SDK, uh pass that to uh an agent to be able to generate an answer based on our markdown files. And then uh generates a response using the voice

  203. from AI SDK. So, I'm curious what was the difference between the Larvis directory and the Larvis agent directory? Um oh, are we in Larvis? Oh. Yeah, we're in Larvis. That's That's the This is This is the one that I already did. >> [laughter] >> Yeah, cancel that. Yeah, we'll cancel that one out. Uh we'll go into We'll go to Larvis agent. There we go. Thank you. Uh I already I already did this mostly

  204. because I wanted to something to show at the end if we either didn't have enough time or or if or if anything did. So, um but it's a 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 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

  205. work. Like, what's something that you either look at, something that you make sure you review? Uh 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 um I pull up the whole like diff in the GitHub desktop actually. >> Okay. And that way it's just like it it's really easy visualization of every file that changed and I can really

  206. quickly just kind of scan through them and see what's going on. Um and then I will usually clean up a variety of things. It might be like really nitpicky things like method order or where I put a method in the class. I kind of like organize methods logically or in a certain way that I like. Um I I haven't really reliably been able to automate that with like a with an AI guidelines or anything. And then like um

  207. I'll just kind of continue the conversation with the AI, you know, if like maybe sometimes it um it duplicated something or 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." 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

  208. have like one or two Claude code tabs open. I'm kind of working on a couple maybe one or two things at most kind of specifically um at a time, you know, I have I haven't really dug too far into like I've got you know, 10 different Claude codes churning on in parallel-wise task 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 um you know, I'm pretty simple guy I guess

  209. when it comes to the AI usage and how I use it. Awesome. Um so then have you jumped into the the open claw stuff yet? So for those who don't know, you can run open claw on Forge right now. It's super simple to get it set up. Have you jumped into it, Taylor, or no? I I've only like scratched the surface of it, you know, I have got an open claw like up and running when I was playing with the Ford stuff. I I can't say that I'm like super deep into it like automating my entire

  210. life, but I do love the concept. I think like I actually wrote my own Telegram chatbot for AI along like 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. Uh mine was just a simple chatbot. It had no other like functionality that open claw has, but I think it's a really cool project. You

  211. 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. We're doing some plan modes. Where do the 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

  212. 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 you >> 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 file search. Let's do that. Um and then we can text to speech. Let's do 11 labs.

  213. And we'll do we'll do a single session. It's a super super simple super super generic. Um I forgot to publish the um the skills for the AI SDK. So before it jumps into actually implementing this, I'm going to cancel out and do that. We have some questions um in the chat. If you're still here, thanks 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 uh specifically for Taylor

  214. about AI. I had a feeling Taylor didn't like AI much. What 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 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

  215. discourse for, you know, a chunk of 2025. It was this concept of vibe coding where you're like not even reviewing the code. And I think um I don't relate a lot or maybe don't um 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

  216. 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? >> [laughter] >> Yeah, I don't think I have seen too many

  217. 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 am telling it no, that was wrong. Let's think about this Let's do it this way instead much less. And I don't know if that's just because it's using skills better, it's using

  218. context better, or it's just smarter. It's always hard to tell in that aspect. You know what I'm sort of like >> [snorts] >> I curious to see where AI coding goes in the sense of like I I've seen Dax and open code kind of say similar things where 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 let's say they got like 10% better but they got 10x faster and like actually doing it I

  219. 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 it 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 and then

  220. like you know like here we've been waiting for 6 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 new 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. Um

  221. 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. Uh 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. Uh we have um some people in the chat are probably know a little bit more about me in that particular aspect. Um uh question about when you were creating

  222. the AI SDK what did you want Did you want to try and create a competitor to LangChain and and that suite of code or I guess your thoughts >> I sort of um I sort of approach things pretty fresh. Um I'm not really like a heavy user of LangChain or LangChain you know like or anything like that Uh um and I've built a lot of things in Laravel this way for better or worse to be honest over the years where I just

  223. 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. Um 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

  224. I can feel confident about and release into the community for like further iteration you know so like in in V1 of the AI SDK, I don't necessarily set out to solve every single um conceivable problem around developing with AI. I try to give like okay, here's a good foundation and like um 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 and you know eventually years um to

  225. where things can evolve from there but I try to put like a foundation in place uh to start from. Yeah. No, that's awesome. Um you mentioned like the fast code. Uh have you tried uh someone in the chat said Kimmy 2.5. You tried Kimmy 2.5 with this stuff? >> It is quite fast, yeah. And I think it's a glimpse of like man how like life changing OBS things get even faster. Yeah, and I'm with you though in the

  226. 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 um with with Opus 4.5 4.6 something like that or Codex um or a big feature but most time if I'm just like wanting to nail out certain things um either I'm hand coding it within Zed and I'm I'm just tweaking you know UI design or

  227. tweaking like how how I 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 Yes, it's good. I'm I'm asking questions about my code base. I want it now kind of thing. Yeah. Um 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

  228. 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

  229. 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. Um for me it's just a really quick kind of like review tool.

  230. Yeah. Uh and those of us just joining we're kind of using Claude code to help us generate a application using the AI SDK. 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 it 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

  231. 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 uh the same uh knowledge kind of model when we're when we're writing with it. Uh looks like it's almost done. Got his tests passed 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." You know? >> [laughter]

  232. >> It's like Some of some of my uh some of my personal um looks like it just finished. Some of my personal uh projects that I use I I have it set up with Rector, uh PHP Stan, and pint. And so, it's it's it's fun to have it make sure that it does does all of that. Uh is there anything uh 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?

  233. Ooh, that's a good question. Uh I don't know. Um I didn't I hadn't really >> though, too. Yeah, it can change. I did nothing huge jumps out at me. Um I've tried to like kind of coach it along with my guidelines as much as I can. Yeah. So, let's go. We We have a knowledge assistant that created. Looks like it's using the >> I'd even use the attributes. Nice. >> Yeah, that's okay. I love that.

  234. Uh so, a friendly knowledge knowledgeable assistant. Um and uh the documents do not contain enough information to answer the question, say so honestly. Keep your answers concise to the conversation. So, just everyone in the chat that knows we're we're building um an app that if we go to resources and docs, we can create a a markdown file in here, and maybe even ask Claude code to generate some for us. Um I might I might even do that uh just

  235. for fun. I'll say, um open up a new Claude code, and I'll say we have this app that uses markdown files about the user in order to answer questions. Uh find some info on Taylor Otwell, and generate relevant markdown files in the resources docs

  236. directory. Kick start that off. But the 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 documents audio. So I would assume hopefully it's using it in the proper sense where we're getting an upload of an audio. We're

  237. going to transcribe it. Um get all the docs in the markdown the resources docs directory, and then we're going to create a new knowledge assistant or new instance of the knowledge assistant, and with that prompt attach the attachments that we have in the markdown file, get it 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.

  238. Um And so is is 11 correct? I don't Yeah, that's correct. Yeah. Okay. Yeah, that is correct. Sweet. Awesome. Uh the the one thing the one thing that I've noticed and I don't know if this is just me not prompting well, but the one thing I have noticed within um specifically within like the react context within Laravel, for some reason when it does stuff like

  239. within like a controller where it's hitting in hitting our API, it's not an inertia like use form request cuz 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 Yeah, yeah, yeah. Then it seems to do well. Are you still on Axios user? user

  240. I 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, you know, in the next I I don't want to speak for what is 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 you won't have to really use Axios anymore with

  241. I don't even think we're including Axios by default anymore, which we do now in many different things. So, yeah, we're kind of giving people kind of dropping that and going a little bit lighter weight, but still giving people some of the like affordances of Axios. Yeah, I love that. >> I think Joe Tannenbaum's 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.

  242. I I don't know off the top of my head if Laracon Europe talks are being streamed, but you they're probably going to be recorded at the very least, so be 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 AI SDK, let's say you're doing this and I 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

  243. of elements, I mean 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 like what PRs come in or what sort of like community feedback is around this. Um you know, certain types of apps are sort of more vulnerable vulnerable to this than others depending on the 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

  244. serious in terms of like prompt injection or things like that versus some other use cases. So, um 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. Um can Laravel AI SDK be extended or improved with plugins or add-ons? Um

  245. Yeah, so I think like one of the cool areas we'll see sort of like community extension and collaboration is um 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 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, you know, on packages as a tool that

  246. other people can use. Um 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 AI SDK is like distributing those types of things um throughout the community. That's awesome. I'm curious to know how much uh uh this got it right on you in terms of biography, philosophy, and projects is what what Cloud Code So, we have we have

  247. biography, um This all looks correct so far. And we just asked Cloud Code to generate all this for us. So, it's I'm assuming pulling uh just internet accessible things. Um Company grew from around eight employees to start 2024. Yeah. Yeah, this is all Yeah, that all looks correct. Simplicity and elegance.

  248. Warned against Cloud 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. >> [laughter] >> You know, probably as most projects go. In the early years of Laravel, you know, we were moving fast and breaking things. But lately I've tried 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 is even bigger now for AI because you

  249. almost have to have like uh oh, like things that happened a year ago, which models are getting smarter and 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 some projects. Uh Yeah, cool. Okay, well, I'm curious to

  250. see if it's decent, yeah. >> Yeah, I'm curious to see how this works. Let's Let's go ahead and composer run dev. That is That is my preferred way of getting things up. Are you still the same way or PHP artisan server? I use uh either this or uh Herd. Okay. Open this up. Okay, we have Larvis. Uh I don't know >> UI. My sound Yeah, it's it's very minimal. Yeah, let's Let's go ahead. I don't know if my sound

  251. is going to work. Let's see. Can you tell me a little bit more about uh Taylor's way of thinking through things when he builds a project? Ooh, audio must be webm ogg web. I actually ran across this, I think, in my initial thing because I think it's it tries whatever AI did in the initial thing, I think it tried to save it as webm and

  252. by default, that's classified as video instead of audio. >> Oh, wow. Okay. Um Web assembly. Have this error. I think it's because when we initially try to uh save the vid audio file saves it a video format of it question mark >> [snorts]

  253. >> back to the chat if people were want to contribute to the level SDK on any specific task or areas you would like the community to help out with that is a good one I mean some of the recent PR so I've been getting around been around just like adding different providers so like someone contributed a deep seek someone contributed a mistral this is also like a tricky one because some of the more complicated features like um you know some of the conversation stuff

  254. I want to improve like I've got stuff in my head and sometimes it's hard and like if the PR is coming in and sort of like conflicting with that you know so I 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 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

  255. that might be a good one someone could work on but it's a little bit of a a meaty one you know it's not a not trivial probably awesome so yeah Taylor had 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 a 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

  256. before the response is actually generated you have some form of human interaction to say hey this is good to go like let's run that kind of thing right yeah exactly those would those would be great um opportunities uh someone's mentioned token usage that would be interesting I don't know if there's anything currently built in, correct? You can get back to token uses from like a given prompt or whatever or given generation, but um we're going to be

  257. building a lot of token usage tracking stuff into Nightwatch. So Ooh, interesting. >> Yeah. People can kind of people can of course sort of roll their own cuz you do have access to that, but we'll be also providing that in Nightwatch. All right. Let's let's go ahead refresh see if it 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?

  258. Uh I uploaded some markdown files. Please try again. PDF. Oh, you can't upload markdown files? >> Markdown files. Uh I I would assume in our our agents for the uh chat we're just uploading we're just uploading we're just collecting the documents as markdown. >> I was passing them. It should just like inject them into the uh Yeah. You know what I mean? Yeah. Instead of uploading

  259. cuz we get this error instead of uploading the markdown files let's inject them directly into the prompt. Yeah, like Should be like that. Yeah. See if that works. See if see if that works. >> I actually noticed that as well that OpenAI doesn't accept a whole lot of file formats on these attachments. Um I was surprised like you I don't think you

  260. can upload like a CSV. And it has to it's basically like PDF or image or I don't know why exactly or something before you do that. >> Yeah, yeah, yeah, yeah. >> I guess maybe are they trying to uh not to comment on OpenAI's business plan or anything like that, but are they trying to try to move everything into vectors? Like you do that first and then we'll do that. Uh that's very very interesting. Um It looks like it is making the correct change. So I saw where it was there.

  261. >> Yeah, I saw that in uh Yeah, so we're doing the docs with the question and prompt. So, bigger prompt, but we don't We probably be a little bit long longer of a wait before we get an audio response if we're generating the prompt, pushing it to 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. I don't know if you you even tried it, Taylor, like the

  262. 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. you with the prompt or something like that? Or system prompt? Yeah. Which would make this a lot faster, at least for this this demo. One more time.

  263. 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, >> [laughter] >> consider Taylor Otwell's development philosophy.

  264. Focus on simplicity and elegance. Ensuring that the package is intuitive Okay. It is working, but yeah, yeah. >> [laughter] >> Uh doesn't look like it was uh it was sharing my uh sharing my audio. Um but yeah, that worked. We have it. Uh I'm assuming we could uh speak. Uh looks like we have a little bug speaking thing. Yeah. Oh, there we go. Maybe I

  265. added Maybe clicking it a couple times added it. I assume I think because we're still saving it as uh memory in terms of like the um as controller do we have a Okay, it probably is just a one-off. It probably would reset then. I'm assuming. >> Yeah. Yeah, I think so. Sweet. Awesome. It's cool to be able to 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 that I like

  266. about the AI SDK. Um is like we have an 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.

  267. >> Output schema, okay. Things like that. Um and then with that agent, we can then uh create a new instance of it in things like uh controllers where we're creating a new instance of this knowledge assistant or passing it that prompts. So, 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, um images,

  268. uh and embeddings for example. And then it's as simple as using things like audio of the answer we're generating with and getting that particular response. And then it's converting that on the front end. But yeah, it's it's it's crazy how basically that whole demo was just really one controller if if in if in 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

  269. 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 going to Well, we're probably coming short up on time. So, is there any

  270. um I'll jump into maybe one more question with 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, um and also getting a lot of questions for Taylor. I know uh Taylor, we're appreciative of you and your time of being here. Um For sure. Uh let's go ahead and see uh

  271. I don't know. There's not There's not too many more questions. Taylor, what 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 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 require Laravel/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,

  272. 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 uh hopefully can take it to um you know, whatever you're doing at work or whatever kind of like business you're building or whatever, and hopefully it makes uh your life a little bit easier. Awesome. I love it. And then for those who saw the uh the other kind of demo that I that I had kind of uh put together for um the kind of ragged instance and chatting

  273. with it. Um I'll put that link in the chat as well. Uh but I'll also be able to uh uh on that demo will also have like the GitHub link so that you can kind of take a look through what was what was built with that. Um uh I guess one last question uh to to kind of go through that as well as someone mentioned in terms of like prism PHP cuz I know you you mentioned a lot of some of the stuff in the background is using prism PHP. Someone mentioned um

  274. what does it look like to switch? What are some of the gaps at the moment in terms of switching? Um I think of yeah, we do use prism for some of the text stuff under the hood. Nice package uh built by TJ Miller. Um I think of prism and AI SDK a little bit like I think of query builder and eloquent. So like prism has kind of this fluid query builder interface for like querying and doing AI things. And I think the AI SDK's like

  275. 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 uh of abstraction in terms of like code organization and like reuse. Uh which I think is kind of like the main difference between the two. Um and then it kind of like goes beyond in a little bit bit around like the similarity search, the file search, some of that stuff that is maybe not

  276. available in prism but is available in the um AI SDK as well as some extra providers like a 11 labs and things like that. Um so yeah, it's just a little bit higher level of abstraction um to get started and then of course um maintained here by us at Laravel but again using prism for a variety of things under the hood and uh yeah, great library. Awesome. Yeah, thank you so much everyone in the chat. Uh thank you for being here and for joining

  277. us on this journey. And for those who are watching kind of in on demand, uh thank you so much for watching this. Feel free to like and subscribe so that we can have additional content be pushed to you as quickly as possible. Uh but thank you so much Taylor for joining us and >> Yes, it's fun. for everyone getting started with building within Laravel and maybe AI, you can use composer require laravel/ai to get started um and use Laravel boost because it does have a scale to be able

  278. to generate some of those things even like that little demo that we just did. Simple, but it was easy to show how the LLM's 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

  279. in favor of favor of Taylor and the Laravel team. But thank you all so much. Thanks. See you.

just you here