YouTube2Text

Building AI Applications with the Laravel AI SDK — Transcript

by Laravel · 24,247 words · 3,696 segments · language en · Watch on YouTube

Full transcript

  1. 0:03And we are live. Hello everyone. Good to
  2. 0:06see you all. Uh we have very special
  3. 0:10guest today. We have the Taylor Otwell.
  4. 0:13Uh Taylor, how are you doing this
  5. 0:14morning?
  6. 0:15I'm doing good. I'm rocking and rolling.
  7. 0:17How are you?
  8. 0:19I'm doing pretty good. It was a It was a
  9. 0:20good weekend for me. Hopefully everyone
  10. 0:22in the chat. Uh I know we have already
  11. 0:24had quite a bit of people um in the chat
  12. 0:27already. Uh so a lot of people waiting.
  13. 0:29So if you are here and you are uh ready
  14. 0:33to see what the AI SDK has in store for
  15. 0:37us and also just to hear Taylor's
  16. 0:38thoughts on the AI SDK, why he built it.
  17. 0:40I'm excited for that personally. I
  18. 0:42haven't gotten a chance to talk to
  19. 0:43Taylor yet about the AI SDK
  20. 0:45specifically. Uh but if you're here, let
  21. 0:47us know where you're watching from and
  22. 0:49um I guess Taylor, what's a good What's
  23. 0:51a good question? What's something that's
  24. 0:52been on your mind like outside of work?
  25. 0:54Like maybe TV show, what something like
  26. 0:56that? Oh man, I don't even know. Um
  27. 1:00everything's been a blur since I did the
  28. 1:01[clears throat] AI SDK and then I was in
  29. 1:03um
  30. 1:04India and Dubai for Laracon India. So
  31. 1:07like I feel like I've been all over the
  32. 1:08place. Yeah, I feel like this is like
  33. 1:10maybe the first week I feel like I'm
  34. 1:11kind of getting back in the groove.
  35. 1:13Um There you go. Yeah, so I don't know.
  36. 1:15I don't even know what's going on in the
  37. 1:16world.
  38. 1:17>> [laughter]
  39. 1:18>> I guess what was your Whenever you
  40. 1:20travel somewhere, what is like the the
  41. 1:23food or like thing that you try to make
  42. 1:25sure you you do?
  43. 1:28Mhm.
  44. 1:29I try to just like have
  45. 1:32especially if I'm going somewhere like
  46. 1:33India, um try to have like whatever food
  47. 1:36that the people there really like. So
  48. 1:38Okay. For example, like the first time I
  49. 1:40went to India,
  50. 1:41I was the at the hotel and like the room
  51. 1:44service guy, I got back kind of late to
  52. 1:46the hotel
  53. 1:47and he was like, you know, do you want
  54. 1:48any food? Like what do you do? It was
  55. 1:49like almost midnight. And he was like I
  56. 1:51was like, just bring me like whatever
  57. 1:52you would eat at this time. Like
  58. 1:55whatever your favorite thing to have
  59. 1:56would be, just like bring that and I'll
  60. 1:58just try it. Uh so I just try to do
  61. 2:00stuff like that.
  62. 2:01Um
  63. 2:02just so I can get a feel for like what
  64. 2:03people are like, you know, what they're
  65. 2:05really doing in these places.
  66. 2:07I love it. I guess that it for everyone
  67. 2:09watching. I already see a bunch of
  68. 2:11all over the place. So we got
  69. 2:13Evan from Switzerland, Bakersfield,
  70. 2:15California. Glad to see you here.
  71. 2:17Albania, Kuwait, UK. I love just like
  72. 2:21the uh how how global everyone is.
  73. 2:23India. Um good day from Pakistan. I
  74. 2:26guess everyone what time is it for you
  75. 2:28right now? I always love to see that.
  76. 2:30And then also kind of similar to Taylor,
  77. 2:32what is what is the thing that you
  78. 2:35always tell people to try whenever they
  79. 2:37are visiting your region? So food that
  80. 2:40you always tell people to try.
  81. 2:43Oh, that's a great question actually. I
  82. 2:44think like in Arkansas and maybe other
  83. 2:46states in the south, a lot of people
  84. 2:48like to try the barbecue. You know, and
  85. 2:49when I say barbecue, I don't mean um
  86. 2:52Like Texas style.
  87. 2:52>> like
  88. 2:53Yeah, yeah, like barbecue with like
  89. 2:55barbecue sauce, like pulled pork,
  90. 2:58brisket with barbecue sauce, stuff like
  91. 3:00that. Around here it's a lot of like
  92. 3:01pulled pork. But um
  93. 3:03Yeah, in Texas it's more like the
  94. 3:05brisket, you know.
  95. 3:06Yeah, that makes sense. I
  96. 3:09I have not been to Arkansas. In In
  97. 3:10Arizona, I guess I would tell people to
  98. 3:12try any hole in the wall Mexican
  99. 3:16restaurant. Like that would be my go-to
  100. 3:18to
  101. 3:18>> Yeah. There are a lot of good Mexican
  102. 3:20places here, too. It's so good.
  103. 3:22>> Yeah, it's it's great. Unless you're
  104. 3:23like in Scottsdale, then there's some
  105. 3:24like good burger places that I would
  106. 3:27recommend. Uh good old Greg's sausage
  107. 3:29roll. I have not had one, unfortunately.
  108. 3:31I've heard good things.
  109. 3:32Uh 9:00 p.m. Dubai time. Well, thanks so
  110. 3:34much for staying up staying up late. Uh
  111. 3:37we got 14:00 here in Brazil.
  112. 3:39Uh 10:03 p.m. in Pakistan. I think that
  113. 3:43might be Oh, never mind. 1:03 a.m. right
  114. 3:45now in PH.
  115. 3:48All awesome. I love it. Macedonia 16:03.
  116. 3:51Glad or 18:03. Glad to have you all
  117. 3:53here. Any Ghanaian developers in the
  118. 3:54room? Says Ovak for you.
  119. 3:57Um Joshua, what is going on gents? I'm
  120. 4:00excited for this. Well, we're excited to
  121. 4:01have you here, Joshua. Glad to have you
  122. 4:03here. Um and Liam says, I'll buy you a
  123. 4:05sausage roll next time you're in the UK,
  124. 4:06Josh. Okay, sounds good to me. I am
  125. 4:09always down for some food.
  126. 4:11Uh I did have Taco Bell when I was in
  127. 4:13the UK, so and it was Well, that's
  128. 4:15actually pretty good.
  129. 4:17Man, I've got a Taco Bell that's like
  130. 4:18right outside my neighborhood. I mean,
  131. 4:20I'm talking it's like across across the
  132. 4:21street, basically. I didn't know I
  133. 4:23didn't know this about you. If you If
  134. 4:25you love Taco Bell, then that's awesome.
  135. 4:27I love it. It's so quick. I can like run
  136. 4:28over there and get like lunch and be
  137. 4:30back home legit like 10 minutes. Even if
  138. 4:34I eat at the restaurant, you know. Hey,
  139. 4:36>> [laughter]
  140. 4:36>> what's your What's your go-to current
  141. 4:38Taco Bell menu item right now? Oh man,
  142. 4:40like if I just want to be like really
  143. 4:42efficient in and out, I'll do just like
  144. 4:44two bean burritos and a drink and
  145. 4:46>> Okay.
  146. 4:47crush them and then dip out of there.
  147. 4:48I'm It's like 5 minutes.
  148. 4:51What do you get? I I get
  149. 4:54um like either the cheesy bean and rice
  150. 4:56burrito. Like that's kind of like one of
  151. 4:58my go-to. Or I always love like anything
  152. 5:01chicken from them. So like the There's
  153. 5:03the the cheesy chicken chipotle
  154. 5:05flatbread thing. I like that.
  155. 5:07>> Yeah.
  156. 5:07Um but yeah, like cheesy bean and rice
  157. 5:10burritos I've always had since I was
  158. 5:11like in high school, so those are kind
  159. 5:12of like my
  160. 5:13you know, uh go-to for nostalgia's sake.
  161. 5:17Yeah, for sure.
  162. 5:19And then uh Baja Blast. I used to do
  163. 5:20full sugar. Now I'm Baja Blast Zero.
  164. 5:22Mine's Mine daughter does the Baja Blast
  165. 5:24Zero, too.
  166. 5:25Yeah. I I I tried it full sugar again
  167. 5:28like for the first time in like I don't
  168. 5:29know, 10 years and I was like, "Wow,
  169. 5:30this is This is a lot."
  170. 5:33I can feel it.
  171. 5:35>> Awesome. Well, glad to have everyone
  172. 5:36here. It's It's crazy to see how many
  173. 5:38people are here mostly I to see Taylor
  174. 5:41and also to hear about this AI SDK.
  175. 5:44Um so, if you do have questions in the
  176. 5:46chat, be sure to drop them. I'll try my
  177. 5:48best to be watching, but mostly the goal
  178. 5:50of this live stream is one to get
  179. 5:52Taylor's thoughts on the AI SDK, what it
  180. 5:54is, how you would build with it within
  181. 5:57Laravel, and maybe like why it was
  182. 5:59built, and then two, hopefully like the
  183. 6:01towards the latter half of this stream
  184. 6:03being able to to build something.
  185. 6:04There's There's some projects that I've
  186. 6:06I've built um that we can kind of show
  187. 6:08off the AI SDK and just like what's
  188. 6:11capable of, but I think like the the
  189. 6:14perfect part is being able to say,
  190. 6:15"Okay, what actually is capable when
  191. 6:17you're building things?"
  192. 6:18Um and then the why. So, again, if you
  193. 6:20do have questions, again, everyone's
  194. 6:21kind of shouting out where they're from.
  195. 6:23I love it. Keep doing that. Um it's
  196. 6:24awesome to see people from all over the
  197. 6:26world being able to come together and
  198. 6:28say, "Hey, this is some cool things that
  199. 6:30we're building with this cool software
  200. 6:32that we love."
  201. 6:33Um so, Taylor, powered by Taco Bell, uh
  202. 6:37what was the
  203. 6:39reason like when did I I I think like
  204. 6:41the first thing I saw you uh start
  205. 6:44talking about the AI SDK? It was
  206. 6:46probably I don't know, probably in
  207. 6:49October, November of last year. I could
  208. 6:51be wrong on the timeline, but why did
  209. 6:52that come into [snorts] fruition? That
  210. 6:54was one of your projects, I think, that
  211. 6:55you kind of picked up and you're like,
  212. 6:56"I'm just going to I'm going to dedicate
  213. 6:59my life to this."
  214. 7:00Yeah. I mean, obviously everyone was
  215. 7:02just kind of tinkering around with AI
  216. 7:03stuff
  217. 7:04as they have been for the last few
  218. 7:05years, and um
  219. 7:07you know, it's just like such a
  220. 7:09important part of the dev workflow at
  221. 7:11this point. It felt like we needed some
  222. 7:13sort of first-party opinion on
  223. 7:15interacting with AI providers. I mean,
  224. 7:17just like we have like opinions on
  225. 7:19sending email or like queuing jobs, and
  226. 7:21just like
  227. 7:22this [clears throat] is becoming such a
  228. 7:23common part of like what people
  229. 7:26do when they build apps, um
  230. 7:28that made a lot of sense to bring
  231. 7:30something first-party and like have like
  232. 7:32an offering here. I usually try to think
  233. 7:34of like if I'm going to build something
  234. 7:35into the framework,
  235. 7:37I kind of think to myself like
  236. 7:39is this applicable to like 70, 80% devs,
  237. 7:43you know, in in the Laravel world. Like
  238. 7:46if I'm debating whether something needs
  239. 7:47to be in the framework. Yeah. Um and
  240. 7:49then like
  241. 7:51for a package like the AI SDK is maybe a
  242. 7:53little bit more lenient. Like is this
  243. 7:54applicable to maybe half of Laravel devs
  244. 7:56like in the world? Like probably so,
  245. 7:58right? With AI and probably increasing
  246. 8:00dramatically over time. So, made sense
  247. 8:02to have something and yeah, I did build
  248. 8:04it myself and it was the first package
  249. 8:05I've written at Laravel in a couple of
  250. 8:08years. The last stuff I wrote was a
  251. 8:11Livewire Vault and Laravel Folio.
  252. 8:14Yeah. And then as we were like building
  253. 8:16Cloud, building Nightwatch, I didn't
  254. 8:18really write a lot of packages at the
  255. 8:20time and now I'm kind of like back in
  256. 8:21the driver's seat with the AI SDK. I
  257. 8:24just kind of like one, [clears throat]
  258. 8:26most of other people here were busy with
  259. 8:27other stuff, right? So, it's [laughter]
  260. 8:28like So, someone has to build it, but
  261. 8:31everyone's busy. So, it's like, well,
  262. 8:33I I it'd be good for me to like get back
  263. 8:35in the code and like building something
  264. 8:37fresh and it sounds fun. So, like I'll
  265. 8:39tackle it and plus I had some ideas for
  266. 8:40what I wanted to do with it.
  267. 8:42Um there was already some cool stuff
  268. 8:44being done in the community around AI
  269. 8:46stuff with like TJ Miller's work on
  270. 8:48Prism, which we kind of built upon in
  271. 8:50the AI SDK. I kind of see like that is
  272. 8:53like almost like a query builder and
  273. 8:55eloquent type of relationship like
  274. 8:58you know, I think the AI SDK I tried to
  275. 9:00pull like
  276. 9:02a little bit more opinions on top than
  277. 9:04people might typically build in a in
  278. 9:07like a kind of a generic AI SDK.
  279. 9:10Yeah. Um
  280. 9:12yeah, that's that's awesome. I guess
  281. 9:13like for for those in in the chat some
  282. 9:15some quick questions um as well. So, uh
  283. 9:20um
  284. 9:22uh will be paid or free? It is already
  285. 9:24out, silent, and it is it is free. It's
  286. 9:26a free package, uh free package to use
  287. 9:28for the AI SDK. I guess for people who
  288. 9:30are just joining us as well, thank you
  289. 9:32so much. We're going to kind of take the
  290. 9:33first little bit talking a a little bit
  291. 9:35to Taylor about his thoughts about why
  292. 9:37built it, what's it for, um and then the
  293. 9:39second half of this stream we'll be able
  294. 9:40to jump into some code and see, okay,
  295. 9:42what what does this look like
  296. 9:43practically building um in today's day
  297. 9:46and age. Uh but uh for those joining,
  298. 9:49what is your favorite outside of the AI
  299. 9:51SDK? Cuz that's a little bit of a curve
  300. 9:53or or
  301. 9:53home run type of question. Uh what is
  302. 9:56your favorite Laravel package, either
  303. 9:58first-party or third-party? Love to hear
  304. 9:59it in the in the chat.
  305. 10:02Um
  306. 10:03Taylor, what's your favorite package
  307. 10:04that you've built outside of the AI SDK?
  308. 10:07Oh, man. If it's like something that's
  309. 10:09in Laravel, it'd probably be Eloquent.
  310. 10:11Um it's also the hardest thing I've
  311. 10:12pretty much ever built. Uh if it's like
  312. 10:15a package, I'm a pretty big fan of like
  313. 10:19um I think Reverb is cool.
  314. 10:21Um I think Echo is cool, like the kind
  315. 10:23of the real-time stuff in Laravel.
  316. 10:26What what else do we even have?
  317. 10:28Um
  318. 10:30Let me Let me Let me look at the docs.
  319. 10:31We've accumulated quite a few packages
  320. 10:33in there.
  321. 10:33>> There's quite There's quite a bit out
  322. 10:34there. I mean, I think Octane is pretty
  323. 10:36cool. Uh to some extent, like the bulk
  324. 10:39of Octane
  325. 10:40is sort of handled by other people,
  326. 10:42right? Like the FrankenPHP team and
  327. 10:44Swoole and stuff like that. And but uh
  328. 10:47just the ability to like boot the
  329. 10:48Laravel app and kind of keep feeding
  330. 10:50your requests really quickly.
  331. 10:52Um
  332. 10:53yeah.
  333. 10:54Uh Pete Bishop said, "My favorite
  334. 10:56package is Pennant. Cannot live without
  335. 10:57Fortify." It's crazy how many packages
  336. 10:59there there are that the Laravel
  337. 11:01ecosystem has, especially when on our
  338. 11:03Laravel YouTube channel during the
  339. 11:05advent season of last year. So, for 24
  340. 11:09days and then a special guest message
  341. 11:10from Taylor on the 25th day, uh we had
  342. 11:14one video for every package. And there
  343. 11:16were some packages that we we didn't
  344. 11:18make a video for. So, enough to have at
  345. 11:20least 24 videos is pretty crazy.
  346. 11:22Um and some of those could have been
  347. 11:23split up as well. Uh yeah, I I think my
  348. 11:26favorite personal favorite is Cashier,
  349. 11:28and I didn't really get into Cashier too
  350. 11:30much because when I started my Laravel
  351. 11:32journey, I started with um Spark. And so
  352. 11:35I didn't really have to touch cashier
  353. 11:37too much. It was kind of already done
  354. 11:38for me.
  355. 11:39Uh
  356. 11:39>> Yeah.
  357. 11:40But over the last year using cashier, I
  358. 11:42was like, oh, this is actually
  359. 11:43incredibly easy.
  360. 11:45Man, yeah, we're working on some other
  361. 11:46some new cashier stuff and some new
  362. 11:47fortified stuff actually.
  363. 11:49Um
  364. 11:50that hopefully we can show pretty soon.
  365. 11:51But like man, cashier is like
  366. 11:54that is a
  367. 11:56I don't think like back when I first
  368. 11:58wrote cashier like integrating with
  369. 12:00Stripe and all that, it is a lot of work
  370. 12:02to like catch all the web hooks, store
  371. 12:04all that. So
  372. 12:05Yeah, I think a lot of people find that
  373. 12:07package pretty valuable. Yeah, and
  374. 12:09especially if you look outside of the
  375. 12:11Laravel ecosystem, most people, you
  376. 12:13know, have their own set way of okay,
  377. 12:16here's how to not make Stripe incredibly
  378. 12:19difficult to work with and everything
  379. 12:20like that. So you know it's you know
  380. 12:22it's valuable.
  381. 12:23We got some people were saying Reverb,
  382. 12:25queues and jobs. We'll call that as part
  383. 12:28of a package. Working with queues and
  384. 12:29jobs is is incredibly easy. Yes, love
  385. 12:31for Octane.
  386. 12:33Prism is insane. I agree. We got inertia
  387. 12:36love, Laravel Nova
  388. 12:39favorites love. Octane,
  389. 12:42sale, Octane, Reverb, Fortify.
  390. 12:46I love it. I love it. Reverb is also
  391. 12:48cool. I I do love I do love Reverb.
  392. 12:50Makes everything makes everything easy.
  393. 12:53So Taylor, when it comes to the AI SDK,
  394. 12:56what is how is this different than maybe
  395. 12:59like working with AI
  396. 13:02in Laravel. So how is this different
  397. 13:04than like a boost for example or even
  398. 13:06MCP? Where does this
  399. 13:08SDK kind of fall into?
  400. 13:11Yeah. So like right now we have kind of
  401. 13:13three AI related packages in Laravel.
  402. 13:17I think MCP was actually the first one.
  403. 13:19So MCP is
  404. 13:22MCP stands for model context protocol.
  405. 13:25MCP, right? Model context Protocol.
  406. 13:28And it is basically a way to like I
  407. 13:31think of it as a way to like expose a
  408. 13:33standardized API for LLMs and AI things
  409. 13:37to talk to. So like I have an app on the
  410. 13:39internet and I want to allow like
  411. 13:42ChatGPT to do things or some other tool
  412. 13:44to do things with that, then I can use
  413. 13:46MCP to expose functionality and OpenAI
  414. 13:48started coming out with this new kind of
  415. 13:50like I don't even know if it's out of
  416. 13:51beta yet, but eventually like sort of an
  417. 13:52app directory of things you can like
  418. 13:54interact with from ChatGPT and things
  419. 13:56like that. That's all kind of powered by
  420. 13:58MCP.
  421. 14:01So then there's
  422. 14:03Boost, which is
  423. 14:06actually a little local MCP server that
  424. 14:08runs on your machine
  425. 14:10that Claude Code and Cursor and other
  426. 14:12like agentic dev tools like Open Code
  427. 14:15can plug into.
  428. 14:16And what it does is it just like makes
  429. 14:18available some tools to those agents so
  430. 14:20that they can query the Laravel docs,
  431. 14:21they can run Tinker commands, they can
  432. 14:23inspect your database schema. And so the
  433. 14:26idea is it improves like the quality of
  434. 14:28the Laravel code that things like Claude
  435. 14:31Code and Cursor can write because they
  436. 14:33have access to the latest docs. So like
  437. 14:35if I release a feature, you know,
  438. 14:37tomorrow in Laravel because we release
  439. 14:39every Tuesday,
  440. 14:40LLMs have like no idea that feature
  441. 14:42exists, right? Because they've been
  442. 14:43trained on old data, but Boost actually
  443. 14:47allows us to feed them like the latest
  444. 14:49info. So
  445. 14:50they always have access to the most
  446. 14:52up-to-date docs.
  447. 14:53If you're writing Laravel and you're
  448. 14:55using Claude Code or Cursor, which at
  449. 14:57this point you probably should be using
  450. 14:58some sort of like AI assistance,
  451. 15:01I think installing Boost is just like a
  452. 15:03no-brainer cuz it's like a free package
  453. 15:05that is probably only going to make the
  454. 15:06quality of your code better. So I would
  455. 15:09definitely install that. So that's the
  456. 15:10second AI package we released. And now
  457. 15:12the
  458. 15:13AI SDK is the third, which is sort of
  459. 15:15like
  460. 15:16a streamlined unified interface for
  461. 15:19working with different AI providers like
  462. 15:21OpenAI, Gemini, Anthropic. So, I want to
  463. 15:24generate some text or I want to stream
  464. 15:26some text or I want to generate an image
  465. 15:28or audio, I can do that with the AI SDK
  466. 15:32through a unified interface and kind of
  467. 15:33try different models, try different
  468. 15:34providers without going and like
  469. 15:36researching the What What is the you
  470. 15:38know, what's the HTTP endpoint for
  471. 15:39generating image on Gemini and now what
  472. 15:41is it on open AI?
  473. 15:43It's just a really streamlined way to
  474. 15:45work with AI.
  475. 15:46Yeah.
  476. 15:47Yeah, I love it. Yeah, someone someone
  477. 15:50asked the question
  478. 15:51for someone that does not know what
  479. 15:52Laravel AI SDK is, how would you
  480. 15:54describe it in a few words? I think
  481. 15:55Taylor just did that, but I think if I
  482. 15:57could put it into other words and maybe
  483. 15:59Taylor you can correct me. It's like an
  484. 16:00eloquent way of interacting with all
  485. 16:02these things that now in this world of
  486. 16:05AI you would expect you have to interact
  487. 16:08with at some point in time.
  488. 16:10Yeah, I think so too and then which I'm
  489. 16:12sure we'll get into a little bit later
  490. 16:13is sort of this um
  491. 16:15integrated with a lot of Laravel's the
  492. 16:17rest of its stack. So, like if I
  493. 16:19generate an image, I have a method to
  494. 16:21like store that image using the file
  495. 16:23system stuff in Laravel or if I want to
  496. 16:25like queue the generation of an image,
  497. 16:27it's actually integrated with the queue
  498. 16:28system in Laravel. So,
  499. 16:30it's an AI SDK that really leans into
  500. 16:33like the full stackness of Laravel.
  501. 16:36I love it. I love it. When you think of
  502. 16:40and some people are saying your your
  503. 16:42video quality isn't doing too good. I
  504. 16:44don't know if there's
  505. 16:45a way for you to bump it up, but if that
  506. 16:48means
  507. 16:48>> know. you start stuttering. I don't
  508. 16:50know.
  509. 16:51But,
  510. 16:52for everyone who's saying that
  511. 16:54uh I'm on standard definition, so I can
  512. 16:56go up to Do I go up to full high
  513. 16:58definition? Is that recommend? Full high
  514. 17:00definition? Uh maybe.
  515. 17:03All right, do I look good now? Do I look
  516. 17:05better? Let's see.
  517. 17:06Um I think I think you look better.
  518. 17:10>> Should look Should look
  519. 17:11video enhance, says someone.
  520. 17:13Yeah. Exactly. Taylor will get on that.
  521. 17:16Let's
  522. 17:17Yeah,
  523. 17:19sweet. But yeah, let's uh
  524. 17:21let's take a turn into Okay, all of this
  525. 17:24AI stuff is fun to work with, but I'm
  526. 17:26curious of maybe what you're seeing
  527. 17:29within
  528. 17:30um you know, current applications,
  529. 17:32enterprise applications, etc. Or just
  530. 17:36why would people start adding AI into
  531. 17:39their apps? What are the things that
  532. 17:40people are generally going to be using
  533. 17:41it for? Um what are some practical
  534. 17:43applications that you can now build with
  535. 17:45the AI SDK?
  536. 17:47Yeah. I mean I I think some of like the
  537. 17:49most common things that you see people
  538. 17:51build with it are sort of like almost
  539. 17:53text summarization type features. So
  540. 17:56like on Night Watch for us, which we've
  541. 17:58already launched, was like you have an
  542. 18:01issue in Night Watch, right? like an
  543. 18:02exception has occurred or you have like
  544. 18:04some slow query. You can actually click
  545. 18:06a button in Night Watch to let the AI
  546. 18:08write like a summary of that. So and it
  547. 18:11will tell you like okay, here's kind of
  548. 18:12what happened, here's some suggested
  549. 18:13solutions, here's where you might look
  550. 18:15next or whatever. I think that sort of
  551. 18:18like category of AI usage is super
  552. 18:20common. Like I have a I have a bunch of
  553. 18:22text that I need to basically like
  554. 18:23classify or summarize.
  555. 18:25It's super easy to do that with AI um
  556. 18:29and pretty fast and affordable.
  557. 18:32Um you know, I think another like chunk
  558. 18:35of AI is around like audio and
  559. 18:37transcription and sort of real-time
  560. 18:39applications. That's another like
  561. 18:41popular
  562. 18:42um
  563. 18:43use case for AI. I mean this is kind of
  564. 18:45I don't know if this is like
  565. 18:47people consider this like full on AI in
  566. 18:49the normal sense of the word I phrase,
  567. 18:51but I mean I think it kind of is related
  568. 18:53is around like embeddings and vector
  569. 18:54search, which is part of the AI SDK
  570. 18:56where we can generate embeddings from a
  571. 18:59given like string of text, vector
  572. 19:00embeddings, store them in a database,
  573. 19:01and then do semantic search querying,
  574. 19:03and then AI powered re-ranking of those
  575. 19:06results for like the most semantically
  576. 19:07similar results. [snorts] So
  577. 19:10Um you know, I think those are just some
  578. 19:11of the more common use cases. I think
  579. 19:13that then there's like image generation,
  580. 19:15which I think is a little bit more like
  581. 19:17you know, I don't know if it's a little
  582. 19:19bit more like the consumer side of like
  583. 19:21um the use cases for AI where you're
  584. 19:23generating sort of fun images and things
  585. 19:25like that. But at Laravel we've been
  586. 19:27using it mainly I would say for like
  587. 19:29text summarization, issue summarization,
  588. 19:32things like that.
  589. 19:34Yeah, definitely. And and the neat part
  590. 19:35I think with the AI SDK kind of like it
  591. 19:37you said is now you have this one
  592. 19:39central point. I know in the past within
  593. 19:42things, you know, there there are great
  594. 19:43packages like Prism that I I know you
  595. 19:45said that the AI SDK is is built on top
  596. 19:48of and expands in a lot of ways. Um, but
  597. 19:51it's great that you can kind of have
  598. 19:53this one central place to say, "Okay,
  599. 19:56when I'm working with images or when I'm
  600. 19:58working with audio, the infrastructure
  601. 20:00behind it, the the code behind is
  602. 20:02exactly the same." Um, I'm curious your
  603. 20:04thoughts and I and when we dive into
  604. 20:07building something within the code, I
  605. 20:09I've already used this within things
  606. 20:11like Cloud Code and Boost and everything
  607. 20:12like that. It's it's crazy how much
  608. 20:14better it gets because it's just one
  609. 20:16package for the LLMs that you're working
  610. 20:19with to say, "Okay,
  611. 20:20hey, this audio is going to be generated
  612. 20:23the same way that I generated this this
  613. 20:25chat." Do you think that's intentional
  614. 20:26that you built like how what are your
  615. 20:28thoughts on that when it comes to this
  616. 20:29new world of coding in this in that
  617. 20:31sense?
  618. 20:32In terms of like how much effort do I
  619. 20:34put into sort of like the elegance of
  620. 20:35the API?
  621. 20:37Yeah, either either that or is that
  622. 20:39elegance of the API matter now?
  623. 20:42Yeah, I know. It's something I've
  624. 20:44thought about myself. Um,
  625. 20:46I think it does sort of matter in the
  626. 20:48sense of like the LLMs still do well
  627. 20:51with things that are like easy to parse
  628. 20:53and understand and summarize and read
  629. 20:56about. I don't know if it's like,
  630. 20:59you know, obviously the LLM doesn't
  631. 21:00derive the same joy from it that like
  632. 21:02the human consumer might. Now, I used to
  633. 21:04put like a a of effort into these sort
  634. 21:06of like whimsical fun APIs because as
  635. 21:08humans were writing the code it's kind
  636. 21:10of fun to like use these tools that are
  637. 21:12sort of like charming in a way.
  638. 21:14Um and maybe it still is, but yeah, I I
  639. 21:16mean it's still important I think to
  640. 21:18have good API design just for the
  641. 21:19discoverability of that LLM to be able
  642. 21:22to figure out what the heck's going on,
  643. 21:24you know?
  644. 21:25Yeah.
  645. 21:25>> Um and I think like we we've tweeted
  646. 21:27about this a little bit, but like
  647. 21:29frameworks that sort of lean into
  648. 21:31conventions and structure I think do
  649. 21:34well with LLMs. I think we've seen that
  650. 21:36with like Laravel and things like Rails
  651. 21:38where like the LLMs are doing a pretty
  652. 21:40good job because there's lots of
  653. 21:41training data, there's these very
  654. 21:43conventional structure to the projects
  655. 21:44where it's like there's a models
  656. 21:45directory, there's a controllers
  657. 21:46directory, so they kind of like it's
  658. 21:48very discoverable, you know?
  659. 21:50Yeah. Yeah, I I I completely agree and
  660. 21:52it's it's it's neat to see the, you
  661. 21:55know,
  662. 21:56I I feel like the joy from those clean
  663. 21:58APIs comes now of of seeing it when
  664. 22:01you're when you're looking at your maybe
  665. 22:03code being generated or you're just
  666. 22:04looking back and it's very easy to know,
  667. 22:06okay, this is exactly what's happening
  668. 22:08rather than having to jump through 50
  669. 22:10different files to say, okay, what
  670. 22:11actually is happening. It feels like
  671. 22:13you're even if you're not handwriting
  672. 22:15all that code it still feels like you
  673. 22:16understand what's happening in that in
  674. 22:18that case, and I think the LLMs do a
  675. 22:20great job at
  676. 22:22also saying,
  677. 22:23you know, we're using this one package,
  678. 22:25so we're going to be doing it the exact
  679. 22:26same way another another
  680. 22:29iteration of the application.
  681. 22:31Yeah, totally.
  682. 22:33Uh for those just joining, thank you so
  683. 22:35much for for being here. Uh I am joined,
  684. 22:37my name is Josh, I'm joined by Taylor
  685. 22:39Otwell, you probably know Taylor
  686. 22:41uh just from everything, the creator of
  687. 22:45Laravel and Beam and now the creator of
  688. 22:47Laravel AI SDK, which is what we're kind
  689. 22:49of diving into here on the stream. So if
  690. 22:51you're just joining us, let us know
  691. 22:52where you're joining from, uh what time
  692. 22:54it is there for you, and then what's
  693. 22:55your favorite Laravel package. Uh but if
  694. 22:58you haven't gotten the chance, feel free
  695. 23:00to like and subscribe this video if
  696. 23:02you're on our YouTube platform. There's
  697. 23:04a whole bunch of awesome videos that we
  698. 23:06try to put out as consistently as
  699. 23:07possible, but we're going to continue to
  700. 23:09take a look at the Laravel AI SDK and
  701. 23:11then hopefully be able to have a chance
  702. 23:12to to build with it as well.
  703. 23:15Um Taylor, what is your favorite part
  704. 23:16before we jump into like each aspect of
  705. 23:19the AI SDK?
  706. 23:20Uh just from an overall standpoint, what
  707. 23:22is your favorite part of the AI SDK? One
  708. 23:24that you're like when you built it
  709. 23:26you're like, "Yeah, this is really cool.
  710. 23:27I like that. I like that."
  711. 23:29>> Yeah. Yeah. Yeah. It's a good question.
  712. 23:32Um I really like the kind of like agent
  713. 23:34class concept, which was a big part of
  714. 23:36like um my initial sort of like thinking
  715. 23:39behind the AI SDK. And you know, for
  716. 23:42those who haven't seen it, basically
  717. 23:44when you use the AI SDK, you make agent
  718. 23:46classes using like a make agent artisan
  719. 23:48command and it's basically a class that
  720. 23:50sort of encapsulates the system
  721. 23:52instructions, the message context, the
  722. 23:54tools, maybe the schema of um sort of
  723. 23:57like what you're doing um with the AI
  724. 24:00provider. So, you might have for example
  725. 24:02like, I don't know, I think in the in
  726. 24:04the docs we use a lot this sort of like
  727. 24:06sales coach or like lead extractor agent
  728. 24:08that's like reading transcripts of sales
  729. 24:10calls and giving advice and things, but
  730. 24:12I I think it's like this very
  731. 24:13Laravel-esque way of working with AI
  732. 24:17where everything feels sort of like nice
  733. 24:18and tucked in this little class that I
  734. 24:20can reuse throughout my application. So,
  735. 24:22maybe I use it in an artisan command in
  736. 24:23one place and I use it in a HTTP
  737. 24:25controller in another place and it's
  738. 24:27just sort of all like self-contained.
  739. 24:29Also very easy to like test. Um
  740. 24:33where you know, it had you can fake
  741. 24:35agents, you can fake other AI
  742. 24:36interactions. I think the testing story
  743. 24:38was something I tried to like make
  744. 24:41decent. I think testing with AI is
  745. 24:42something that's often like overlooked.
  746. 24:44One cuz testing AI can be hard. It's not
  747. 24:46deterministic. Um
  748. 24:48you know, there's all kind of quirky
  749. 24:49things that can happen. So, I tried to
  750. 24:50make that pretty streamlined.
  751. 24:52Yeah.
  752. 24:53No, I love that. And I I I that's an
  753. 24:55interesting standpoint that I've I've
  754. 24:57personally loved as I've worked with it
  755. 24:59just in like the past couple of weeks
  756. 25:01before launch and then also even just
  757. 25:03after launch I've I've built probably a
  758. 25:04couple two or three different
  759. 25:06applications just familiarizing myself
  760. 25:08and one of the things that I really love
  761. 25:10about the agent SDK specifically is that
  762. 25:13is that aspect where it feels like I
  763. 25:16don't know similar to a job where you
  764. 25:17would or an action I guess would be a
  765. 25:19better
  766. 25:20use case but where where now I'm
  767. 25:23abstracting that from every single job
  768. 25:26or controller that I'm using from that
  769. 25:27specific logic and it lives in one
  770. 25:29place. I can change the as we all know
  771. 25:32for if you've built anything within AI
  772. 25:35you have a prompt and sometimes you
  773. 25:37might want to change that prompt it
  774. 25:38sucks to have to change it in 10
  775. 25:40different places that you're using that
  776. 25:41exact text prompt so being able to have
  777. 25:43it in one place is is really awesome.
  778. 25:46Yeah.
  779. 25:48Awesome. I want to jump into the the
  780. 25:50landing page real quick and just kind of
  781. 25:52talk through some of the some of the
  782. 25:54aspects before
  783. 25:55getting into
  784. 25:57the the rest
  785. 25:59of the actual code. I'm going to
  786. 26:02plop this open right here.
  787. 26:06Perfect.
  788. 26:07So
  789. 26:08Oh.
  790. 26:10Lost you for a second. There we go.
  791. 26:12Okay. So for those who don't know that
  792. 26:14the Laravel AI SDK is out it is out it
  793. 26:17is laravel.com/ai.
  794. 26:19So laravel.com/ai
  795. 26:23and the it's the AI toolkit with
  796. 26:25batteries included. It's as simple as
  797. 26:28running this composer require command
  798. 26:29composer require laravel/ai.
  799. 26:32I guess one question for you Taylor is
  800. 26:34what was the you kind of mentioned it
  801. 26:36but what was the thought behind putting
  802. 26:38this in in one single package versus
  803. 26:41like hey here's a package for
  804. 26:43image here's a package for voice. What
  805. 26:45what's your kind of thoughts or idea
  806. 26:46behind that?
  807. 26:48You know I kind of just wanted people to
  808. 26:50have a complete toolkit for working with
  809. 26:52AI and not have to pull in a bunch of
  810. 26:54different stuff and kind of like
  811. 26:55overthink it. Uh so it's for me it's
  812. 26:58just kind of nice to be like composer
  813. 26:59require laravel/ai and boom I just sort
  814. 27:01of like have everything I need to do AI
  815. 27:05SDK related things whether that's audio
  816. 27:07or images or whatever. Um it doesn't
  817. 27:10really like you know significantly
  818. 27:13increase the size of the package to add
  819. 27:15these things. All the bulk of the work
  820. 27:16is handled by people like Jim and I and
  821. 27:18open AI and all that actually.
  822. 27:20>> Yeah. I do this stuff so it's just kind
  823. 27:22of nice to have this like one
  824. 27:23self-contained package to have a kind of
  825. 27:25a complete tool kit.
  826. 27:27I love it. Um so yeah just like Taylor
  827. 27:30said one SDK for every capability.
  828. 27:32I wanted to walk through some of like
  829. 27:34the elements that we have here on the
  830. 27:35bottom of the page. Hey that's you
  831. 27:36that's us today.
  832. 27:38But there's these kind of like
  833. 27:40uh you know there's seven different
  834. 27:43or eight different aspects and this is
  835. 27:46only again a small part of it but
  836. 27:47there's prompts, context, tools,
  837. 27:50provider tools, structured output,
  838. 27:52streaming, async, and attachments. I
  839. 27:54kind of wanted to get your thoughts and
  840. 27:55walk through of like when you might use
  841. 27:58each one cuz I feel like especially in
  842. 28:00today's age one of my thoughts is that
  843. 28:02as you are learning how to build with
  844. 28:04with Laravel of course maybe your LLM as
  845. 28:07you're building this within Laravel or
  846. 28:08adding AI SDK so that you can build and
  847. 28:11so for those who are installing the AI
  848. 28:13SDK if you run and you are using AI
  849. 28:16agents which like Taylor said it's it's
  850. 28:18a good thing to be using them I think
  851. 28:20you know. If you run boost install PHP
  852. 28:22artisan boost install after you install
  853. 28:25the Laravel SDK it will ask you to to
  854. 28:27install
  855. 28:28the AI SDK skill which will help the
  856. 28:31LLMs learn how to use this better.
  857. 28:33But like I think Taylor it's one of
  858. 28:36those things where
  859. 28:37the more you understand what can be
  860. 28:39possible behind the scenes the better we
  861. 28:41can help prompt our LLMs how to do that
  862. 28:44and so that we know what's actually
  863. 28:45happening. What do you what
  864. 28:48just in maybe like a couple sentences
  865. 28:49maybe we can go through each one of
  866. 28:51these and I just want to hear your
  867. 28:52thoughts on when you would use prompts,
  868. 28:54what is context and when to use it tool
  869. 28:57etc.
  870. 28:59Yeah, [snorts] prompts are sort of like
  871. 29:00the basic way to ask the LM to generate
  872. 29:03some text in response to like text you
  873. 29:05give it. So
  874. 29:06you know, if you've ever used chat GBT
  875. 29:08and you ask it a question and you get it
  876. 29:09some text back and that is like you're
  877. 29:11prompting the LM.
  878. 29:13Very similarly like in the AI SDK this
  879. 29:15is how you do that in code, right? So
  880. 29:18we're going to send the LM some sort of
  881. 29:20like text a question
  882. 29:22maybe like a command like in this case
  883. 29:24we're saying analyze this transcript and
  884. 29:26we're kind of passing along this file
  885. 29:28and it's going to give us back some
  886. 29:30text. So this is like a super common use
  887. 29:32case for AI, right?
  888. 29:35Similar to that summarization aspect
  889. 29:36that you had that you had said before.
  890. 29:38Yeah, exactly.
  891. 29:40And it doesn't have to be like you can
  892. 29:42see even in this case it's not actually
  893. 29:43like we don't have to use prompting just
  894. 29:45for chat so to speak, right? We can just
  895. 29:47like give it a task almost as a prompt
  896. 29:50and we we don't intend to ever revisit
  897. 29:52like the conversation, right? It's not
  898. 29:54an ongoing conversation but we're just
  899. 29:55prompting the AI
  900. 29:57or the LM with a specific task and we're
  901. 29:59getting a response and we're storing
  902. 30:01that or we're sending it to the user or
  903. 30:02whatever but it's not really an ongoing
  904. 30:04chat. And to your question like the
  905. 30:07context tab are you this is actually
  906. 30:10good. You can go you can look at this.
  907. 30:12This is a good example of like that
  908. 30:14sales coach agent. This kind of shows
  909. 30:16you how you can kind of like encapsulate
  910. 30:18the system instructions within this
  911. 30:20class and then we can kind of reuse this
  912. 30:22throughout of our application.
  913. 30:24So that we can just new up the sales
  914. 30:26coach agent and then give it a prompt
  915. 30:28and we can do that in a variety of
  916. 30:30places throughout our app without sort
  917. 30:31of like re-specifying those system
  918. 30:33instructions. So that's super
  919. 30:35convenient. What one question I had here
  920. 30:38just I think it's a good place to talk
  921. 30:40about it is so
  922. 30:42you kind of mentioned it's one central
  923. 30:43place to be able to interact with
  924. 30:44everything. So we have all these tools
  925. 30:46available to us that we see up here, but
  926. 30:48you're we're not saying
  927. 30:50send a prompt to open AI or even send a
  928. 30:53prompt to a specific model or even send
  929. 30:55a prompt to [clears throat] you know
  930. 30:56Gemini. How does all that work behind
  931. 30:58the scenes? Like do you have different
  932. 31:00sections providers? What happens? Yeah,
  933. 31:02so a lot of that is driven by your
  934. 31:04config AI file
  935. 31:07and that's where you specify I don't
  936. 31:08even know if that's on this page but we
  937. 31:10definitely talk about it kind of like
  938. 31:11multi-provider and failover and stuff
  939. 31:14but similar like in your Laravel app if
  940. 31:17you use Laravel you probably know you
  941. 31:18have like a config database file or a
  942. 31:20config file systems file. When you
  943. 31:23install the AI SDK you get a config AI
  944. 31:26file and that's where you configure
  945. 31:27okay, I want my default AI provider to
  946. 31:30be open AI or I want it to be anthropic
  947. 31:33and you can actually customize that
  948. 31:34based on the types of things you're
  949. 31:36doing. So you can have a default
  950. 31:37provider for text like our prompting
  951. 31:39here but you can have a different
  952. 31:40default provider for images. So maybe
  953. 31:42for images I want to use Gemini and Nano
  954. 31:44banana but for text I want to use
  955. 31:46anthropic.
  956. 31:48And so if you specify that in your
  957. 31:49config file you actually don't have to
  958. 31:51specify it here when you actually
  959. 31:53prompt. You know it's just going to use
  960. 31:54whatever defaults you have. Of course we
  961. 31:56can override that in the code but
  962. 31:59it's kind of nice you know you can just
  963. 32:01sort of like use it you don't have to
  964. 32:02remember okay
  965. 32:03what is the like code name for Claude
  966. 32:05Haiku - 401 whatever that is.
  967. 32:09402 405 yeah. Yeah, exactly. You can
  968. 32:12just use the
  969. 32:13use the features.
  970. 32:15Yeah, and it seems like that's the
  971. 32:17eloquent way in a lot of ways where like
  972. 32:18you're building out database queries in
  973. 32:21the same way where I could be building
  974. 32:22in SQL light in local production or
  975. 32:25local instance and then when I put it
  976. 32:27into production none of my code changes
  977. 32:29just my
  978. 32:29>> Yeah, yeah it's basically the same
  979. 32:31concept almost like a ORM type concept
  980. 32:34concept for uh AI providers.
  981. 32:36I love it.
  982. 32:38What about context? What's that?
  983. 32:40Yeah, so context is kind of how you
  984. 32:41actually would build something more like
  985. 32:44a chat where, you know,
  986. 32:46what what's kind of interesting about
  987. 32:47like dealing with LLMs is when you ask
  988. 32:50LLM for some text,
  989. 32:52it, you know, ChatGPT and like Claude
  990. 32:55give the illusion that there's this
  991. 32:56ongoing state, you know, with the LLM
  992. 32:59where it's like aware of all the
  993. 33:01previous messages, but that's not
  994. 33:03actually the case by default. You have
  995. 33:05to feed it the whole string of messages
  996. 33:09that came before your prompt so that it
  997. 33:11knows, and you have to do that every
  998. 33:13time, actually, that you call the LLM.
  999. 33:15It has no concept of like historical
  1000. 33:17interactions with you.
  1001. 33:19Yeah. Um so this is where you do that.
  1002. 33:21So this is where like if you are
  1003. 33:22actually are building more of like a
  1004. 33:24chat-like interface where the user is
  1005. 33:26sort of like having an ongoing
  1006. 33:27conversation with an agent, you need to
  1007. 33:30store those messages in a database, and
  1008. 33:32then this is where you can pull them
  1009. 33:33back out and give them to the LLM. So
  1010. 33:35we're going to in this example, we're
  1011. 33:36like pulling all the recent messages for
  1012. 33:38a given user, maybe the most recent 50
  1013. 33:41in this case, and we're passing them
  1014. 33:42sort of in chronological order
  1015. 33:44uh to the LLM. So this is an example of
  1016. 33:47how to do that manually, but the tab
  1017. 33:49you're on now kind of shows us this is
  1018. 33:51built actually into the AI SDK, so
  1019. 33:54like the previous tab showed, we allow
  1020. 33:56you to do that manually, but if you use
  1021. 33:57this remember's conversations trait like
  1022. 33:59you have here,
  1023. 34:00the AI SDK will actually just do that
  1024. 34:02for you. Um
  1025. 34:04And the AI SDK actually is in beta, and
  1026. 34:06I would say this is one of the areas
  1027. 34:08that I'm like most working on between
  1028. 34:10now and stable release. There's some
  1029. 34:12kind of more features around this, but
  1030. 34:14the the the kind of like bare-bones
  1031. 34:16skeleton of it is here.
  1032. 34:18Where if I use this remember's
  1033. 34:19conversations trait, it's going to
  1034. 34:21automatically store conversations in a
  1035. 34:22conversations table. It's going to put
  1036. 34:24the messages in like an agent messages
  1037. 34:26table, and it's going to automatically
  1038. 34:28pull them back out when you continue the
  1039. 34:30conversation.
  1040. 34:31It's just super nice because it's a lot
  1041. 34:33of kind of like boilerplate code to
  1042. 34:35store those messages, get them back out,
  1043. 34:37make sure they're sorted in the right
  1044. 34:38order, pass them to the LLM. So, to just
  1045. 34:41be able to use this trait in like one
  1046. 34:42line of code is like, oh, I just have
  1047. 34:43like conversation state. Um that's
  1048. 34:46great. Yeah. To be able to not have to
  1049. 34:48do uh any of this and store yourself and
  1050. 34:51then you're in this aspect of it. It's
  1051. 34:53just kind of obfuscated for you.
  1052. 34:55Yeah. I guess there was a question that
  1053. 34:57I saw in the chat that was, what was the
  1054. 34:59most challenging part of building
  1055. 35:00Laravel SDK? Is this it or is there a
  1056. 35:02different part?
  1057. 35:03No, I mean, a lot of it was kind of like
  1058. 35:06I I wouldn't say there was any one area
  1059. 35:07that was just like, oh, wow, this is
  1060. 35:09just uber hard. I would say it was a lot
  1061. 35:11of just like sitting and thinking about
  1062. 35:13what are the right like APIs and like,
  1063. 35:15how do I want to design it? Kind of what
  1064. 35:16we were talking about earlier of like, I
  1065. 35:18really like to design things that feel
  1066. 35:19like really thoughtful and really like
  1067. 35:22really like well-designed and easy to
  1068. 35:24use and intuitive. And the process of
  1069. 35:28arriving there is usually just like a
  1070. 35:29lot of sitting there and staring at the
  1071. 35:31screen, you know, like being like, or
  1072. 35:33even just like writing pseudo code of
  1073. 35:34like, oh, what would be like
  1074. 35:36what would feel the best, you know? And
  1075. 35:38sometimes I'll actually go into like an
  1076. 35:39empty file and just start typing code as
  1077. 35:42if I'm using the SDK, even code that
  1078. 35:44just doesn't even exist to try to
  1079. 35:46discover like, oh, this feels nice or
  1080. 35:48this doesn't feel nice and
  1081. 35:50um so, yeah, I I mean, to get back to
  1082. 35:52the answer, I don't think it was any one
  1083. 35:54particular thing. It was just figuring
  1084. 35:56out what's the most like delightful
  1085. 35:58considered APIs to give people. Yeah. I
  1086. 36:02love that. And to your to your point
  1087. 36:03before where you're like, you were kind
  1088. 36:05of
  1089. 36:06or the the posed question, does it
  1090. 36:07matter? Like, I think it that that means
  1091. 36:10it does matter in a lot of sense because
  1092. 36:12it it's becomes this unified platform
  1093. 36:15where you know what's available to you
  1094. 36:17even if you might not be handwriting
  1095. 36:19every single piece of the code, you know
  1096. 36:21what's available and it feels unified,
  1097. 36:23which I think is the the biggest thing.
  1098. 36:25Yeah, absolutely.
  1099. 36:26Jason, you mentioned uh Jason Torres,
  1100. 36:28okay, fine, I'll go and install it. You
  1101. 36:30had your uh Santa app that I that was
  1102. 36:33hosted on Laravel Cloud. I'm curious of
  1103. 36:35if you swap out the AISDK, it'd be cool
  1104. 36:37to see.
  1105. 36:38Um all right, Taylor, what is uh tools?
  1106. 36:42I know we kind of have talked about this
  1107. 36:43a little bit on the streams before when
  1108. 36:45it comes to like MCP and what's the
  1109. 36:47difference between tools, stuff like
  1110. 36:48that. What is tools in the context of
  1111. 36:49the AISDK?
  1112. 36:51Yeah, tools are one of the coolest
  1113. 36:53parts, I think, of building agents and
  1114. 36:54they kind of give you the most
  1115. 36:57uh interesting possibilities for the
  1116. 36:58kinds of things you can build because
  1117. 37:01um it lets you like basically
  1118. 37:03supercharge LLMs with things that they
  1119. 37:06couldn't do otherwise. So, and this
  1120. 37:08example is a very basic example, but
  1121. 37:10I'll I'll share some other cool examples
  1122. 37:12in a second where maybe you want the LLM
  1123. 37:14to be able to generate like a
  1124. 37:15cryptographically secure random number.
  1125. 37:18I don't think that's actually built into
  1126. 37:19LLMs, so like if I ask ChatGPT, "Hey,
  1127. 37:22give me a number between 1 and 100."
  1128. 37:24Yeah. That's probably not actually a
  1129. 37:26random number in the true like
  1130. 37:28mathematical sense of the word.
  1131. 37:30But I can actually give
  1132. 37:32um using the AISDK, I can define a tool
  1133. 37:35that when I prompt the LLM, I give it a
  1134. 37:38list of tools that it has available to
  1135. 37:40it. So, it's going to see, "Hey, I have
  1136. 37:41this tool that can be used to generate
  1137. 37:43cryptographically secure random
  1138. 37:45numbers." And it can invoke that tool,
  1139. 37:47which will then invoke this code on your
  1140. 37:50end, this handle method that's like
  1141. 37:51right in front of us, will actually be
  1142. 37:53called. Uh but the LLM will have
  1143. 37:55actually decide to call it. I mean, it's
  1144. 37:57pretty it's pretty wild, actually. Um
  1145. 37:59and so, a lot of times if you look at
  1146. 38:00like model evals when OpenAI or
  1147. 38:03Anthropic comes out with new models, it
  1148. 38:06will actually have like an eval for tool
  1149. 38:08use and how good it was at using tools.
  1150. 38:11You know, and LLMs these days are are
  1151. 38:13pretty good at this.
  1152. 38:15So, this lets us actually augment the
  1153. 38:18LLM with cool stuff.
  1154. 38:20So, I mean, a real-world use case for
  1155. 38:23tools that probably a lot of us are
  1156. 38:24familiar with is if you've ever used
  1157. 38:26Claude code or open code or cursor,
  1158. 38:29you'll see that it like um
  1159. 38:31it inspects files. Like it reads files,
  1160. 38:33it writes files, it runs bash commands.
  1161. 38:36Those are actually tools
  1162. 38:38that the builders of Claude code and
  1163. 38:40open code have built, right? So, they
  1164. 38:42have like a run bash command tool that
  1165. 38:45they have given to the LLM to run bash
  1166. 38:48commands. And so, actually the first
  1167. 38:50time when I demonstrated the AI SDK out
  1168. 38:52in San Francisco a few weeks ago, I
  1169. 38:54actually wrote like a little tiny nano
  1170. 38:56version of Claude code. I think I
  1171. 38:58actually called it nano code. Where I
  1172. 39:00gave it like seven tools. I gave it like
  1173. 39:02a read file tool, a write file tool, or
  1174. 39:04a bash tool.
  1175. 39:05And it actually worked. Like you could
  1176. 39:07chat with it, it would update files. You
  1177. 39:09could say, "Hey, make a new eloquent
  1178. 39:11model and update the routes to like
  1179. 39:13return all the data using the model."
  1180. 39:15And it like actually works.
  1181. 39:17Um so, tools let you do all sorts of
  1182. 39:19random stuff. And um I think we'll get
  1183. 39:21into a second. We actually give you some
  1184. 39:22tools built in. Um but this is how you
  1185. 39:26can like
  1186. 39:27start to integrate the LLM with your
  1187. 39:29system.
  1188. 39:31>> [snorts]
  1189. 39:31>> Yeah. No, I love I love that. And that's
  1190. 39:33that's essentially what uh Boost is
  1191. 39:34doing a lot of ways, too. Like you
  1192. 39:35mentioned like Claude code, but Boost
  1193. 39:37has has
  1194. 39:38um a specific number of tools that Would
  1195. 39:40you say then, Taylor, tools are a great
  1196. 39:42place to to keep the things that your
  1197. 39:45app likely does over and over or that
  1198. 39:48your LLMs through your app are doing
  1199. 39:50over and over again?
  1200. 39:52Yeah. Yeah, I think so. Um and some of
  1201. 39:54the tools we give you are are some
  1202. 39:56common tools that people like those are
  1203. 39:58like search. So,
  1204. 40:00um
  1205. 40:01go to provider tools. What do we have
  1206. 40:02here?
  1207. 40:03I think this is Yeah, the This is web
  1208. 40:05search, web fetch,
  1209. 40:06uh and then file search. So, like
  1210. 40:09people use tools a lot for this kind of
  1211. 40:10thing. Um so, if I throw like the web
  1212. 40:12search tool or the web fetch tool onto
  1213. 40:14this agent, and these are two tools that
  1214. 40:16are just built into the AI SDK. You
  1215. 40:18don't need to write them yourself. It
  1216. 40:20will allow the LLM to actually search
  1217. 40:22the web for the latest data or fetch a
  1218. 40:24web page from a given URL. And then with
  1219. 40:27file search, it will allow to search
  1220. 40:28like vectorized PDFs or other data to
  1221. 40:32find things that otherwise didn't have
  1222. 40:34access to. So if we have maybe uploaded
  1223. 40:37I don't know all of our company policy
  1224. 40:40PDFs to a file store, we can now search
  1225. 40:42this and have like a chat agent that can
  1226. 40:45search over this data.
  1227. 40:47Um and that's data that the LLM
  1228. 40:48otherwise wouldn't have access to.
  1229. 40:51I love it. Uh cool kind of question
  1230. 40:53around these lines. How should we
  1231. 40:55organize our tools? I guess when you're
  1232. 40:56building out an application with this,
  1233. 40:59what do you think are the thoughts of
  1234. 41:00one, how many tools MC can or should we
  1235. 41:03use?
  1236. 41:04Um and then how should we organize our
  1237. 41:06tools? I guess
  1238. 41:07uh you know
  1239. 41:08the SDK gives you a way to organize them
  1240. 41:11within this tools namespace. But what
  1241. 41:13are your thoughts on this?
  1242. 41:15Yeah, I I know it's been like kind of a
  1243. 41:18pretty hot topic of discussion around
  1244. 41:20like the amount of tools that you should
  1245. 41:21expose to
  1246. 41:23to an LLM. I I would say like
  1247. 41:26you know
  1248. 41:27when you you shouldn't have like 50, 60,
  1249. 41:2970 tools probably exposed to the LLM
  1250. 41:32because you get what's called context
  1251. 41:33bloat where
  1252. 41:35kind of what I was saying where you have
  1253. 41:36to send all of the messages to the LLM
  1254. 41:38to provide historical context. You also
  1255. 41:40have to send all of the tool
  1256. 41:41definitions, what they do, and you have
  1257. 41:44to send that on every message as well.
  1258. 41:45So if you have too many tools, you can
  1259. 41:47sort of consume a lot of tokens and a
  1260. 41:49lot of context. Um
  1261. 41:52I think that really comes into play on
  1262. 41:54some of these local coding agents where
  1263. 41:55you start to plug in like different MCP
  1264. 41:58providers and they have maybe a dozen
  1265. 41:59tools and you've got like maybe five of
  1266. 42:01those and now you've got like a hundred
  1267. 42:02tools.
  1268. 42:03And uh it can kind of get pretty out of
  1269. 42:05control pretty fast. I think if you're
  1270. 42:07using the AI SDK to build something in
  1271. 42:08your own application, you probably
  1272. 42:11aren't running into that quite as much
  1273. 42:12where you have like a hundred tools and
  1274. 42:14something that's probably pretty rare.
  1275. 42:15So um
  1276. 42:17Yeah, I mean I I don't know what the
  1277. 42:19exact number is, but it is a thing you
  1278. 42:21have to watch out for. Let's put it that
  1279. 42:22way. Yeah. Yeah, I am curious. I
  1280. 42:25actually don't know the answer to this,
  1281. 42:26but I am curious of if if there's going
  1282. 42:28to be a way or if there's already one
  1283. 42:30way to be able to say
  1284. 42:31to to conditionally
  1285. 42:34load up tools would be would be very
  1286. 42:36interesting. I know that there's
  1287. 42:37probably And what's cool with the AI
  1288. 42:40SDK, you can do that a little bit in the
  1289. 42:41sense of like
  1290. 42:43>> [clears throat]
  1291. 42:43>> you have the agent class and so whatever
  1292. 42:44you return from that tools method can be
  1293. 42:46sort of like determined at runtime.
  1294. 42:49Okay. So maybe maybe one user maybe you
  1295. 42:51maybe you pass it a user into the
  1296. 42:53constructor of the agent and they're
  1297. 42:54using that user to say, okay, well, this
  1298. 42:56user has access to this list of tools
  1299. 42:59and then maybe this other user doesn't.
  1300. 43:00So you can do a little bit of like
  1301. 43:02dynamic tool registration here.
  1302. 43:04I know people are sort of working on
  1303. 43:06sort of like other things around tool
  1304. 43:08discovery.
  1305. 43:09Um
  1306. 43:10So yeah, it's pretty ongoing I think
  1307. 43:11evolving topic in the AI world. Yeah, so
  1308. 43:14that does make sense that that
  1309. 43:17a great use case for like a tools array
  1310. 43:20on a particular user would be maybe
  1311. 43:22they're a paid user and would have
  1312. 43:24access to specific tools that you might
  1313. 43:26not have for free users for example.
  1314. 43:28>> Exactly. Yeah.
  1315. 43:30Awesome. For those just joining again,
  1316. 43:31thanks so much for being here. We have
  1317. 43:33Taylor Atwood talking through the label
  1318. 43:34AI's SDK. We'll get to actually building
  1319. 43:37things and like what that actually looks
  1320. 43:38like practically here in a little bit,
  1321. 43:39but I want to give a good overview bare
  1322. 43:42bones for those watching in on demand of
  1323. 43:44what it is, what do you how we think
  1324. 43:47through different pieces of this because
  1325. 43:49there's so many cool options that you
  1326. 43:51can build with this.
  1327. 43:52Even one app probably would only touch
  1328. 43:54two or three of these. It's really hard
  1329. 43:55to find a singular app that could have
  1330. 43:57all of these things provided. If you do
  1331. 44:00have questions, be free feel free to
  1332. 44:01drop them in the comments. I am checking
  1333. 44:03it as much as possible. I can't promise
  1334. 44:04that we'll get to all those questions,
  1335. 44:06but uh glad to have all of you watching
  1336. 44:08here. Feel free to like and subscribe to
  1337. 44:09help us uh show more content to you in
  1338. 44:12the future, as well. Uh so, Taylor, what
  1339. 44:14is structured output? So, I've heard of,
  1340. 44:17you know, we kind of talked about in
  1341. 44:18prompts that you get a text back when
  1342. 44:21you're saying, "Hey, give me this." What
  1343. 44:22is the difference between that and
  1344. 44:24structured output?
  1345. 44:26Yeah, so when you prompt an agent sort
  1346. 44:27of by default, um you just get sort of
  1347. 44:30free-form text back in the response. So,
  1348. 44:32very much like you would get from like
  1349. 44:33ChatGPT. You know, it doesn't really
  1350. 44:36have like a defined structure or schema
  1351. 44:38to it. You're just getting back a
  1352. 44:39paragraph or two of text.
  1353. 44:42Um what structured output lets you do is
  1354. 44:44actually say, "Okay, when you respond to
  1355. 44:46me, I want you to respond in this
  1356. 44:48structure." Um and I think if you scroll
  1357. 44:50down a little bit, you can see like in
  1358. 44:51this case, we're saying, "Give me back a
  1359. 44:53score, and that needs to be an integer,
  1360. 44:55and it's like a required field." So,
  1361. 44:57when the LLM responds, it's going to
  1362. 44:58give you JSON that matches that schema.
  1363. 45:02Which is super convenient, because then
  1364. 45:03you can parse that JSON, you like know
  1365. 45:06what to expect in terms of what data is
  1366. 45:08on it, and then you can reliably store
  1367. 45:10it or do whatever you want. If you're
  1368. 45:12just getting back free-form text from
  1369. 45:14LLM, like
  1370. 45:15you know, how do you parse that? I don't
  1371. 45:17know. It's It's just It's just arbitrary
  1372. 45:18text, you know? But, um if you're
  1373. 45:20getting back JSON, you know what to
  1374. 45:22expect. And this is actually powered by
  1375. 45:24an
  1376. 45:25um a new Laravel component, the JSON
  1377. 45:27schema component, which you can see
  1378. 45:29there in like the type signature.
  1379. 45:31Um so, we actually used this on the MCP
  1380. 45:34package um to define JSON schemas for
  1381. 45:36your MCP tools, and it's used here. So,
  1382. 45:39um
  1383. 45:40we actually wrote this component,
  1384. 45:42because we needed it, you know, in the
  1385. 45:43AI SDK, in the MCP package.
  1386. 45:46Uh but, it's a really slick little
  1387. 45:47component for defining JSON schemas.
  1388. 45:51Yeah. I remember the first uh
  1389. 45:53application, actually the first Laravel
  1390. 45:55application I ever made was an AI
  1391. 45:57application where I was They they we
  1392. 45:59didn't have structured output at the
  1393. 46:00time. This is about like 3 years ago. I
  1394. 46:02think it was GPT-2 or something like
  1395. 46:04that. Uh but I had to
  1396. 46:06hope and pray that the agent responded
  1397. 46:09in the way where I said, "Okay, here's
  1398. 46:11use the response, put equals equals
  1399. 46:12equals." And then then separate it, and
  1400. 46:14then I had to parse it out from that. Uh
  1401. 46:17structured output makes that so much
  1402. 46:18easier. Yeah, it's like I yeah, I I mean
  1403. 46:20even on Anthropic's models up until
  1404. 46:23recently, like to get it to return
  1405. 46:25structured output, you were literally
  1406. 46:26telling it in the prompt, "Please
  1407. 46:28respond with this JSON structure."
  1408. 46:30>> [laughter]
  1409. 46:31>> It's pretty pretty wild. Yeah, it's
  1410. 46:33crazy times that we we we live in now
  1411. 46:36where we could we could have it be
  1412. 46:37exactly the way we want it. And so the
  1413. 46:39the way the AI SDK does that makes it
  1414. 46:41extremely extremely easy. Um a couple
  1415. 46:43questions that I wanted to uh someone
  1416. 46:45said for using SDK, we need to purchase
  1417. 46:46the multiple model subscriptions like
  1418. 46:47Gemini and Claude Code. Uh so Claude
  1419. 46:49Code would probably be like your local
  1420. 46:51one, and then Gemini, if you wanted to
  1421. 46:53use that within the AI SDK, whether
  1422. 46:55that's returning text responses or even
  1423. 46:58um you know, image generation, uh
  1424. 47:01multiple models would have to be added
  1425. 47:03as API keys to the config locally and in
  1426. 47:06production. Uh but I'm I'm correct,
  1427. 47:09Taylor, where you can use like let's say
  1428. 47:11you're building something locally and
  1429. 47:12just want to test it, you can use local
  1430. 47:14models through Ollama. Is that correct?
  1431. 47:16>> that's correct. Yeah, we we released
  1432. 47:17that pretty quickly after launch.
  1433. 47:19Another thing you can do if you don't
  1434. 47:21want to sign up for multiple model
  1435. 47:22subscriptions is use something like Open
  1436. 47:24Router where you sign up for Open Router
  1437. 47:26and you have one key, and then you can
  1438. 47:27actually access Anthropic models, uh
  1439. 47:30OpenAI models, all all the models
  1440. 47:32through one APIs or through one sort of
  1441. 47:35like paid service.
  1442. 47:37Uh but yeah, you can also just use local
  1443. 47:38models. I actually did that myself the
  1444. 47:40other day just testing stuff. You can um
  1445. 47:42download Ollama and then pull in some
  1446. 47:45kind of local model, whichever one you
  1447. 47:46want, and you can um just run AI stuff
  1448. 47:49locally.
  1449. 47:50Yep, so that's Ollama, o l l a m a. Um I
  1450. 47:55think actually Open Router, now that you
  1451. 47:56mentioned it today, I think they also
  1452. 47:58have like a uh uh of course they have
  1453. 48:00like a paid one where you can pay them
  1454. 48:02and they'll route it to different
  1455. 48:03things, but I think they also have a a
  1456. 48:05free where they'll route it to like
  1457. 48:07providers as well.
  1458. 48:08Which is really really interesting.
  1459. 48:10Um
  1460. 48:13I saw another one okay, you mentioned
  1461. 48:15embeddings
  1462. 48:17um and vector search. Can it replace
  1463. 48:19LangChain as an example and can the
  1464. 48:22tools be a rag replacement?
  1465. 48:24Yeah, a lot of the tools kind of can be
  1466. 48:26a rag replacement. As far as it can it
  1467. 48:27replace LangChain, you know, it probably
  1468. 48:29depends on kind of what you're doing
  1469. 48:30with LangChain, but a lot of the ideas
  1470. 48:33behind some of the built-in tools are
  1471. 48:34around sort of like
  1472. 48:36rag and similar concepts in the sense of
  1473. 48:38like vectorizing files, searching them,
  1474. 48:41doing similarity search across data
  1475. 48:43using tools, um things like that. I
  1476. 48:45think that's like just like a super
  1477. 48:47common use case for tools in general.
  1478. 48:49Um so yeah, there's opinions on that
  1479. 48:52kind of built into the AI SDK because it
  1480. 48:54is so common.
  1481. 48:56Yeah,
  1482. 48:57um and then uh
  1483. 49:00there is
  1484. 49:02uh we'll we'll get to that question in a
  1485. 49:03little bit. Uh
  1486. 49:05I will jump back in. What what is
  1487. 49:07streaming? So
  1488. 49:09Yeah, so streaming is just a really easy
  1489. 49:11way. So instead of calling like the
  1490. 49:12prompt method on the agent, if I call
  1491. 49:14stream, super easy way to send back a
  1492. 49:17stream or a stream of text to the front
  1493. 49:20end so that, you know, like in the same
  1494. 49:22way as when you interact with chats
  1495. 49:24online, how the text sort of like
  1496. 49:25streams in line by line as it's
  1497. 49:27available. The stream method in the AI
  1498. 49:29SDK makes that super easy. So this uses
  1499. 49:32uh ACTP server sent events um called SSE
  1500. 49:37for streaming text back as it's
  1501. 49:39available. And then in this example, you
  1502. 49:41can see we're using this kind of then
  1503. 49:43method. We can actually do something
  1504. 49:44once it's all been streamed. If there's
  1505. 49:46some sort of like either follow-up
  1506. 49:49action we want to do or something, I
  1507. 49:51don't know, some arbitrary code we want
  1508. 49:53to run after the stream is complete, we
  1509. 49:55can do that here.
  1510. 49:57But then on the front end in our
  1511. 49:58JavaScript or um using Livewire or
  1512. 50:01something, we can actually consume that
  1513. 50:02stream to like show text as it as it is
  1514. 50:05available so that you don't have to wait
  1515. 50:07for
  1516. 50:08uh the entire response to be generated
  1517. 50:10before you see anything.
  1518. 50:11Yeah, that is really nice part of of it
  1519. 50:13being so succinctly tied in with the
  1520. 50:16front end. I I like that. Uh for
  1521. 50:18example, within View and React, we have
  1522. 50:20the use stream hook. Uh but then
  1523. 50:22Livewire has the the wire stream field
  1524. 50:24to take all of this and and make it look
  1525. 50:26like you would expect within Chat GPT
  1526. 50:27where it's kind of streaming line by
  1527. 50:29line.
  1528. 50:30>> Yeah.
  1529. 50:30Um what what about async? This is this
  1530. 50:33is interesting to me cuz I've I've I've
  1531. 50:35I've heard a lot of cool things about
  1532. 50:37it, but I'm I'm not quite sure how it
  1533. 50:38how it actually works behind the scenes.
  1534. 50:40Yeah, so this is another example of how
  1535. 50:42the S AISDK is sort of like uh leaning
  1536. 50:45into a lot of Laravel's full stack, you
  1537. 50:47know, batteries included opinions where
  1538. 50:50um instead of calling prompt or stream,
  1539. 50:52in this case we're calling queue or
  1540. 50:53we're actually
  1541. 50:55basically queuing a prompt. So we're
  1542. 50:56saying, "Hey, we want to call the LLM
  1543. 50:58with this prompt, but we want to do that
  1544. 51:00in a queue job in the background because
  1545. 51:03we don't necessarily need or want to
  1546. 51:05wait for the response right now.
  1547. 51:07Um we just need to queue this to happen
  1548. 51:08in the background and then we'll do
  1549. 51:10something with the response later."
  1550. 51:12So when you call this queue method, it's
  1551. 51:13actually going to create a background
  1552. 51:15job on your Laravel queue to respond to
  1553. 51:18this prompt and then the then and the
  1554. 51:20catch callbacks will be invoked when the
  1555. 51:22response is ready or if something goes
  1556. 51:24wrong respectively.
  1557. 51:25>> Yeah. Um so once we get the response, we
  1558. 51:27can store it in a database or send an
  1559. 51:29email or whatever we we want to do with
  1560. 51:31that response. Or if something goes
  1561. 51:32wrong, we can handle that as well in the
  1562. 51:34catch callback. But basically, you know,
  1563. 51:37this would be used where
  1564. 51:39uh the user user submits something that
  1565. 51:41we want to analyze with AI, but we don't
  1566. 51:44really want the user to have to sit and
  1567. 51:45wait for it to be done right then.
  1568. 51:48So we we want to return a response to
  1569. 51:50the user like, "Hey, we're processing
  1570. 51:51this. We'll let you know when it's
  1571. 51:53ready." or whatever. And then
  1572. 51:56that happens really quickly or I
  1573. 51:57basically instantaneously and in the
  1574. 51:58background this job is running and then
  1575. 52:01we'll do something. We'll notify the
  1576. 52:02user maybe when it's ready or when it's
  1577. 52:04done or whatever.
  1578. 52:05This makes it super simple to do that.
  1579. 52:08Yeah. So I would I would say like off
  1580. 52:11the top of my head it seems like a good
  1581. 52:12use case for this would be
  1582. 52:14maybe transcribing a 100 megabyte 200
  1583. 52:17megabyte audio upload where you don't
  1584. 52:20want them to wait for a full request
  1585. 52:22until they get the response for that.
  1586. 52:23That's awesome. I love that. A question
  1587. 52:25on the async stuff from Lynn. Is the
  1588. 52:27async stuff non-blocking? Does it use
  1589. 52:29the react PHP PSR-18 browser?
  1590. 52:32Yeah, this async stuff is more like
  1591. 52:35queue related.
  1592. 52:36Um
  1593. 52:37so it doesn't really it doesn't really
  1594. 52:39have anything to do with like async in
  1595. 52:40the sense of like concurrency or like
  1596. 52:43you know
  1597. 52:44go co-routines or anything like that.
  1598. 52:47It's more about just like
  1599. 52:49putting something on your background
  1600. 52:51queue and then doing something with it
  1601. 52:52later.
  1602. 52:53Yeah.
  1603. 52:55Um I think I saw another question. Yes,
  1604. 52:58the SDK is compatible with the Ollama
  1605. 53:01API. I would assume yes as well,
  1606. 53:04correct? Yes, I think so. Yeah. Yeah,
  1607. 53:06and you can even
  1608. 53:08there's a new I think we just documented
  1609. 53:10this the other day maybe two days ago.
  1610. 53:12There's a in your config file you can
  1611. 53:14actually override the base URL for any
  1612. 53:17provider. So you can actually use any AI
  1613. 53:19provider that is like OpenAI compatible
  1614. 53:22or Ollama compatible
  1615. 53:24just by overriding that base URL.
  1616. 53:28Yeah.
  1617. 53:29Question here that we we kind of glossed
  1618. 53:31over here at the top I'm curious to hear
  1619. 53:33what how how this was kind of built
  1620. 53:35Taylor and then also what your thoughts
  1621. 53:37are in terms of
  1622. 53:39I know that there's also a use cheapest
  1623. 53:41model trace uh and stuff like that. So,
  1624. 53:43in terms of automatic failover, uh and
  1625. 53:46then how does all that work behind the
  1626. 53:48scenes?
  1627. 53:49Yeah, so, um yeah yes, you can do this.
  1628. 53:52And it pretty much works how um this
  1629. 53:54person is asking, where you pass
  1630. 53:56multiple providers and models to the
  1631. 53:59prompt method or either uh or specify
  1632. 54:01them in the provider attribute on the
  1633. 54:03agent itself, where
  1634. 54:05if one provider is either overloaded or
  1635. 54:08you are rate limited on that provider,
  1636. 54:11um it will actually just fall back to
  1637. 54:13the next provider in the list that you
  1638. 54:15give it. So, maybe you try Anthropic
  1639. 54:17first. If Anthropic is overloaded or
  1640. 54:19you're just rate limited on Anthropic,
  1641. 54:21it will fall back to OpenAI, for
  1642. 54:23example.
  1643. 54:24Um we do that by checking like the
  1644. 54:25response codes from the AI providers
  1645. 54:28that we get back, so we can see like,
  1646. 54:29oh, they're you know, overloaded or we
  1647. 54:32get like a I think it's like a 429 HTTP
  1648. 54:34code if you're rate limited or something
  1649. 54:36like that. And then we can fall back to
  1650. 54:38the next provider, and we actually raise
  1651. 54:39an event that you can listen for to know
  1652. 54:41that you got uh you had a failover. And
  1653. 54:44we're working on bringing a lot of this
  1654. 54:45event visibility into Nightwatch, so
  1655. 54:47that you're going to be able to see, you
  1656. 54:49know, like, how much tokens am I using
  1657. 54:50on which providers, and how long are my
  1658. 54:52tool calls taking, and things like that.
  1659. 54:54Um anyway, so that that's kind of like
  1660. 54:56model failover. And then uh you
  1661. 54:59mentioned kind of like some of the
  1662. 55:00attributes you can put on agents, like
  1663. 55:02use cheapest model, use smartest model.
  1664. 55:05I kind of wanted to have this nice way
  1665. 55:07to just like annotate an agent with use
  1666. 55:11cheapest model, for example. And
  1667. 55:13sometimes you have tasks, like it's
  1668. 55:14basic text summarization or something
  1669. 55:16like that, where you don't need like
  1670. 55:18Anthropic Opus 4.6 for that, right? It's
  1671. 55:21it's like Yeah, it's like $100, yeah.
  1672. 55:24Yeah, exactly. So, if you're just trying
  1673. 55:25to summarize like a paragraph of text in
  1674. 55:27the one sentence, for example,
  1675. 55:29um you can just use like Haiku.
  1676. 55:32So, the benefit of putting use cheapest
  1677. 55:33model on the agent is, like let's say
  1678. 55:35tomorrow a new cheapest model comes out.
  1679. 55:38Mhm. You don't really have to go look,
  1680. 55:40okay, like, what is that model? What is
  1681. 55:42Let me copy the ID for it, like, paste
  1682. 55:44it into my code. If you're just like,
  1683. 55:45use cheapest model,
  1684. 55:47and you just like, composer update to
  1685. 55:48get the latest AI SDK, you're just like,
  1686. 55:50always on Yeah. the latest cheapest or
  1687. 55:52smartest model. So, it's just kind of
  1688. 55:53nice. You don't really have to update
  1689. 55:55your code if you know that this agent is
  1690. 55:57doing something that's not very, like,
  1691. 55:59doesn't require a lot of intelligence.
  1692. 56:01Yeah. No, I I love that. Uh cuz it's one
  1693. 56:03of those things similar to what you had
  1694. 56:05mentioned at the beginning where you
  1695. 56:08having the one package that makes it
  1696. 56:10easier and more eloquent in the sense of
  1697. 56:12you're not having to you you have those
  1698. 56:14opinions already formed for you when it
  1699. 56:16comes to cheapest, when it comes to
  1700. 56:17smartest, uh even when it comes to
  1701. 56:19automatic failover for
  1702. 56:21uh those are things that you probably
  1703. 56:22mostly want when you're building a
  1704. 56:23full-stack application. You just don't
  1705. 56:24want to do it yourself in a lot of ways.
  1706. 56:26>> Yeah, totally.
  1707. 56:28Uh lastly, what about attachments?
  1708. 56:30This is interesting.
  1709. 56:31>> Yes. Yeah, so attachments kind of come
  1710. 56:33up in a few places throughout the AI
  1711. 56:34SDK. So, in this example, we're using it
  1712. 56:36when prompting and doing text
  1713. 56:38generation. So,
  1714. 56:40you know, maybe we're giving it I think
  1715. 56:42in some of my demos I've given it like a
  1716. 56:43CSV of sales leads or maybe you're
  1717. 56:46giving it a PDF of a transcript and
  1718. 56:48you're saying, "Analyze this this
  1719. 56:50document or parse it or do something
  1720. 56:52with it." So, we just make it super easy
  1721. 56:54to give attachments in various places.
  1722. 56:56So, you can do it here with text. We
  1723. 56:58also actually let you do it when you're
  1724. 56:59generating images. So, you could give it
  1725. 57:01um you could prompt the model, "Hey,
  1726. 57:03here's an image and I want to um make it
  1727. 57:07like cartoon style or like a painting or
  1728. 57:10I want to change something about it,
  1729. 57:11like, basically remix an existing
  1730. 57:13image." Um you can also use attachments
  1731. 57:15for that as well.
  1732. 57:17Um so, yeah, it's super easy to attach
  1733. 57:20and upload files and and kind of
  1734. 57:22interact with them. Yeah, here's a
  1735. 57:23here's a uh image example. Yeah, or
  1736. 57:25maybe you're asking, "What's in the
  1737. 57:26image?" So, I can give it an image and I
  1738. 57:28can combine that even with like
  1739. 57:29structured output to like analyze images
  1740. 57:33and generate um structured output that I
  1741. 57:36can do something with.
  1742. 57:39I love that. I love that. Uh quick
  1743. 57:41question. Uh I'm going to close out this
  1744. 57:44screen or or stop sharing my screen real
  1745. 57:47quick just so we can uh answer this
  1746. 57:48question. I'm going to pull up a demo
  1747. 57:50that I built so we can walk through it
  1748. 57:52in a practical sense before we and then
  1749. 57:54we maybe if we still have some time we
  1750. 57:55can build something from scratch cuz I'm
  1751. 57:57curious to see uh how Claude code also
  1752. 58:00works with the AI SDK and to get gaining
  1753. 58:02to show everyone there. But question
  1754. 58:04says now that we have the Laravel SDK,
  1755. 58:05what's next? Laravel's focus on ASP is
  1756. 58:07exciting and I think it's the right
  1757. 58:08stuff for it. Are there any future
  1758. 58:10plans? So I guess
  1759. 58:11what You kind of mentioned the the the
  1760. 58:13whole
  1761. 58:15um
  1762. 58:16uh remembering agent being one of your
  1763. 58:18things that you're focusing on. What do
  1764. 58:19you think is after that?
  1765. 58:22Um I've got a actually got a list of
  1766. 58:23things that I that I'm working on
  1767. 58:26um sort of like post beta and even after
  1768. 58:28the stable release. So yeah, I've got a
  1769. 58:30list of features I want to keep working
  1770. 58:32on for sort of the conversation storage,
  1771. 58:34context retrieval, all of that stuff. I
  1772. 58:37mean it's stuff like some basic stuff
  1773. 58:39like pruning of the
  1774. 58:41historical conversations or compaction
  1775. 58:43of the history and sort of like
  1776. 58:45summaries and snapshots and things like
  1777. 58:46that. There's some stuff around tools
  1778. 58:48and sort of agent loops that I want to
  1779. 58:51look at. So like human uh tool approval
  1780. 58:53is a good one. So like say you want the
  1781. 58:56LLM to be able to invoke like a refund
  1782. 58:58customer tool but it needs human
  1783. 59:01approval if the refund amount is greater
  1784. 59:03than $200.
  1785. 59:05Um so like stuff like that. It's kind of
  1786. 59:06these more advanced complicated tool use
  1787. 59:09cases.
  1788. 59:10Um and then there's other agent stuff
  1789. 59:13like uh agent loops.
  1790. 59:15Um
  1791. 59:15you know, more customization of when the
  1792. 59:17agent actually stops doing things. This
  1793. 59:19is sort of gets into like some of the
  1794. 59:22uh you know, you've seen people have
  1795. 59:23these like so-called Ralph Wiggum loops
  1796. 59:25of where you can
  1797. 59:26have like infinite loops of agents doing
  1798. 59:28things. So, a lot of like agent loop
  1799. 59:30configuration and stuff like that. Also,
  1800. 59:33want to build like a cool artisan
  1801. 59:34command like um
  1802. 59:36artisan agent chat. So, where like if
  1803. 59:38you have an agent and you just want to
  1804. 59:39like chat with it maybe to see how it's
  1805. 59:41behaving or what it's doing. I can just
  1806. 59:43come into the command line and do agent
  1807. 59:45chat and then I can just like pick an
  1808. 59:46agent from a list using Laravel prompts
  1809. 59:49and then just chat with it and see like,
  1810. 59:51"Okay, is it behaving like how I would
  1811. 59:53expect, you know?" Uh
  1812. 59:55and it'll almost like the the DD of you
  1813. 59:58know, like agent debugging [laughter]
  1814. 1:00:00in a way.
  1815. 1:00:00>> The AI DD in a in a lot of ways. That'd
  1816. 1:00:03be that'd be really interesting. I
  1817. 1:00:04almost imagine then you could have its
  1818. 1:00:07own agent MCP where your Claude code or
  1819. 1:00:10LLM whatever is kind of can interact
  1820. 1:00:12with the agent and talk to each other.
  1821. 1:00:14Yeah. And then there's a there's a you
  1822. 1:00:16know, there's already a bunch of PRs
  1823. 1:00:18open from the community and one of the
  1824. 1:00:20ones I think that is most requested or
  1825. 1:00:23most on everyone's minds is uh so-called
  1826. 1:00:25like sub agents. Um and one easy way to
  1827. 1:00:29think about this is almost like the
  1828. 1:00:31ability to expose another agent as a
  1829. 1:00:33tool
  1830. 1:00:35from
  1831. 1:00:37another agent. So, like imagine I have a
  1832. 1:00:38you know, one primary agent and in its
  1833. 1:00:41tools method, maybe I don't only return
  1834. 1:00:43tools I can also return other agents.
  1835. 1:00:45So, it can actually call on, "Okay,
  1836. 1:00:48you are sort of like an an orchestrator
  1837. 1:00:50agent and you can call on maybe this
  1838. 1:00:52planning agent or this research agent or
  1839. 1:00:54this other type of agent that is more
  1840. 1:00:55specialized to do things." There's
  1841. 1:00:57actually a PR open for that right now.
  1842. 1:00:59Um that I need to review. Hopefully, I
  1843. 1:01:01get it reviewed today and but at least
  1844. 1:01:04get kind of get out that sub agent
  1845. 1:01:06behavior this week. But, a lot of it
  1846. 1:01:08will be driven by the community, you
  1847. 1:01:09know, I think there's like dozens of
  1848. 1:01:10pull requests already out there and
  1849. 1:01:12that's kind of how it always goes in the
  1850. 1:01:14open source world, you know, like
  1851. 1:01:16I I'm driving. I have one hand on the
  1852. 1:01:18wheel but the community also has a hand
  1853. 1:01:20on the wheel and you know, we're we're
  1854. 1:01:22hopefully getting to a good destination.
  1855. 1:01:24Yeah, co-piloting together. Yeah,
  1856. 1:01:27exactly.
  1857. 1:01:27>> great place. Uh that there kind of
  1858. 1:01:30similar you kind of answered a couple
  1859. 1:01:31questions in the chat I sense of can you
  1860. 1:01:33call an agent from another agent doesn't
  1861. 1:01:35sound like it's possible.
  1862. 1:01:36>> Yeah, that's it. That is something
  1863. 1:01:37that's coming
  1864. 1:01:38in terms of agent orchestrate
  1865. 1:01:39orchestration and everything like that.
  1866. 1:01:42Again, thanks so much for everyone being
  1867. 1:01:44in the chat. I wanted to talk I want to
  1868. 1:01:45walk through a demo that I actually
  1869. 1:01:46built and I'm curious to get your
  1870. 1:01:48thoughts Taylor on what could be what
  1871. 1:01:51could be added to this but then we can
  1872. 1:01:53jump in and maybe build something from
  1873. 1:01:55scratch as well.
  1874. 1:01:57But thanks so much everyone for for
  1875. 1:01:58joining. If you're just joining or maybe
  1876. 1:02:00you've been here the last 10-15 minutes
  1877. 1:02:02haven't heard me do this spiel yet. We
  1878. 1:02:04are with Taylor talking about the AI SDK
  1879. 1:02:08that was just released
  1880. 1:02:10last Thursday, Friday, Thursday.
  1881. 1:02:13Um and so it's only been out for four
  1882. 1:02:17days.
  1883. 1:02:18Um and so it's been crazy be able to see
  1884. 1:02:20how many people are already building
  1885. 1:02:21with it, how many like Taylor said how
  1886. 1:02:23many new PR's have already been added.
  1887. 1:02:26But just walking through the
  1888. 1:02:28possibilities of it as well as just
  1889. 1:02:30talking through why it was built in the
  1890. 1:02:32first place. So if you're here, let us
  1891. 1:02:33know you're here. You have any questions
  1892. 1:02:35we'll try to get to them as best as
  1893. 1:02:36possible.
  1894. 1:02:37Yeah, I wanted to talk show this little
  1895. 1:02:40demo that I built. It's actually live
  1896. 1:02:44right now. I'm not going to tell
  1897. 1:02:45everyone the the URL just because I
  1898. 1:02:47don't I don't want to crash while we're
  1899. 1:02:49on on on stream but I'll share it at the
  1900. 1:02:51end
  1901. 1:02:52so that you can have it as well as a
  1902. 1:02:54GitHub repo. And I'll put it in the
  1903. 1:02:56description if you're watching this in
  1904. 1:02:59in review. But this is a little I wanted
  1905. 1:03:01to try to find a way to build using
  1906. 1:03:04almost everything or almost as much of
  1907. 1:03:06the AI SDK as possible. Yeah.
  1908. 1:03:09And the premise for this was I always
  1909. 1:03:12save a lot of links that I always forget
  1910. 1:03:16what those links are. Bookmarks have
  1911. 1:03:17never worked for me.
  1912. 1:03:19Um even most AI tools have never worked
  1913. 1:03:22for me because it only saves like the
  1914. 1:03:23link and maybe meta description. Doesn't
  1915. 1:03:25necessarily save any of my thoughts on
  1916. 1:03:28it or anything like that. And so I want
  1917. 1:03:29[clears throat] to build a thing using
  1918. 1:03:31the AI SDK that either
  1919. 1:03:33uh takes a file that I upload, maybe a
  1920. 1:03:35screenshot, a document, or a URL
  1921. 1:03:39and then have it upload to this vector
  1922. 1:03:42store. So we're actually using um the
  1923. 1:03:45vector storage
  1924. 1:03:46uh
  1925. 1:03:48uh part of the AI SDK to auto chunk that
  1926. 1:03:51embed. And this is one cool thing that I
  1927. 1:03:52actually didn't know. I'm curious I'd
  1928. 1:03:55get your thoughts on like what's the
  1929. 1:03:56difference between storing something in
  1930. 1:03:59vector using OpenAI's vector storage
  1931. 1:04:01versus
  1932. 1:04:02putting this in Postgres PG.
  1933. 1:04:05>> Yeah. Yeah, this kind of came up in a
  1934. 1:04:07Laravel idea. I mean, they are
  1935. 1:04:09the end goal is really similar, I would
  1936. 1:04:12say, in the sense of like we want to
  1937. 1:04:13store embeddings about things and then
  1938. 1:04:16search them or query them.
  1939. 1:04:18What is cool
  1940. 1:04:19I mean, I guess let's start with like um
  1941. 1:04:22the PG vector stuff. So like
  1942. 1:04:24in the AI SDK docs, we show you how to
  1943. 1:04:26take a string of text and generate
  1944. 1:04:28embeddings for it. And then you can put
  1945. 1:04:29that in a vector column in a Postgres
  1946. 1:04:32database. Now, as long as it has the PG
  1947. 1:04:34vector extension, which um most local uh
  1948. 1:04:37Postgres things do, like the Herd
  1949. 1:04:38version and then Laravel Cloud's uh
  1950. 1:04:40Postgres has it.
  1951. 1:04:42Um and then you can run queries on that
  1952. 1:04:44to find
  1953. 1:04:45um things that are similar to your
  1954. 1:04:47query. So like if I to go back to our
  1955. 1:04:49Mexican food example, which we both
  1956. 1:04:51like, like if I stored like um
  1957. 1:04:55you know, restaurants that have great
  1958. 1:04:57cheese dip and then I search for good
  1959. 1:05:00appetizers, those things are
  1960. 1:05:02semantically similar even though they
  1961. 1:05:04don't actually have the same words
  1962. 1:05:06contained within them. They're similar
  1963. 1:05:07ideas. And so that that that's the
  1964. 1:05:09purpose of semantic search is to be able
  1965. 1:05:11to pull back things that are related.
  1966. 1:05:13So, you can actually store those
  1967. 1:05:15embeddings in your own Postgres
  1968. 1:05:16database, or you can actually upload
  1969. 1:05:20files or data to OpenAI or Gemini, and
  1970. 1:05:23they will vectorize and store them for
  1971. 1:05:26you. So,
  1972. 1:05:27it's you know, it's just sort of like
  1973. 1:05:29one of the convenient things about
  1974. 1:05:30storing them on OpenAI or Gemini is you
  1975. 1:05:32can just hand them a PDF, they will
  1976. 1:05:34extract all of the text and vectorize it
  1977. 1:05:36for you out of the PDF and all of that,
  1978. 1:05:39you know, like doing that all locally,
  1979. 1:05:41you're going to have to pull the text
  1980. 1:05:42out of the PDF, you're going to have to
  1981. 1:05:44vectorize it.
  1982. 1:05:46Um, you're going to have to store it.
  1983. 1:05:48Um, so it is kind of convenient just to
  1984. 1:05:49be able to like throw files at OpenAI or
  1985. 1:05:51Gemini and say, "Hey, like vectorize
  1986. 1:05:52these for me. I don't want to even have
  1987. 1:05:54to think about it." Yeah. It's just you
  1988. 1:05:56know,
  1989. 1:05:57it's two different ways of doing similar
  1990. 1:05:58things. Yeah. Yeah. No, I I love that.
  1991. 1:06:02Um, and so yeah, this this works in the
  1992. 1:06:04sense of the there's a couple cool
  1993. 1:06:06things that I really love is the how
  1994. 1:06:07easy it is to take an attachment, let's
  1995. 1:06:09say an image, and grab specific things
  1996. 1:06:12out of this using an AI agent to say,
  1997. 1:06:14"Okay, I have this image. Now I just
  1998. 1:06:16want like I I save a lot of screenshots
  1999. 1:06:19either on my phone or just like I'm I'm
  2000. 1:06:20grabbing things and usually I have like
  2001. 1:06:22a directory on my device. I wanted a
  2002. 1:06:24place to be able to save all of those,
  2003. 1:06:25but then also be able to query them in
  2004. 1:06:27later things." So, again, the goal of
  2005. 1:06:29this is one to kind of scratch my own
  2006. 1:06:31itch and build with the AI SDK, and then
  2007. 1:06:34two, be able to show as much as possible
  2008. 1:06:36off of the AI SDK. So, I want to grab
  2009. 1:06:38we'll go to we'll go to Laravel News. I
  2010. 1:06:39want to find like a quick
  2011. 1:06:41uh little link that I might be able to
  2012. 1:06:43save. Um, so let's go ahead and maybe
  2013. 1:06:46we'll see
  2014. 1:06:49see here like OpenAI releases GPT-5.3
  2015. 1:06:53Codex. I'm going to grab this link and
  2016. 1:06:56go back to my URL here, and if I just
  2017. 1:06:59paste this in, I can add a specific
  2018. 1:07:02comment about this URL, or I can just
  2019. 1:07:03capture this. And this is one of those
  2020. 1:07:05uh async things that's happening then on
  2021. 1:07:07in the background where um I can still
  2022. 1:07:10you know go to different links
  2023. 1:07:12uh but it's still being stored and
  2024. 1:07:15retrieved in the background uh looks
  2025. 1:07:17like because it's uh because it's a
  2026. 1:07:20JavaScript front end I this this failed.
  2027. 1:07:22So, here we're going to upload a
  2028. 1:07:23screenshot instead. I'm going to go back
  2029. 1:07:25to that link and I'm just going to
  2030. 1:07:26upload we'll we'll zoom uh we'll zoom
  2031. 1:07:29out here.
  2032. 1:07:31And I'm just going to paste a quick
  2033. 1:07:33screenshot.
  2034. 1:07:36Just of this.
  2035. 1:07:38There we go. We'll go back to here.
  2036. 1:07:40We'll go paste this in and upload and
  2037. 1:07:42analyze. So, what should be doing within
  2038. 1:07:44the uh AI SDK
  2039. 1:07:47is it's going to grab the process using
  2040. 1:07:51the vision to say, "Hey, let's describe
  2041. 1:07:53what is actually happening in this
  2042. 1:07:55image." And not even just transcribing
  2043. 1:07:57it, but the cool thing about that vision
  2044. 1:07:59SDK is like you get additional aspects.
  2045. 1:08:02You can send a specific prompt in with
  2046. 1:08:04vision to say, "Okay, I actually want
  2047. 1:08:06these particular things." If we're
  2048. 1:08:08building a research library, I want to
  2049. 1:08:10know what's pertinent to this. You can
  2050. 1:08:12see here it says it's uh
  2051. 1:08:14a detailed description of the image.
  2052. 1:08:16Screenshots,
  2053. 1:08:17uh top header, uh large rectangular card
  2054. 1:08:20with rounded corners and a soft drop
  2055. 1:08:22shadow. All all of the neat things that
  2056. 1:08:24you might want from image. Uh it's a lot
  2057. 1:08:25more than I actually thought it would be
  2058. 1:08:27from just one one simple image.
  2059. 1:08:29But the neat part about this is uh kind
  2060. 1:08:32of everything that's happening in the
  2061. 1:08:33background is a couple people mentioned
  2062. 1:08:35uh
  2063. 1:08:36"What would you recommend for front end
  2064. 1:08:39things?" Some people said polling versus
  2065. 1:08:41broadcasting. What are your thoughts,
  2066. 1:08:42Taylor? And I'll tell you say what I did
  2067. 1:08:44in this particular demo. Oh, man.
  2068. 1:08:47Um I like there's something
  2069. 1:08:50>> would be a good answer question, I
  2070. 1:08:51guess. There is something just like
  2071. 1:08:53really nice about for simple stuff just
  2072. 1:08:56throwing like a wire pole on a div and
  2073. 1:08:59it just like works. [laughter]
  2074. 1:09:02So, if you don't have anything else
  2075. 1:09:04Yeah, if you don't have tons of users
  2076. 1:09:06like or maybe it's just a tool for
  2077. 1:09:08yourself even, you know, like you're the
  2078. 1:09:10only user,
  2079. 1:09:11which I think in the age of AI we're
  2080. 1:09:13seeing more sort of just like personal
  2081. 1:09:15software, right? I'm just like tools
  2082. 1:09:16people are creating for themselves that
  2083. 1:09:18are really intended just for them. I
  2084. 1:09:19think throwing like some polling or
  2085. 1:09:21especially with Livewire I mean it's so
  2086. 1:09:22easy with wire polling. I guess Inertia
  2087. 1:09:24has polling as well now since Inertia 2.
  2088. 1:09:27I think that's nice, but if if you're in
  2089. 1:09:28like uh more of a production use case
  2090. 1:09:30like let's say like Laravel Forge or
  2091. 1:09:32Laravel Cloud's dashboard where there's
  2092. 1:09:34hundreds of users in there at a time,
  2093. 1:09:36wire polling can be a little bit more
  2094. 1:09:38inefficient since you're kind of like
  2095. 1:09:40continually hitting that back end
  2096. 1:09:42whether there's data ready or not, you
  2097. 1:09:44know. Um
  2098. 1:09:45broadcasting kind of gives you more of
  2099. 1:09:46like a push mechanism to where you're
  2100. 1:09:48just pushing data as needed so it's a
  2101. 1:09:50lot more efficient. Yep. Yeah, in this
  2102. 1:09:53particular demo I did use broadcasting
  2103. 1:09:55with with the use like with with Reverb
  2104. 1:09:58and then like the use Echo
  2105. 1:10:01hooks to watch for that so that way
  2106. 1:10:03when we're
  2107. 1:10:05you know, when we're grabbing something
  2108. 1:10:07from the web or we're up uploading a
  2109. 1:10:09screenshot for example, if I go into
  2110. 1:10:11here and I just say something like uh I
  2111. 1:10:14don't know. We'll just grab this from
  2112. 1:10:16the from the AI SDK. And if I go into
  2113. 1:10:19and and actually paste it, it's
  2114. 1:10:21happening behind the scenes, yes, but
  2115. 1:10:23once it finishes, you'll see that happen
  2116. 1:10:26live. So, this is one of the things that
  2117. 1:10:27of course like Taylor said, you could
  2118. 1:10:28use this with wire pull where it's just
  2119. 1:10:31constantly pinging the server
  2120. 1:10:33every 5 seconds or whatever and it will
  2121. 1:10:35update automatically, but this is using
  2122. 1:10:38specifically for this demo, it's using
  2123. 1:10:40the vector storage to store all of this.
  2124. 1:10:42Once it does read it from the vision,
  2125. 1:10:46and then we're getting a structure
  2126. 1:10:47output so that when we chat with it and
  2127. 1:10:50you can see that kind of popped up right
  2128. 1:10:51there.
  2129. 1:10:52Now we can chat and have all of those
  2130. 1:10:56things and if I pop over to this chat,
  2131. 1:10:58this is where we have a couple
  2132. 1:10:59additional features that we kind of
  2133. 1:11:01already walked through with the AI SDK.
  2134. 1:11:03We have conversational to say, "Hey,
  2135. 1:11:05here's like
  2136. 1:11:06um
  2137. 1:11:07remembering those particular agents.
  2138. 1:11:10Uh but then we also have uh streaming
  2139. 1:11:12set up as well as file search and web
  2140. 1:11:14search. These are the two tools that me
  2141. 1:11:16personally tell you I Those were like
  2142. 1:11:18incredibly easy and I loved having them
  2143. 1:11:21to not have to uh I I I've I've built a
  2144. 1:11:24couple AI tools where I'm relying on
  2145. 1:11:27uh maybe my maybe, you know, web search
  2146. 1:11:31within PHP, for example, instead of
  2147. 1:11:35giving AIs the tools to be able to do it
  2148. 1:11:37themselves. Yeah.
  2149. 1:11:39Uh I'm curious of like what were your We
  2150. 1:11:41kind of talked about in tools, but what
  2151. 1:11:43was your thoughts on those three tools,
  2152. 1:11:44the file search, web search, and um the
  2153. 1:11:47image search?
  2154. 1:11:48Uh file search, web search, and web
  2155. 1:11:51fetch are the
  2156. 1:11:53three built-in Well, I guess there's
  2157. 1:11:54also uh similarity search we haven't
  2158. 1:11:56really got into, but Yeah, I mean, I
  2159. 1:11:58wanted to give people um you know, I
  2160. 1:12:00think these are just like a incredibly
  2161. 1:12:02common use cases. Um
  2162. 1:12:04web search and web fetch are of course
  2163. 1:12:06used to sort of overcome the training
  2164. 1:12:09knowledge cut off for the LLMs where we
  2165. 1:12:11can actually go out and fetch relevant
  2166. 1:12:13data. I actually use
  2167. 1:12:16this type of functionality in LLMs a lot
  2168. 1:12:19when I'm maintaining the Laravel docs.
  2169. 1:12:21And
  2170. 1:12:22um
  2171. 1:12:23for or when I'm writing the docs for a
  2172. 1:12:25new framework feature. So, one thing I
  2173. 1:12:27will do is go into the docs, fire up
  2174. 1:12:28Claude code, and say, "Hey, can you
  2175. 1:12:30write docs for this PR?" And I will like
  2176. 1:12:32paste in the PR URL on GitHub, and it
  2177. 1:12:37works like incredibly well, actually.
  2178. 1:12:39So, it's super convenient to be able to
  2179. 1:12:41give the AI the ability to fetch web
  2180. 1:12:43pages in a variety of scenarios. Yeah.
  2181. 1:12:46No, I love that. I love that. I'm just
  2182. 1:12:49going to ask you a question about
  2183. 1:12:51um let's see.
  2184. 1:12:53Uh maybe maybe we'll say
  2185. 1:12:55what was that latest model
  2186. 1:12:58from open AI?
  2187. 1:12:59We should see it's search the specific
  2188. 1:13:03things that it already has pertain to my
  2189. 1:13:04local user and we should see those tool
  2190. 1:13:07calling that should be made here. So
  2191. 1:13:08it's searching the knowledge base
  2192. 1:13:11and then it found you know the open AI
  2193. 1:13:13model mentioned is GPT 5.3 codex in our
  2194. 1:13:15saved notes. So this is a use case of
  2195. 1:13:18particular conversational API that we
  2196. 1:13:20kind of talked about.
  2197. 1:13:22In the sense of it's remembering the
  2198. 1:13:23things if I was to ask
  2199. 1:13:25without having that context of something
  2200. 1:13:27like
  2201. 1:13:30what
  2202. 1:13:32And you even had the tool call thing was
  2203. 1:13:33that
  2204. 1:13:34you even had the tool call thing like
  2205. 1:13:35show up to us this really fancy. That
  2206. 1:13:38was that was a fun I I I didn't know
  2207. 1:13:40that that was possible
  2208. 1:13:42because I've only ever worked with chat
  2209. 1:13:44where it was just returning text so
  2210. 1:13:46returning the
  2211. 1:13:48when it returns and I could be wrong
  2212. 1:13:51or or misremembering but I would I think
  2213. 1:13:53when you return the structured output
  2214. 1:13:57it open AI specifically which is what
  2215. 1:14:00the provider I'm using with gives
  2216. 1:14:03says when it's calling particular tools
  2217. 1:14:05as a JSON so it's really easy to parse
  2218. 1:14:07that within you stream is that correct?
  2219. 1:14:09>> Yeah yeah yeah when you stream stuff you
  2220. 1:14:11get sort of like tool call start tool
  2221. 1:14:13call end you get like you know these
  2222. 1:14:15various events for when tools are being
  2223. 1:14:17used.
  2224. 1:14:20Yeah I'm curious
  2225. 1:14:22actually haven't tested if I can search
  2226. 1:14:24on the web then
  2227. 1:14:25of like what what link is that
  2228. 1:14:28associated to
  2229. 1:14:30on the web I think I marked this down so
  2230. 1:14:32it doesn't actually go go on call but
  2231. 1:14:34I'm just curious now
  2232. 1:14:35>> [laughter]
  2233. 1:14:35>> if that
  2234. 1:14:37if that does it couple questions
  2235. 1:14:40some people said I didn't
  2236. 1:14:42I said there it is using a web search
  2237. 1:14:43tools.
  2238. 1:14:46Okay it'll blog post we'll call that.
  2239. 1:14:48>> something yeah.
  2240. 1:14:49>> Yeah, we'll we'll call that good. Open
  2241. 1:14:51AI open AI blog post, which is probably
  2242. 1:14:53what Laravel News is referencing. So,
  2243. 1:14:55we're we're good there. Uh some people
  2244. 1:14:58said I I made it easy to guess the URL.
  2245. 1:14:59Yeah, I'm sorry. I mostly I did not
  2246. 1:15:01scale I I think I'm using a very small
  2247. 1:15:05Laravel Cloud server for this.
  2248. 1:15:07Uh so, if it if it crashes, that's not
  2249. 1:15:09Laravel Cloud's fault. That's my fault
  2250. 1:15:11for not scaling it up. Um What did you
  2251. 1:15:14use to build this, Josh? Is this a Is
  2252. 1:15:15this a Claude code special or is this
  2253. 1:15:17cursor or what? Is this Is this all
  2254. 1:15:19handwritten? This is mostly Claude code
  2255. 1:15:21uh with some handwritten stuff for the
  2256. 1:15:23for the chat. So, I did figure out
  2257. 1:15:25quickly uh what stuff uh
  2258. 1:15:28Claude code doesn't seem to do a great
  2259. 1:15:30job um with and the use stream stuff of
  2260. 1:15:34uh it took me took me a while to figure
  2261. 1:15:36out that uh it returns the JSON for
  2262. 1:15:39structure for for streaming
  2263. 1:15:41um and being able to
  2264. 1:15:42kind of push that back and forth. I was
  2265. 1:15:44trying to do some
  2266. 1:15:46uh I whenever Claude code goes out and
  2267. 1:15:49tries to build like five different files
  2268. 1:15:51and I'm like, "No, this should probably
  2269. 1:15:52just be like one option in the Laravel
  2270. 1:15:54AI cuz I know it's a lot cleaner than
  2271. 1:15:56that." That's when I start having uh
  2272. 1:15:58some second guesses. So, most of this
  2273. 1:15:59was built um within Claude code with
  2274. 1:16:02with me referencing by hand each
  2275. 1:16:04particular AI
  2276. 1:16:06capability and being able to prompt to
  2277. 1:16:08saying, "Hey, I know that the AI SDK can
  2278. 1:16:10do this. Let's make it do that." Right.
  2279. 1:16:15Um someone has said, "In an AI first
  2280. 1:16:17future, do you see Laravel becoming an
  2281. 1:16:19orchestrator of AI agents rather than
  2282. 1:16:22just an HTTP framework?" I'm curious
  2283. 1:16:24your thoughts on that.
  2284. 1:16:25>> Yeah, I mean, I could definitely see
  2285. 1:16:26that. If there's one thing I've learned
  2286. 1:16:28in like the 15 years of maintaining
  2287. 1:16:30Laravel is that people will use it for
  2288. 1:16:32all kinds of things I didn't expect. So,
  2289. 1:16:34[laughter]
  2290. 1:16:34um
  2291. 1:16:35yeah, you know, I mean, like I think
  2292. 1:16:37people building AI agents and like AI
  2293. 1:16:40features is going to be the thing for a
  2294. 1:16:42long time for the foreseeable future.
  2295. 1:16:44So,
  2296. 1:16:45I think it's you know, it's good for
  2297. 1:16:47Laravel to sort of have this good
  2298. 1:16:49first-party
  2299. 1:16:50option there.
  2300. 1:16:53I love it.
  2301. 1:16:54Um why don't I fire up uh
  2302. 1:16:58um
  2303. 1:17:00maybe a Claude code instance and we can
  2304. 1:17:03create a Laravel application from
  2305. 1:17:05scratch and maybe Taylor I'll have you
  2306. 1:17:08talk through with me of of how you might
  2307. 1:17:11maybe
  2308. 1:17:13help start from scratch and and I'd be
  2309. 1:17:15curious to see your your thoughts on
  2310. 1:17:18what are the things you're kind of
  2311. 1:17:19looking for to make sure everything is
  2312. 1:17:21working the way what what kind of
  2313. 1:17:22revisions you you look at. Um the idea
  2314. 1:17:24that I have
  2315. 1:17:26and we can maybe
  2316. 1:17:27kickstart this a little bit more. The
  2317. 1:17:29idea that I have mostly because I have a
  2318. 1:17:30fallback to show what I built right
  2319. 1:17:33before this just in case things don't
  2320. 1:17:35work out. But the idea that I have is
  2321. 1:17:37we maybe upload some markdown files
  2322. 1:17:40about us or about the user as an
  2323. 1:17:43individual and then we can use 11 Labs
  2324. 1:17:46API as a voice
  2325. 1:17:49to be able to talk
  2326. 1:17:51to it, transcribe our voice, get an
  2327. 1:17:53answer, then have it talk back to us.
  2328. 1:17:56Okay. Yeah, that sounds good. Um so, let
  2329. 1:17:59me go ahead and
  2330. 1:18:01share my screen again real quick.
  2331. 1:18:04Uh so, the for those still in the chat
  2332. 1:18:07with us,
  2333. 1:18:08what's uh
  2334. 1:18:11uh what's your what's your favorite
  2335. 1:18:13drink of choice maybe while you're
  2336. 1:18:15coding? I know Taylor just took a swig
  2337. 1:18:17of a Coke Zero.
  2338. 1:18:19Uh so, who who else is Coke Zero fans
  2339. 1:18:23or what what else is your your
  2340. 1:18:25particular drink of choice? How many
  2341. 1:18:27Coke Zeros have you consumed so far
  2342. 1:18:29today, Taylor?
  2343. 1:18:30Uh I think like three. I drink I'm I
  2344. 1:18:33drink a lot of Coke Zeros. So, that's
  2345. 1:18:36I I saw it research on it that like
  2346. 1:18:38everyone talks about like oh you know
  2347. 1:18:40you know
  2348. 1:18:41diet Cokes are still bad for you and
  2349. 1:18:43Coke Zeros are still bad for you and all
  2350. 1:18:44this.
  2351. 1:18:45Um but then uh
  2352. 1:18:47some research said you had to you had to
  2353. 1:18:49have I think somewhere around 40. Yeah,
  2354. 1:18:52>> 40 or something Coke Zeros before it
  2355. 1:18:55even before you even get to the required
  2356. 1:18:58limit which is like a thousand percent
  2357. 1:19:00lower than what the actual limit is or
  2358. 1:19:02something like that.
  2359. 1:19:02>> Yeah. Yeah, it's pretty wild.
  2360. 1:19:06Um
  2361. 1:19:08Taylor, what IDE do you use? I'll say
  2362. 1:19:10that before you Oh, I'm still using a a
  2363. 1:19:13lot of Sublime Text, you know. I'm kind
  2364. 1:19:15of interested to see where like the IDE
  2365. 1:19:18space goes like as a concept, you know.
  2366. 1:19:21I think you even see this with Cursor,
  2367. 1:19:22right? With them like kind of leaning
  2368. 1:19:23more into their agent mode as like the
  2369. 1:19:25default view even for booting up the
  2370. 1:19:28IDE.
  2371. 1:19:30And it's like, you know, um
  2372. 1:19:32previously when we were like handwriting
  2373. 1:19:34so much code, I remember when I was
  2374. 1:19:36first starting in my like career using
  2375. 1:19:38Visual Studio to write .NET and the IDE
  2376. 1:19:41was just so incredibly important in
  2377. 1:19:43terms of like the intelligence it gave
  2378. 1:19:45you and the shortcuts and it was kind of
  2379. 1:19:47built for like handwriting code
  2380. 1:19:49productively, right? Yeah. And now as we
  2381. 1:19:51move into a future where like
  2382. 1:19:53handwriting code to some extent starts
  2383. 1:19:55to feel painful just as a concept of
  2384. 1:19:57like why would you handwrite all of the
  2385. 1:19:59code? I'm curious to see like how the
  2386. 1:20:01IDE arena
  2387. 1:20:03sort of like evolves with like, you
  2388. 1:20:05know, VS Code and and PHP Storm and you
  2389. 1:20:07know, Sublime Text is more of almost
  2390. 1:20:09more of an editor than an IDE, but
  2391. 1:20:12um I'm still using Sublime Text paired
  2392. 1:20:14with uh Claude Code and Open Code.
  2393. 1:20:17I love it. I'm I'm similar not not with
  2394. 1:20:19Sublime, but I'm using Zed editor with
  2395. 1:20:22paired paired with Claude Code um
  2396. 1:20:25and Open Code mostly because I I I kind
  2397. 1:20:27of like the when I'm writing handwritten
  2398. 1:20:30stuff, I don't want like even
  2399. 1:20:31autocomplete maybe a little bit of
  2400. 1:20:33auto-complete I'm okay with.
  2401. 1:20:34>> Yeah.
  2402. 1:20:35But most of the
  2403. 1:20:35>> I'm kind of the same way. Yeah. I find
  2404. 1:20:38Zed and Sublime like
  2405. 1:20:40Zed is the closest thing to Sublime that
  2406. 1:20:41like I've ever used that's not Sublime.
  2407. 1:20:43You know, I find them so similar.
  2408. 1:20:46I've not I've never used Sublime. I
  2409. 1:20:47think I did when I was first writing
  2410. 1:20:50HTML files but I didn't learn it enough
  2411. 1:20:52to when it stuck cuz I was using VS Code
  2412. 1:20:54for the longest time.
  2413. 1:20:55Um
  2414. 1:20:56People in the chat want water. We got
  2415. 1:20:59Coke Zero. A lot of water.
  2416. 1:21:01Boring.
  2417. 1:21:02>> [laughter]
  2418. 1:21:03>> Water for code. Pepsi Zero. I'm a
  2419. 1:21:05villain. Yeah, that I don't know what he
  2420. 1:21:08>> Really?
  2421. 1:21:08>> [laughter]
  2422. 1:21:09>> I
  2423. 1:21:10Sometimes I'm at like a
  2424. 1:21:11>> or Pepsi Zero?
  2425. 1:21:13Uh I
  2426. 1:21:15I don't know if I've even had Diet
  2427. 1:21:16Pepsi. I've only I think I've only had
  2428. 1:21:17Pepsi Zero. But sometimes you're just in
  2429. 1:21:19a Pepsi establishment, right? And you
  2430. 1:21:20just like don't have a choice because
  2431. 1:21:22it's like a Pepsi household. Um so I've
  2432. 1:21:24definitely had it.
  2433. 1:21:25>> [laughter]
  2434. 1:21:26>> That's true. I do like Dr. Pepper Zero.
  2435. 1:21:28That is like Yeah, that is good. I agree
  2436. 1:21:30with that. That's good. That is that is
  2437. 1:21:32one of my specialties.
  2438. 1:21:33We got Tim Horton's Steep Tea, some
  2439. 1:21:35lemon iced tea.
  2440. 1:21:37I'm I'm I'm thrilled at how many Coke
  2441. 1:21:39Zeros there are in the chat. I love
  2442. 1:21:41that.
  2443. 1:21:42And I actually went to the store this
  2444. 1:21:44morning after the kids went to school
  2445. 1:21:46cuz I was out of Coke Zero. And so I
  2446. 1:21:48pull into the parking spot and like as
  2447. 1:21:50I'm getting out there's this lady
  2448. 1:21:52loading her car next to me and she is
  2449. 1:21:53loading that car with Coke Zero and I'm
  2450. 1:21:55like
  2451. 1:21:56this this is one of my people. Right?
  2452. 1:21:59>> [laughter]
  2453. 1:21:59>> Full size Cans too?
  2454. 1:22:01Uh yeah, they were actually bottles.
  2455. 1:22:02They were like big plastic bottles of
  2456. 1:22:04Coke Zero. I almost like said something
  2457. 1:22:06but I figured she'd just be weirded out.
  2458. 1:22:09Why do you care about my Coke Zero? I'm
  2459. 1:22:12curious if you've ever had the thought
  2460. 1:22:13of of
  2461. 1:22:15putting Coke Zero maybe like getting a
  2462. 1:22:17whole bunch of 2 liters putting it on
  2463. 1:22:18tap and and doing that or if you just
  2464. 1:22:21like can all the way.
  2465. 1:22:23Uh I mean I I like the can but I mean
  2466. 1:22:26some places have like a really good tap,
  2467. 1:22:28you know, like to me McDonald's they
  2468. 1:22:30have like some kind of magic tap where
  2469. 1:22:32it's just like the soda comes out
  2470. 1:22:34so much better than it does other
  2471. 1:22:35places, but Oh, yeah. Yeah.
  2472. 1:22:38But to me to me actually the peak is
  2473. 1:22:40like glass bottle Coke Zero, which is
  2474. 1:22:42not easy to find to be honest. Um
  2475. 1:22:46but they do have it and I've I've found
  2476. 1:22:48it occasionally. More in Europe actually
  2477. 1:22:49than in the United States, but a glass
  2478. 1:22:52bottle Coke Zero that that really hits
  2479. 1:22:53different.
  2480. 1:22:55I I I maybe we'll get it have have this
  2481. 1:22:58happen at this year's Laracon. By the
  2482. 1:23:00way, Laracon US tickets are out live
  2483. 1:23:03right now. We're going to Boston this
  2484. 1:23:05year laracon.us.
  2485. 1:23:06Uh but I I pictured this that last
  2486. 1:23:08Laracon. Maybe we'll get it have it
  2487. 1:23:10happen this one. I want to do Have you
  2488. 1:23:12ever done like those blind tasting
  2489. 1:23:14things? But we'll do Taylor
  2490. 1:23:16blind tasting Coke Zero behind like
  2491. 1:23:18glass, can,
  2492. 1:23:20uh McDonald's Coke Zero or McDonald's
  2493. 1:23:22Diet Coke and have you figure it out.
  2494. 1:23:24Yeah, that'd be fun actually.
  2495. 1:23:27So we'll we'll we'll put it now that
  2496. 1:23:28it's in the atmosphere. We'll we'll put
  2497. 1:23:30it out there.
  2498. 1:23:31Um let's let's do a new let's do Laravel
  2499. 1:23:33new.
  2500. 1:23:35Okay. Um I'm going to call this uh
  2501. 1:23:38the Larvis agent like Laravel
  2502. 1:23:41Jarvis.
  2503. 1:23:42Okay. Um
  2504. 1:23:44and uh we'll we'll go ahead and we'll
  2505. 1:23:46make this uh React just for simplicity.
  2506. 1:23:49We'll go no authentication scaffolding
  2507. 1:23:52uh past How do you like to do Laravel
  2508. 1:23:54new, Taylor? Like what's what's your I
  2509. 1:23:56was just thinking we need a Laravel new
  2510. 1:23:58dash dash I was just thinking we need a
  2511. 1:24:00Laravel new dash dash Taylor that just
  2512. 1:24:02like it's all my own opinions. Ooh,
  2513. 1:24:05that'd be awesome.
  2514. 1:24:05>> usually
  2515. 1:24:07Oh man, this is a good one. I mean it
  2516. 1:24:08kind of depends on what I'm doing. I do
  2517. 1:24:09like the blank starter kits like you
  2518. 1:24:11picked here with like just no
  2519. 1:24:12authentication scaffolding for stuff
  2520. 1:24:13like this.
  2521. 1:24:15Um
  2522. 1:24:16and then uh you know, I usually just use
  2523. 1:24:19the defaults like past or whatever. Mhm.
  2524. 1:24:22Yeah. Yeah, I I I I know if you were
  2525. 1:24:24dash dash react and then dash dash cuz
  2526. 1:24:26you can put all that into one
  2527. 1:24:28>> Yeah, I don't really do that. Yeah, I
  2528. 1:24:29don't I never do that. Yeah, do you do
  2529. 1:24:31you do the empty empty prompt then
  2530. 1:24:34in terms of like the
  2531. 1:24:36the Laravel new and not even any name
  2532. 1:24:39after? I usually do specify a name. So,
  2533. 1:24:41I'll do like Laravel space new space
  2534. 1:24:43something. So, like I
  2535. 1:24:45I actually forgot that you you can
  2536. 1:24:46actually leave off the app name, I
  2537. 1:24:48guess. It'll just ask you. Okay, I kind
  2538. 1:24:50of forgot about that. But, I usually I
  2539. 1:24:52usually provide the app name. Yeah, I I
  2540. 1:24:54provide I provide the app name as well.
  2541. 1:24:56But, yeah, one of the things I've
  2542. 1:24:58learned with when I'm
  2543. 1:24:59scaffolding something out with
  2544. 1:25:02with LLMs like Claude code for example
  2545. 1:25:04is
  2546. 1:25:06the blank no
  2547. 1:25:09dashboard and no authentication almost
  2548. 1:25:11is easier because otherwise it tries to
  2549. 1:25:14confine it into the dashboard sometimes
  2550. 1:25:16and from a UI standpoint it looks a
  2551. 1:25:18little then I just have it you know, I I
  2552. 1:25:20usually do manually like cutting that
  2553. 1:25:23out and clearing it up. So, I I like the
  2554. 1:25:24I like the blank side.
  2555. 1:25:26Um
  2556. 1:25:27we will Um I'm not going to use the
  2557. 1:25:30heard MCP. I'm going to use Claude code.
  2558. 1:25:34Um
  2559. 1:25:35and then I'm curious Taylor, what are
  2560. 1:25:36your the ways if you like let's say
  2561. 1:25:39you're scaffolding something out with
  2562. 1:25:41with LLM, you're not jumping too much
  2563. 1:25:42into the code to start until you get to
  2564. 1:25:44a certain point, whatever that might
  2565. 1:25:46look like. Um do you install packages
  2566. 1:25:48first? Do you do any kind of like PHP
  2567. 1:25:51artisan model creates or how do you
  2568. 1:25:53What's your way of going about this? Uh
  2569. 1:25:55yeah, that's a good question. Sometimes
  2570. 1:25:57I will put a little bit of light
  2571. 1:25:58scaffolding in place first and I did
  2572. 1:26:00this as well as I was even just building
  2573. 1:26:02the AI SDK where
  2574. 1:26:04>> [clears throat]
  2575. 1:26:04>> I would actually just scaffold out a few
  2576. 1:26:06like sometimes even empty classes of
  2577. 1:26:08like, "Hey, here's kind of like the
  2578. 1:26:09structure of how I want things to look."
  2579. 1:26:12Um so, maybe I'd define like an
  2580. 1:26:13interface or a few classes just to kind
  2581. 1:26:15of like
  2582. 1:26:16put some kind of like rails in place,
  2583. 1:26:18you know, as far as okay, here's kind of
  2584. 1:26:20the shape of what we want this app to
  2585. 1:26:22look like and then
  2586. 1:26:23let the model kind of like, you know,
  2587. 1:26:25paint between the lines from there.
  2588. 1:26:27Yeah.
  2589. 1:26:28Yeah, I kind of go I kind of go back and
  2590. 1:26:29forth myself. Most of the time I I
  2591. 1:26:31install all the packages that I want and
  2592. 1:26:33set all the packages up first and then I
  2593. 1:26:37get and usually then like any kind of
  2594. 1:26:38like maybe tables, migrations that I
  2595. 1:26:41know I specifically want and then I jump
  2596. 1:26:43in. Uh yeah, I found that Yeah, that's
  2597. 1:26:46the way I like to do it. It feels like
  2598. 1:26:48I'm I am setting the the course, for
  2599. 1:26:51example. Right. Yeah.
  2600. 1:26:52>> Um
  2601. 1:26:53Let's go ahead and install the Laravel
  2602. 1:26:55AI SDK.
  2603. 1:26:56>> [snorts]
  2604. 1:26:56>> And then we uh
  2605. 1:26:59we
  2606. 1:27:00uh I believe we publish uh
  2607. 1:27:03Yeah. Um
  2608. 1:27:06I always forget the
  2609. 1:27:07Yeah. We need to publish and then we can
  2610. 1:27:08search for it.
  2611. 1:27:10Yep.
  2612. 1:27:12tags
  2613. 1:27:13Yeah, I got it. Yeah, service provider.
  2614. 1:27:16Oh. Okay, yeah, I think that works.
  2615. 1:27:17Yeah. There you go. That's just the
  2616. 1:27:19Yeah, that should be all we Oh, we
  2617. 1:27:20actually need to publish the uh
  2618. 1:27:23uh the
  2619. 1:27:28Let's go into the docs. We actually need
  2620. 1:27:29to publish the
  2621. 1:27:32uh
  2622. 1:27:32>> We need the migrations. Yeah. Yeah. So,
  2623. 1:27:35we'll go ahead and do that as well.
  2624. 1:27:39Perfect.
  2625. 1:27:41I'm going to hide my screen and input um
  2626. 1:27:44some environment variables cuz that's
  2627. 1:27:45usually what I would do next. So, I'm
  2628. 1:27:47going to
  2629. 1:27:48do this mostly just
  2630. 1:27:51I'm going to delete them anyways right
  2631. 1:27:52after this, but just in case I don't I
  2632. 1:27:55don't uh
  2633. 1:27:56don't pull those up anywhere.
  2634. 1:27:58Um
  2635. 1:28:01So, we're going to use 11 Labs.
  2636. 1:28:05And we're going to use uh probably
  2637. 1:28:08OpenAI SDK cuz it makes it a little bit
  2638. 1:28:11simpler.
  2639. 1:28:14I'm going to copy this.
  2640. 1:28:19Perfect.
  2641. 1:28:28All right.
  2642. 1:28:39And so, Terry, you said that you had
  2643. 1:28:40used uh Claude code mostly in like open
  2644. 1:28:43code. Do you Do you do uh like the
  2645. 1:28:45dangerously
  2646. 1:28:48Pretty much, yeah.
  2647. 1:28:50>> all the time or do you Do you Do you
  2648. 1:28:51watch it?
  2649. 1:28:52>> much.
  2650. 1:28:53Um
  2651. 1:28:54No, I pretty much do this and to be
  2652. 1:28:56honest. Yeah. Uh here's a Here's a quick
  2653. 1:28:59tip that I actually didn't know
  2654. 1:29:01until like the last couple of of weeks
  2655. 1:29:03for those For those who do use Claude
  2656. 1:29:05code, um if you go to and bypass or
  2657. 1:29:08dangerously skip permissions, you can
  2658. 1:29:09still do the shift tab to go into plan
  2659. 1:29:12mode, for example. Um without going back
  2660. 1:29:15and And you can go back into bypass
  2661. 1:29:16permissions on. I I do that mostly cuz I
  2662. 1:29:18always I always like to do plan mode um
  2663. 1:29:21just to get things up and running. Yeah,
  2664. 1:29:23I do too, especially for bigger
  2665. 1:29:25features.
  2666. 1:29:26So, I'm going to do uh PHP artisan
  2667. 1:29:29um migrate and we're going to make sure
  2668. 1:29:31I'm on the right one. Um
  2669. 1:29:37Perfect. And so, we're going to in
  2670. 1:29:41Claude code, we are going to build
  2671. 1:29:44uh an application where we can upload or
  2672. 1:29:49uh
  2673. 1:29:49have some local markdown files.
  2674. 1:29:53And using the Laravel AI SDK, we are
  2675. 1:29:58going to
  2676. 1:30:01take those markdown files and generate
  2677. 1:30:05or and have uh an assistant be able to
  2678. 1:30:09answer questions using the voice mode.
  2679. 1:30:14So, uh when we
  2680. 1:30:16talk to the assistant in an extremely
  2681. 1:30:21simple
  2682. 1:30:23UI
  2683. 1:30:24uh they can transcribe
  2684. 1:30:28our uh voice with voice-to-text from AI
  2685. 1:30:32SDK,
  2686. 1:30:34uh pass that to
  2687. 1:30:36uh an agent to be able to generate an
  2688. 1:30:40answer based on
  2689. 1:30:43our markdown files.
  2690. 1:30:45And then
  2691. 1:30:47uh generates a response using the voice
  2692. 1:30:53from
  2693. 1:30:54AI SDK.
  2694. 1:30:57So, I'm curious what was the difference
  2695. 1:30:59between the Larvis directory and the
  2696. 1:31:00Larvis agent directory? Um oh, are we in
  2697. 1:31:03Larvis? Oh. Yeah, we're in Larvis.
  2698. 1:31:05That's That's the This is This is the
  2699. 1:31:07one that I already did.
  2700. 1:31:09>> [laughter]
  2701. 1:31:09>> Yeah, cancel that. Yeah, we'll cancel
  2702. 1:31:11that one out.
  2703. 1:31:12Uh we'll go into We'll go to Larvis
  2704. 1:31:14agent.
  2705. 1:31:15There we go. Thank you.
  2706. 1:31:18Uh I already I already did this mostly
  2707. 1:31:21because I wanted to something to show at
  2708. 1:31:22the end if we either didn't have enough
  2709. 1:31:23time or or if or if anything did. So,
  2710. 1:31:26um
  2711. 1:31:27but it's a it's a good uh good for those
  2712. 1:31:31uh
  2713. 1:31:31uh I'm curious then for those in the
  2714. 1:31:33chat who are using LLMs. What is the
  2715. 1:31:35thing maybe one or two things that you
  2716. 1:31:37do
  2717. 1:31:39or that you found that have been helpful
  2718. 1:31:41maybe with building in Laravel or
  2719. 1:31:43something that you always like to do
  2720. 1:31:45even if you are having AI do most of the
  2721. 1:31:48work. Like, what's something that you
  2722. 1:31:49either look at, something that you make
  2723. 1:31:51sure you review?
  2724. 1:31:53Uh Taylor, when it comes to like
  2725. 1:31:54reviewing the work or testing it out,
  2726. 1:31:56what's your first thing maybe like after
  2727. 1:31:58you run a prompt even plan mode, what's
  2728. 1:32:00the first thing that you like go to
  2729. 1:32:02double-check in the code?
  2730. 1:32:04I kind of pull up
  2731. 1:32:06um
  2732. 1:32:07I pull up the whole like diff in the
  2733. 1:32:09GitHub desktop
  2734. 1:32:11actually.
  2735. 1:32:11>> Okay. And that way it's just like it
  2736. 1:32:13it's really easy visualization of every
  2737. 1:32:15file that changed and I can really
  2738. 1:32:16quickly just kind of scan through them
  2739. 1:32:18and see what's going on.
  2740. 1:32:20Um
  2741. 1:32:22and then I will usually clean up a
  2742. 1:32:24variety of things. It might be like
  2743. 1:32:26really nitpicky things like method order
  2744. 1:32:28or where I put a method in the class. I
  2745. 1:32:30kind of like organize methods logically
  2746. 1:32:32or in a certain way that I like. Um I I
  2747. 1:32:35haven't really reliably been able to
  2748. 1:32:37automate that with like a with an AI
  2749. 1:32:39guidelines or anything. And then like
  2750. 1:32:42um
  2751. 1:32:43I'll just kind of continue the
  2752. 1:32:44conversation with the AI, you know, if
  2753. 1:32:46like maybe sometimes it um
  2754. 1:32:49it duplicated something or I was like,
  2755. 1:32:51"Hey, you could actually have a more
  2756. 1:32:52general abstraction around this and like
  2757. 1:32:54make this file and extract this here and
  2758. 1:32:56then use it both places." I'll kind of
  2759. 1:32:58coach it along
  2760. 1:33:00um or try different things, but um
  2761. 1:33:03yeah, that's kind of how I approach it.
  2762. 1:33:04I don't use a lot of like
  2763. 1:33:07really let's call them like fancy AI
  2764. 1:33:09workflows in the sense of like I usually
  2765. 1:33:11have like one or two Claude code tabs
  2766. 1:33:13open. I'm kind of working on a couple
  2767. 1:33:16maybe one or two things at most kind of
  2768. 1:33:18specifically
  2769. 1:33:19um at a time, you know, I have I haven't
  2770. 1:33:21really dug too far into like I've got
  2771. 1:33:23you know, 10 different Claude codes
  2772. 1:33:26churning on in parallel-wise task on the
  2773. 1:33:29same code base without them like running
  2774. 1:33:31into each other and I haven't really
  2775. 1:33:33experienced that or like found a need
  2776. 1:33:34for that, but um
  2777. 1:33:36you know, I'm pretty simple guy I guess
  2778. 1:33:37when it comes to the
  2779. 1:33:39AI usage and how I use it.
  2780. 1:33:41Awesome.
  2781. 1:33:43Um so then have you jumped into the the
  2782. 1:33:45open claw stuff yet? So for those who
  2783. 1:33:48don't know, you can run open claw on
  2784. 1:33:49Forge right now. It's super simple to
  2785. 1:33:51get it set up. Have you jumped into it,
  2786. 1:33:52Taylor, or no? I I've only like
  2787. 1:33:54scratched the surface of it, you know, I
  2788. 1:33:56have got an open claw like up and
  2789. 1:33:58running when I was playing with the Ford
  2790. 1:33:59stuff. I I can't say that I'm like super
  2791. 1:34:02deep into it like automating my entire
  2792. 1:34:04life, but I do love the concept. I think
  2793. 1:34:07like I actually wrote my own Telegram
  2794. 1:34:10chatbot for AI
  2795. 1:34:13along like year or two ago
  2796. 1:34:15just because I find like Telegram or
  2797. 1:34:17like WhatsApp like the super convenient
  2798. 1:34:19sort of just like interface for talking
  2799. 1:34:21to AI on the go. Uh mine was just a
  2800. 1:34:24simple chatbot. It had no other like
  2801. 1:34:26functionality that open claw has, but I
  2802. 1:34:28think it's a really cool project. You
  2803. 1:34:31know, I'm curious like how it evolves
  2804. 1:34:32and where it goes from here, but pretty
  2805. 1:34:34crazy how it's like you know, got
  2806. 1:34:36everyone buying Mac minis all over the
  2807. 1:34:38place.
  2808. 1:34:41Awesome.
  2809. 1:34:42We're doing some plan modes. Where do
  2810. 1:34:44the
  2811. 1:34:45markdown files live? Let's go resources.
  2812. 1:34:48docs. I'm curious Taylor, you get your
  2813. 1:34:49thoughts on like if you're doing
  2814. 1:34:50anything locally.
  2815. 1:34:52Like would you do storage app? Seems
  2816. 1:34:54like AI loves storage app. I don't know
  2817. 1:34:56what it is about that. So are these
  2818. 1:34:57these are files that is this files that
  2819. 1:34:59the user is going to upload? Uh maybe
  2820. 1:35:02either user or if this was just meant to
  2821. 1:35:03be deployed locally. Like let's say you
  2822. 1:35:06>> Okay. If it's just going to be deployed
  2823. 1:35:08locally, I think I would go resources.
  2824. 1:35:09docs. I think that makes sense.
  2825. 1:35:12Uh
  2826. 1:35:13direct attachments. We'll probably do
  2827. 1:35:15that instead of a instead of a
  2828. 1:35:17file search.
  2829. 1:35:19Let's do that. Um and then we can text
  2830. 1:35:23to speech. Let's do 11 labs.
  2831. 1:35:25And we'll do we'll do a single session.
  2832. 1:35:27It's a super super simple super super
  2833. 1:35:29generic. Um I forgot to publish the
  2834. 1:35:33um
  2835. 1:35:34the skills for the AI SDK. So before it
  2836. 1:35:37jumps into actually implementing this,
  2837. 1:35:38I'm going to
  2838. 1:35:40cancel out and do that. We have some
  2839. 1:35:41questions um in the chat. If you're
  2840. 1:35:43still here, thanks so much for being
  2841. 1:35:44here. Taylor's been awesome to be able
  2842. 1:35:46to answer some questions. And now we're
  2843. 1:35:47just having some fun
  2844. 1:35:49building with it as well. But some great
  2845. 1:35:51questions uh specifically for Taylor
  2846. 1:35:53about AI. I had a feeling Taylor didn't
  2847. 1:35:55like AI much. What made him change his
  2848. 1:35:58mind? What was the turning point?
  2849. 1:36:00I
  2850. 1:36:01uh I never have actually been anti-AI or
  2851. 1:36:04against AI. I think um you know,
  2852. 1:36:07when coding agents and AI kind of first
  2853. 1:36:10got started, there was this big um
  2854. 1:36:14wave of like vibe coding as a concept,
  2855. 1:36:16right? It sort of like dominated the
  2856. 1:36:18discourse for, you know, a chunk of
  2857. 1:36:202025. It was this concept of vibe coding
  2858. 1:36:23where you're like not even reviewing the
  2859. 1:36:25code.
  2860. 1:36:27And I think um I don't relate a lot or
  2861. 1:36:30maybe don't
  2862. 1:36:32um for like production work, let's say,
  2863. 1:36:34or for like real work that I'm going to
  2864. 1:36:37like give to customers, I don't relate
  2865. 1:36:38to that way of coding as much. I think
  2866. 1:36:40that's a fun way of coding for like, you
  2867. 1:36:42know, personal projects that are sort of
  2868. 1:36:43low stakes and you actually don't care
  2869. 1:36:45about the code quality.
  2870. 1:36:48But, you know, what we've seen is just
  2871. 1:36:49like over time as the models get better,
  2872. 1:36:51I think like the quality of the code has
  2873. 1:36:53gotten so much better. And I'm actually
  2874. 1:36:55curious if you've seen like any
  2875. 1:36:57I know Opus 4.6 just been out not even,
  2876. 1:36:59I guess, a week yet.
  2877. 1:37:01Are you seeing like any big improvements
  2878. 1:37:04from like Opus 4.5 or has it not been
  2879. 1:37:07long enough to really even judge?
  2880. 1:37:09>> [laughter]
  2881. 1:37:10>> Yeah, I don't think I have seen too many
  2882. 1:37:13big improvements in the sense of like I
  2883. 1:37:15haven't used the new Codex as much.
  2884. 1:37:18I think the biggest improvements that
  2885. 1:37:20I've seen from both of those, just in my
  2886. 1:37:22gut reaction and feel, has been more in
  2887. 1:37:24like the the thinking through something
  2888. 1:37:27before doing it. I feel like I I'm I am
  2889. 1:37:30telling it no, that was wrong. Let's
  2890. 1:37:32think about this Let's do it this way
  2891. 1:37:34instead much less.
  2892. 1:37:36And I don't know if that's just because
  2893. 1:37:37it's using skills better, it's using
  2894. 1:37:39context better, or it's just smarter.
  2895. 1:37:41It's always hard to tell in that aspect.
  2896. 1:37:44You know what I'm sort of like
  2897. 1:37:46>> [snorts]
  2898. 1:37:46>> I curious to see where AI coding goes in
  2899. 1:37:48the sense of like I I've seen Dax and
  2900. 1:37:50open code kind of say similar things
  2901. 1:37:52where like
  2902. 1:37:53I almost feel like even if the models
  2903. 1:37:55only got marginally better from where
  2904. 1:37:57they are now at writing code
  2905. 1:37:59if they got like let's let's say they
  2906. 1:38:01got like 10% better but they got 10x
  2907. 1:38:04faster and like actually doing it I
  2908. 1:38:07actually think the speed for me is like
  2909. 1:38:08what I crave even more than like more
  2910. 1:38:12intelligence at this point. You know
  2911. 1:38:13what I mean? Like I find it for most
  2912. 1:38:15tasks that I'm asking them to do
  2913. 1:38:17they're intelligent enough to do because
  2914. 1:38:19I don't I don't I'm not doing rocket
  2915. 1:38:21science, right? I'm like building web
  2916. 1:38:23apps and pulling stuff from a database
  2917. 1:38:24and it's sort of like crud interfaces.
  2918. 1:38:27But if they could do it like 10x faster
  2919. 1:38:30like for me that would be like such an
  2920. 1:38:32even bigger unlock I feel like and then
  2921. 1:38:34like you know like here we've been
  2922. 1:38:35waiting for 6 minutes but what if it
  2923. 1:38:37only took it like 15 seconds to do all
  2924. 1:38:39of this? Like that would be incredible
  2925. 1:38:41you know. And hopefully we get there
  2926. 1:38:42over the next few years.
  2927. 1:38:45I'm going to run boost install again so
  2928. 1:38:47when we scaffold it out Laravel new we
  2929. 1:38:49installed boost we ran it but if we run
  2930. 1:38:50it again because we installed Laravel AI
  2931. 1:38:52SDK it's going to actually ask for us
  2932. 1:38:54right here to do these third-party AI
  2933. 1:38:56guidelines which I'm going to enter. Um
  2934. 1:38:59and make sure that our code here because
  2935. 1:39:04we're clearing context and bypassing
  2936. 1:39:05permissions it should use the skill now
  2937. 1:39:08that has access to it as well.
  2938. 1:39:10Uh but it might not at the same time.
  2939. 1:39:12I'm always curious if I think we have to
  2940. 1:39:14close out of it and then open it back up
  2941. 1:39:15again for new skills.
  2942. 1:39:17Uh we have um some people in the chat
  2943. 1:39:20are probably know a little bit more
  2944. 1:39:21about me in that particular aspect. Um
  2945. 1:39:25uh question about when you were creating
  2946. 1:39:26the AI SDK what did you want Did you
  2947. 1:39:29want to try and create a competitor to
  2948. 1:39:30LangChain and and that suite of code or
  2949. 1:39:32I guess
  2950. 1:39:34your thoughts
  2951. 1:39:34>> I sort of um
  2952. 1:39:36I sort of approach things pretty fresh.
  2953. 1:39:39Um
  2954. 1:39:40I'm not really like a heavy user of
  2955. 1:39:42LangChain or LangChain you know like or
  2956. 1:39:43anything like that Uh um
  2957. 1:39:46and I've built a lot of things in
  2958. 1:39:47Laravel this way for better or worse to
  2959. 1:39:49be honest over the years where I just
  2960. 1:39:51sort of like come at the problem with
  2961. 1:39:54no really preset opinions or like uh
  2962. 1:39:58baggage or like kind of historical
  2963. 1:40:00experience around it even and just sort
  2964. 1:40:02of look at it all fresh and based on my
  2965. 1:40:04own like opinions and use cases trying
  2966. 1:40:06to build something that I think is
  2967. 1:40:07interesting. Um and I try to put like
  2968. 1:40:12when I build a new package like the AI
  2969. 1:40:14SDK or even other features in Laravel, I
  2970. 1:40:16try to build just a good foundation that
  2971. 1:40:19I can feel confident about and release
  2972. 1:40:20into the community for like further
  2973. 1:40:23iteration you know so like
  2974. 1:40:25in in V1 of the AI SDK, I don't
  2975. 1:40:27necessarily set out to solve every
  2976. 1:40:29single um conceivable problem around
  2977. 1:40:31developing with AI. I try to give like
  2978. 1:40:33okay, here's a good foundation and like
  2979. 1:40:36um some scaffolding that we can start
  2980. 1:40:38from as a community and like have a
  2981. 1:40:39conversation about and then iterate from
  2982. 1:40:42there over a period of months and then
  2983. 1:40:44and you know eventually years um to
  2984. 1:40:46where things can evolve from there but I
  2985. 1:40:48try to put like a foundation in place uh
  2986. 1:40:51to start from.
  2987. 1:40:53Yeah.
  2988. 1:40:54No, that's awesome.
  2989. 1:40:56Um you mentioned like the fast code. Uh
  2990. 1:40:58have you tried uh someone in the chat
  2991. 1:41:00said Kimmy 2.5. You tried Kimmy 2.5 with
  2992. 1:41:02this stuff?
  2993. 1:41:03>> It is quite fast, yeah.
  2994. 1:41:05And I think it's a glimpse of like man
  2995. 1:41:07how like life changing OBS things get
  2996. 1:41:09even faster.
  2997. 1:41:11Yeah, and I'm with you though in the
  2998. 1:41:13sense of like most of the time unless
  2999. 1:41:15I'm doing like some kind of MVP like the
  3000. 1:41:18initial kickstart of a project, I might
  3001. 1:41:20be using something like Cod Code
  3002. 1:41:22um with with Opus 4.5 4.6 something like
  3003. 1:41:25that or Codex
  3004. 1:41:27um or a big feature but most time if I'm
  3005. 1:41:29just like wanting to nail out certain
  3006. 1:41:32things um either I'm
  3007. 1:41:35hand coding it within Zed and I'm I'm
  3008. 1:41:37just tweaking you know UI design or
  3009. 1:41:39tweaking like how how I I like parts of
  3010. 1:41:41the code or I'm just using something
  3011. 1:41:44like Kimmy 2.5 or something very quick
  3012. 1:41:46because I like the feel of it being Yes,
  3013. 1:41:48it's good. I'm I'm asking questions
  3014. 1:41:50about my code base. I want it now kind
  3015. 1:41:52of thing. Yeah.
  3016. 1:41:56Um so you use the Git desktop UI. Is
  3017. 1:42:00that new or have you always been using
  3018. 1:42:02that? I really only use it for a few
  3019. 1:42:05things. So like I don't use it for just
  3020. 1:42:07like committing or checking out branches
  3021. 1:42:09or anything like that. I'll just use the
  3022. 1:42:10CLI.
  3023. 1:42:12I use it for like
  3024. 1:42:14kind of reviewing history in the
  3025. 1:42:16repository. So like I want to see a list
  3026. 1:42:18of the previous commits and kind of what
  3027. 1:42:19files they changed. I find it just like
  3028. 1:42:21a nice UI for doing that or like if I
  3029. 1:42:24want to quickly like look at the stage
  3030. 1:42:26changes and then revert a few things.
  3031. 1:42:28It's really nice just to be able to like
  3032. 1:42:29right click a file, revert changes. Like
  3033. 1:42:32I don't have to like remember kind of
  3034. 1:42:33like how to do this on the command line.
  3035. 1:42:36Um and then again just kind of for
  3036. 1:42:38quickly reviewing things visually that
  3037. 1:42:40the AI does. I kind of use it for that
  3038. 1:42:42kind of thing. So it's more like
  3039. 1:42:44I almost use it more of like a diff
  3040. 1:42:46viewer like review tool than I don't
  3041. 1:42:48really use it as like a
  3042. 1:42:49you know kind of the branch switching or
  3043. 1:42:51committing even or anything like that.
  3044. 1:42:53Yeah. Um for me it's just a really quick
  3045. 1:42:55kind of like review tool.
  3046. 1:42:58Yeah.
  3047. 1:42:59Uh and those of us just joining we're
  3048. 1:43:02kind of using
  3049. 1:43:04Claude code to help us generate a
  3050. 1:43:07application using the AI SDK. So we'll
  3051. 1:43:09jump into the code that it's generated
  3052. 1:43:11to make sure one that's doing it the way
  3053. 1:43:12that we would want it to be done and
  3054. 1:43:15then two make sure that it works the way
  3055. 1:43:16we want it to be done too. But the neat
  3056. 1:43:18thing with the AI SDK is that since it
  3057. 1:43:20is built you know by Taylor in an
  3058. 1:43:22eloquent way it is designed in a way
  3059. 1:43:25that's whether we're using it for our
  3060. 1:43:27chat context like we're going to be
  3061. 1:43:29using it with an open AI or the 11 Labs
  3062. 1:43:32voice context. It's the same, you know,
  3063. 1:43:34the same API, the same model kind of
  3064. 1:43:37uh
  3065. 1:43:38uh the same uh knowledge kind of model
  3066. 1:43:41when we're when we're writing with it.
  3067. 1:43:43Uh looks like it's almost done. Got his
  3068. 1:43:45tests passed at least.
  3069. 1:43:47I like how the AI I see this a lot when
  3070. 1:43:49I use AI, too. It's like, "Let me run
  3071. 1:43:50pint one more time to be safe." You
  3072. 1:43:52know?
  3073. 1:43:53>> [laughter]
  3074. 1:43:53>> It's like
  3075. 1:43:55Some of some of my uh some of my
  3076. 1:43:56personal um looks like it just finished.
  3077. 1:43:58Some of my personal uh projects that I
  3078. 1:44:01use I I have it set up with Rector, uh
  3079. 1:44:04PHP Stan, and pint. And so, it's it's
  3080. 1:44:06it's fun to have it make sure that it
  3081. 1:44:08does does all of that. Uh is there
  3082. 1:44:11anything uh Taylor that you usually feel
  3083. 1:44:12that like it still doesn't get quite,
  3084. 1:44:15and so usually like you know every
  3085. 1:44:16single thing that you build, you check
  3086. 1:44:18this one or two things?
  3087. 1:44:21Ooh, that's a good question. Uh I don't
  3088. 1:44:22know.
  3089. 1:44:23Um
  3090. 1:44:26I didn't I hadn't really
  3091. 1:44:27>> though, too. Yeah, it can change. I did
  3092. 1:44:30nothing huge jumps out at me. Um
  3093. 1:44:33I've tried to like kind of coach it
  3094. 1:44:34along with my guidelines as much as I
  3095. 1:44:36can.
  3096. 1:44:37Yeah.
  3097. 1:44:39So, let's go. We We have a knowledge
  3098. 1:44:40assistant that created. Looks like it's
  3099. 1:44:42using the
  3100. 1:44:43>> I'd even use the attributes.
  3101. 1:44:44Nice.
  3102. 1:44:45>> Yeah, that's okay. I love that.
  3103. 1:44:47Uh so, a friendly knowledge
  3104. 1:44:48knowledgeable assistant. Um and uh the
  3105. 1:44:53documents do not contain enough
  3106. 1:44:54information to answer the question, say
  3107. 1:44:56so honestly. Keep your answers concise
  3108. 1:44:58to the conversation. So, just everyone
  3109. 1:44:59in the chat that knows we're we're
  3110. 1:45:00building um
  3111. 1:45:01an app that if we go to resources and
  3112. 1:45:03docs, we can create a
  3113. 1:45:06a markdown file in here, and maybe even
  3114. 1:45:08ask Claude code to generate some for us.
  3115. 1:45:11Um I might I might even do that uh just
  3116. 1:45:13for fun. I'll say,
  3117. 1:45:15um open up a new Claude code, and I'll
  3118. 1:45:17say we have this app that uses markdown
  3119. 1:45:21files about the user in order to answer
  3120. 1:45:25questions. Uh find some info on Taylor
  3121. 1:45:31Otwell, and generate relevant
  3122. 1:45:35markdown files in the resources
  3123. 1:45:39docs
  3124. 1:45:40directory.
  3125. 1:45:43Kick start that off. But the the goal is
  3126. 1:45:45to be able to then take all these
  3127. 1:45:47markdown documents and with this
  3128. 1:45:48knowledge assistant, and so we should go
  3129. 1:45:51into I believe it's probably in a
  3130. 1:45:52controller. Yeah, we have this ask
  3131. 1:45:54controller here that's using looks like
  3132. 1:45:56Laravel AI transcription files with
  3133. 1:45:58documents audio.
  3134. 1:46:01So I would assume hopefully it's using
  3135. 1:46:03it in the proper sense where we're
  3136. 1:46:05getting an upload of an audio. We're
  3137. 1:46:07going to transcribe it.
  3138. 1:46:09Um get all the
  3139. 1:46:12docs in the
  3140. 1:46:14markdown the resources docs directory,
  3141. 1:46:17and then we're going to create a new
  3142. 1:46:18knowledge assistant or new instance of
  3143. 1:46:19the knowledge assistant, and with that
  3144. 1:46:21prompt attach the attachments that we
  3145. 1:46:23have in the markdown file, get it text.
  3146. 1:46:25And then this is so clean. I love this
  3147. 1:46:27Taylor like how easy it is to say, I
  3148. 1:46:29just want an audio of this this answer.
  3149. 1:46:32Um
  3150. 1:46:34And so is is 11 correct? I don't
  3151. 1:46:37Yeah, that's correct. Yeah. Okay. Yeah,
  3152. 1:46:39that is correct.
  3153. 1:46:41Sweet.
  3154. 1:46:42Awesome. Uh the the one thing
  3155. 1:46:45the one thing that I've noticed and I
  3156. 1:46:46don't know if this is
  3157. 1:46:48just
  3158. 1:46:50me not prompting well, but the one thing
  3159. 1:46:52I have noticed within um
  3160. 1:46:54specifically within like the react
  3161. 1:46:56context within Laravel, for some reason
  3162. 1:46:58when it does stuff like
  3163. 1:47:01within like a controller where it's
  3164. 1:47:02hitting in hitting our API, it's not an
  3165. 1:47:05inertia like use form request cuz you
  3166. 1:47:07wouldn't use that for
  3167. 1:47:09chat for example. For some reason it
  3168. 1:47:11always likes to return it as an inertia
  3169. 1:47:13page, and so you get like this JSON
  3170. 1:47:16resource.
  3171. 1:47:17So I always usually try to tell it to
  3172. 1:47:19use
  3173. 1:47:19Axios or something like that. Then it
  3174. 1:47:21Yeah, yeah, yeah. Then it seems to do
  3175. 1:47:23well. Are you still on Axios user?
  3176. 1:47:25user
  3177. 1:47:27I I do use Axios quite a bit, but this
  3178. 1:47:30is actually something that's coming up
  3179. 1:47:32in Inertia 3, which
  3180. 1:47:35I think will be coming up, you know, in
  3181. 1:47:36the next I I don't want to speak for
  3182. 1:47:38what is coming out. I think it's coming
  3183. 1:47:40out pretty soon, let's say, like in the
  3184. 1:47:41next month or so.
  3185. 1:47:43There's going to be a use HTTP thing
  3186. 1:47:47that
  3187. 1:47:49you won't have to really use Axios
  3188. 1:47:52anymore with
  3189. 1:47:54I don't even think we're including Axios
  3190. 1:47:55by default anymore, which we do now in
  3191. 1:47:58many different things.
  3192. 1:47:59So, yeah, we're kind of giving people
  3193. 1:48:02kind of dropping that and going a little
  3194. 1:48:04bit lighter weight, but still giving
  3195. 1:48:05people some of the like affordances of
  3196. 1:48:07Axios.
  3197. 1:48:09Yeah, I love that.
  3198. 1:48:10>> I think Joe Tannenbaum's going to talk
  3199. 1:48:11about that at his Laracon Europe talk,
  3200. 1:48:13actually. He's going to kind of give
  3201. 1:48:14like an Inertia 3 preview or kind of
  3202. 1:48:17demo.
  3203. 1:48:18Perfect.
  3204. 1:48:20So, yeah, stay tuned.
  3205. 1:48:22I I don't know off the top of my head if
  3206. 1:48:23Laracon Europe talks are being streamed,
  3207. 1:48:25but you they're probably going to be
  3208. 1:48:27recorded at the very least, so be be
  3209. 1:48:29sure to stay tuned for that. Question
  3210. 1:48:32for Taylor, what's the recommended
  3211. 1:48:34approach to implementing production
  3212. 1:48:35grade guardrails? So, I guess within the
  3213. 1:48:38AI SDK, let's say you're doing this and
  3214. 1:48:40I I can maybe talk about even for my
  3215. 1:48:41simple demo of what I made sure to do.
  3216. 1:48:45What are some things that you can think
  3217. 1:48:46of in terms of prompt injection misuse
  3218. 1:48:49of elements, I mean API keys, that kind
  3219. 1:48:50of thing. Yeah, this is something we
  3220. 1:48:53haven't really built any opinions in
  3221. 1:48:55thus far.
  3222. 1:48:57I'm curious to see like what PRs come in
  3223. 1:48:59or what sort of like community feedback
  3224. 1:49:01is around this.
  3225. 1:49:03Um
  3226. 1:49:03you know, certain types of apps are sort
  3227. 1:49:05of more vulnerable vulnerable to this
  3228. 1:49:07than others depending on the sort of
  3229. 1:49:08like what you're doing and what tools
  3230. 1:49:10you're exposing and if you have tools
  3231. 1:49:12that can like, for example, delete
  3232. 1:49:14records out of your database, that's of
  3233. 1:49:15course like much more potentially
  3234. 1:49:18serious in terms of like prompt
  3235. 1:49:19injection or things like that versus
  3236. 1:49:20some other use cases. So, um yeah, this
  3237. 1:49:23is something we haven't baked anything
  3238. 1:49:24in on yet, but I'm curious to see sort
  3239. 1:49:27of like what people want and what people
  3240. 1:49:29have found, you know, most effective in
  3241. 1:49:31other ecosystems that maybe we could
  3242. 1:49:32learn from or borrow from.
  3243. 1:49:35Yeah.
  3244. 1:49:36Perfect. I love it. Um
  3245. 1:49:38can Laravel AI SDK be extended or
  3246. 1:49:40improved with plugins or add-ons? Um
  3247. 1:49:44Yeah, so I think like one of the cool
  3248. 1:49:46areas we'll see sort of like community
  3249. 1:49:48extension and collaboration is um you
  3250. 1:49:52could actually package up and distribute
  3251. 1:49:54either tools or agents and tools as
  3252. 1:49:57composer packages to give to other
  3253. 1:49:59people. So, maybe you write a tool that
  3254. 1:50:01is reusable and it does some some kind
  3255. 1:50:04of functionality that maybe a lot of
  3256. 1:50:05people would benefit from in different
  3257. 1:50:06kinds of applications. You could
  3258. 1:50:08actually package that up and distribute
  3259. 1:50:10it, you know, on packages as a tool that
  3260. 1:50:12other people can use.
  3261. 1:50:14Um so, I think that's one of the primary
  3262. 1:50:16ways you'll see people sort of like have
  3263. 1:50:18plugins or so-called add-ons for the AI
  3264. 1:50:20SDK is like distributing those types of
  3265. 1:50:23things
  3266. 1:50:24um
  3267. 1:50:25throughout the community.
  3268. 1:50:27That's awesome. I'm curious to know how
  3269. 1:50:29much uh uh
  3270. 1:50:31this got it right on you in terms of
  3271. 1:50:33biography, philosophy, and projects is
  3272. 1:50:36what
  3273. 1:50:37what Cloud Code So, we have we have
  3274. 1:50:38biography,
  3275. 1:50:40um
  3276. 1:50:42This all looks correct so far.
  3277. 1:50:46And we just asked Cloud Code to generate
  3278. 1:50:47all this for us. So, it's I'm assuming
  3279. 1:50:49pulling
  3280. 1:50:50uh just internet accessible things.
  3281. 1:50:53Um
  3282. 1:50:55Company grew from around eight employees
  3283. 1:50:56to start 2024. Yeah. Yeah, this is all
  3284. 1:50:59Yeah, that all looks correct.
  3285. 1:51:02Simplicity and elegance.
  3286. 1:51:06Warned against Cloud Code.
  3287. 1:51:08Yeah, I think backwards compatibility
  3288. 1:51:10has been a, you know, something that has
  3289. 1:51:12been more important in more recent years
  3290. 1:51:14of Laravel. I think people would
  3291. 1:51:15question that in the early years of
  3292. 1:51:16Laravel.
  3293. 1:51:17>> [laughter]
  3294. 1:51:18>> You know, probably as most projects go.
  3295. 1:51:20In the early years of Laravel, you know,
  3296. 1:51:21we were moving fast and breaking things.
  3297. 1:51:23But lately I've tried I try to make it
  3298. 1:51:25to where most people can upgrade, you
  3299. 1:51:27know, without any changes. And it seems
  3300. 1:51:29like the backwards compatibility uh is
  3301. 1:51:31is even bigger now for AI because you
  3302. 1:51:33almost have to have like uh oh, like
  3303. 1:51:35things that happened a year ago, which
  3304. 1:51:37models are getting smarter and more
  3305. 1:51:38up-to-date, of course. But things happen
  3306. 1:51:40a year ago, if it's using that, it still
  3307. 1:51:42works.
  3308. 1:51:43Correct, yeah. Yeah. Yeah, it is more
  3309. 1:51:46important like not to break things in
  3310. 1:51:48the AI world. I agree.
  3311. 1:51:53Some some projects.
  3312. 1:51:55Uh
  3313. 1:51:58Yeah, cool. Okay, well, I'm curious to
  3314. 1:52:01see if it's decent, yeah.
  3315. 1:52:02>> Yeah, I'm curious to see how this works.
  3316. 1:52:04Let's Let's go ahead and composer run
  3317. 1:52:06dev. That is That is my preferred way of
  3318. 1:52:09getting things up. Are you still the
  3319. 1:52:10same way or PHP artisan server? I use uh
  3320. 1:52:13either this or uh Herd. Okay.
  3321. 1:52:17Open this up. Okay, we have Larvis. Uh I
  3322. 1:52:20don't know
  3323. 1:52:21>> UI.
  3324. 1:52:22My sound Yeah, it's it's very minimal.
  3325. 1:52:23Yeah, let's Let's go ahead. I don't know
  3326. 1:52:25if my sound
  3327. 1:52:26is going to work. Let's see.
  3328. 1:52:29Can you tell me a little bit more about
  3329. 1:52:32uh
  3330. 1:52:32Taylor's way of thinking through things
  3331. 1:52:35when he builds a project?
  3332. 1:52:40Ooh, audio must be webm ogg web. I
  3333. 1:52:43actually ran across this, I think, in my
  3334. 1:52:44initial thing because I think it's it
  3335. 1:52:47tries whatever AI did in the initial
  3336. 1:52:49thing, I think it tried to save it as
  3337. 1:52:51webm and
  3338. 1:52:53by default, that's classified as video
  3339. 1:52:55instead of audio.
  3340. 1:52:56>> Oh, wow. Okay. Um
  3341. 1:52:59Web assembly.
  3342. 1:53:01Have this error. I think it's because
  3343. 1:53:04when we initially try to uh
  3344. 1:53:08save the vid
  3345. 1:53:09audio file
  3346. 1:53:11saves it a video format of it question
  3347. 1:53:15mark
  3348. 1:53:18>> [snorts]
  3349. 1:53:18>> back to the chat if people were want to
  3350. 1:53:22contribute to the level SDK on any
  3351. 1:53:23specific task or areas you would like
  3352. 1:53:25the community to help out with that is a
  3353. 1:53:28good one I mean
  3354. 1:53:30some of the recent PR so I've been
  3355. 1:53:32getting around been around just like
  3356. 1:53:33adding different providers so like
  3357. 1:53:35someone contributed a deep seek someone
  3358. 1:53:37contributed a mistral
  3359. 1:53:40this is also like a tricky one because
  3360. 1:53:41some of the more complicated features
  3361. 1:53:43like um
  3362. 1:53:44you know some of the conversation stuff
  3363. 1:53:46I want to improve like
  3364. 1:53:48I've got stuff in my head and sometimes
  3365. 1:53:50it's hard and like if the PR is coming
  3366. 1:53:52in and sort of like conflicting with
  3367. 1:53:53that
  3368. 1:53:55you know so
  3369. 1:53:58I think I think that like agent chat
  3370. 1:54:00artisan command thing is a is maybe a
  3371. 1:54:01good one the community could riff on a
  3372. 1:54:03little bit and then people have been
  3373. 1:54:04adding providers
  3374. 1:54:08human tool approval I don't I mean if
  3375. 1:54:10someone wants to take a stab at that go
  3376. 1:54:12for it I haven't started on it
  3377. 1:54:14that might be a good one someone could
  3378. 1:54:16work on but it's a little bit of a a
  3379. 1:54:17meaty one you know it's not a not
  3380. 1:54:19trivial probably
  3381. 1:54:22awesome
  3382. 1:54:23so yeah Taylor had mentioned a little
  3383. 1:54:25bit earlier kind of like two things is
  3384. 1:54:27chatting with agents that you
  3385. 1:54:29automatically generate maybe like in a
  3386. 1:54:30PHP artisan agent chat command
  3387. 1:54:33and then
  3388. 1:54:35a human tool approval correct me if I'm
  3389. 1:54:37wrong Taylor but you mentioned it would
  3390. 1:54:38be nice to be able to say okay there's
  3391. 1:54:39specific tools that they happen but
  3392. 1:54:42before the response is actually
  3393. 1:54:44generated you have some form of human
  3394. 1:54:46interaction to say hey this is good to
  3395. 1:54:47go like let's run that kind of thing
  3396. 1:54:49right yeah exactly
  3397. 1:54:51those would those would be great
  3398. 1:54:53um
  3399. 1:54:54opportunities
  3400. 1:54:57uh someone's mentioned token usage that
  3401. 1:55:00would be interesting I don't know if
  3402. 1:55:00there's anything currently built in,
  3403. 1:55:02correct?
  3404. 1:55:03You can get back to token uses from like
  3405. 1:55:05a given prompt or whatever or given
  3406. 1:55:07generation, but um we're going to be
  3407. 1:55:09building a lot of token usage tracking
  3408. 1:55:11stuff into Nightwatch. So Ooh,
  3409. 1:55:13interesting.
  3410. 1:55:13>> Yeah. People can kind of people can of
  3411. 1:55:15course sort of roll their own cuz you do
  3412. 1:55:16have access to that, but we'll be also
  3413. 1:55:18providing that in Nightwatch.
  3414. 1:55:20All right. Let's let's go ahead refresh
  3415. 1:55:22see if it see if it does anything now.
  3416. 1:55:24We'll say
  3417. 1:55:25Uh can you tell me a little bit about
  3418. 1:55:27how Taylor would think through creating
  3419. 1:55:30a new package for Laravel?
  3420. 1:55:37Uh
  3421. 1:55:38I uploaded some markdown files. Please
  3422. 1:55:40try again. PDF. Oh, you can't upload
  3423. 1:55:42markdown files?
  3424. 1:55:43>> Markdown files. Uh I I would assume in
  3425. 1:55:45our our agents for the uh chat we're
  3426. 1:55:48just uploading
  3427. 1:55:51we're just uploading
  3428. 1:55:54we're just collecting the documents as
  3429. 1:55:55markdown.
  3430. 1:55:56>> I was passing them. It should just like
  3431. 1:55:57inject them into the uh Yeah. You know
  3432. 1:56:00what I mean? Yeah. Instead of uploading
  3433. 1:56:05cuz we get this error
  3434. 1:56:08instead of uploading the markdown files
  3435. 1:56:13let's inject them
  3436. 1:56:15directly into the prompt.
  3437. 1:56:18Yeah, like Should be like that. Yeah.
  3438. 1:56:20See if that works.
  3439. 1:56:21See if see if that works.
  3440. 1:56:22>> I actually noticed that as well that
  3441. 1:56:24OpenAI doesn't accept a whole lot of
  3442. 1:56:27file formats on these attachments. Um I
  3443. 1:56:29was surprised like you I don't think you
  3444. 1:56:31can upload like a CSV. And it has to
  3445. 1:56:34it's basically like PDF or image or
  3446. 1:56:37I don't know why exactly or something
  3447. 1:56:39before you do that.
  3448. 1:56:39>> Yeah, yeah, yeah, yeah.
  3449. 1:56:40>> I guess maybe are they trying to uh not
  3450. 1:56:43to comment on OpenAI's business plan or
  3451. 1:56:45anything like that, but are they trying
  3452. 1:56:46to try to move everything into vectors?
  3453. 1:56:48Like you do that first and then we'll do
  3454. 1:56:50that.
  3455. 1:56:51Uh
  3456. 1:56:51that's very very interesting. Um
  3457. 1:56:55It looks like it is making the correct
  3458. 1:56:56change. So I saw where it was there.
  3459. 1:56:58>> Yeah, I saw that in uh
  3460. 1:57:01Yeah, so we're doing the
  3461. 1:57:02docs with the question and prompt. So,
  3462. 1:57:05bigger prompt, but we don't We probably
  3463. 1:57:07be a little bit long longer of a wait
  3464. 1:57:09before we get an audio response if we're
  3465. 1:57:11generating the prompt, pushing it to 11
  3466. 1:57:13labs, but still still should work. Uh
  3467. 1:57:16uh I'm curious and that might be a good
  3468. 1:57:18maybe if you're listening to this and
  3469. 1:57:20you love 11 labs. I was actually going
  3470. 1:57:21to take a stab at a PR. I don't know if
  3471. 1:57:23you you even tried it, Taylor, like the
  3472. 1:57:26ability to I think they have voice
  3473. 1:57:28agents where you can like
  3474. 1:57:30instead of having to transcribe and then
  3475. 1:57:34get an answer and then put it back. I
  3476. 1:57:36think they have the ability all wrapped
  3477. 1:57:38up into one where you could upload a
  3478. 1:57:40voice and it Yeah. you with the prompt
  3479. 1:57:43or something like that? Or system
  3480. 1:57:45prompt?
  3481. 1:57:46Yeah.
  3482. 1:57:47Which would make this a lot faster, at
  3483. 1:57:48least for this this demo. One more time.
  3484. 1:57:50Let's try try this out.
  3485. 1:57:53Uh if I was Taylor, how would I think
  3486. 1:57:56about building a new uh package for
  3487. 1:58:00Laravel?
  3488. 1:58:11That's great. When building a new
  3489. 1:58:13package,
  3490. 1:58:14>> [laughter]
  3491. 1:58:14>> consider
  3492. 1:58:15Taylor Otwell's development philosophy.
  3493. 1:58:17Focus on simplicity and elegance.
  3494. 1:58:20Ensuring that the package is intuitive
  3495. 1:58:24Okay. It is working, but yeah, yeah.
  3496. 1:58:28>> [laughter]
  3497. 1:58:28>> Uh
  3498. 1:58:29doesn't look like it was uh it was
  3499. 1:58:31sharing my uh sharing my audio.
  3500. 1:58:34Um but yeah, that worked. We have it. Uh
  3501. 1:58:37I'm assuming we could uh speak. Uh looks
  3502. 1:58:41like we have a little bug speaking
  3503. 1:58:42thing. Yeah. Oh, there we go. Maybe I
  3504. 1:58:45added Maybe clicking it a couple times
  3505. 1:58:47added it. I assume I think because we're
  3506. 1:58:48still saving it as
  3507. 1:58:51uh memory in terms of like
  3508. 1:58:53the
  3509. 1:58:54um as controller do we have a
  3510. 1:58:58Okay, it probably is just a one-off. It
  3511. 1:58:59probably would reset then. I'm assuming.
  3512. 1:59:02>> Yeah.
  3513. 1:59:02Yeah, I think so. Sweet.
  3514. 1:59:04Awesome. It's cool to be able to to get
  3515. 1:59:06something like that up and running
  3516. 1:59:08rather quickly. And honestly, there's
  3517. 1:59:09not too much code involved with this.
  3518. 1:59:12That's one of the things that I like
  3519. 1:59:13about the AI SDK.
  3520. 1:59:14Um is like we have an assistant being
  3521. 1:59:18able to have and kind of as a good recap
  3522. 1:59:21for those watching. You have assistants
  3523. 1:59:23that you can create them PHP artisan
  3524. 1:59:25make um agent. Sorry, not an assistant.
  3525. 1:59:28Uh where we have a particular class that
  3526. 1:59:30that all lives in. So, instructions
  3527. 1:59:33um as well as tools. Is there anything
  3528. 1:59:35else that can live in there, Taylor?
  3529. 1:59:37Yeah, like the output schema.
  3530. 1:59:39>> Output schema, okay. Things like that.
  3531. 1:59:41Um and then with that agent, we can then
  3532. 1:59:44uh create a new instance of it in things
  3533. 1:59:46like uh controllers where we're creating
  3534. 1:59:48a new instance of this knowledge
  3535. 1:59:49assistant or passing it that prompts.
  3536. 1:59:51So, we're using all the
  3537. 1:59:53the configuration that we're doing in
  3538. 1:59:55that assistant which also uses all the
  3539. 1:59:57configuration of the AI config in terms
  3540. 2:00:00of what's the default for audio,
  3541. 2:00:01transcription,
  3542. 2:00:03um images,
  3543. 2:00:05uh and embeddings for example.
  3544. 2:00:07And then it's as simple as using things
  3545. 2:00:09like audio of the answer we're
  3546. 2:00:11generating with and getting that
  3547. 2:00:13particular response. And then it's
  3548. 2:00:15converting that on the front end. But
  3549. 2:00:16yeah, it's it's it's crazy how
  3550. 2:00:19basically that whole demo was just
  3551. 2:00:21really one controller
  3552. 2:00:23if if in if in in the sense of that.
  3553. 2:00:25Um and doing a couple things on the back
  3554. 2:00:27end of how fast it can be. Uh and
  3555. 2:00:29probably we could configure this quicker
  3556. 2:00:31to use. I think in my
  3557. 2:00:33uh my backup Larvis, I did a use
  3558. 2:00:37cheapest model or use Is there a use
  3559. 2:00:39fastest model? Am I correct? Uh it's use
  3560. 2:00:42smartest and use cheapest.
  3561. 2:00:43>> Use cheapest. I think I did a use
  3562. 2:00:45cheapest for like the actual response.
  3563. 2:00:47And then that way it just was a lot
  3564. 2:00:49faster in a lot of ways.
  3565. 2:00:50Um but yeah.
  3566. 2:00:52Sweet. Let's go ahead and I'm going to
  3567. 2:00:56Well, we're probably coming short up on
  3568. 2:00:58time. So, is there any
  3569. 2:01:00um
  3570. 2:01:00I'll jump into maybe one more question
  3571. 2:01:02with those of us who were those who were
  3572. 2:01:05in the chat for this whole period of
  3573. 2:01:07time, thank you so much for being here.
  3574. 2:01:08Thank you so much for taking a journey
  3575. 2:01:10along with us on how the AISDK was
  3576. 2:01:12built, what it's good for, um and also
  3577. 2:01:14getting a lot of questions for Taylor. I
  3578. 2:01:16know uh Taylor, we're appreciative of
  3579. 2:01:18you and your time of being here. Um For
  3580. 2:01:21sure.
  3581. 2:01:22Uh let's go ahead and see
  3582. 2:01:26uh
  3583. 2:01:28I don't know. There's not There's not
  3584. 2:01:29too many more questions. Taylor, what
  3585. 2:01:31what would be one thing that you would
  3586. 2:01:33love to tell people about when it comes
  3587. 2:01:35to like the AISDK, whether in terms of
  3588. 2:01:37building with it or just
  3589. 2:01:39you know, inspirational kind of kind of
  3590. 2:01:41phrase to leave.
  3591. 2:01:42Oh, well, it makes you know, integrating
  3592. 2:01:44AI with your Laravel app super easy. So,
  3593. 2:01:46I mean, it is out. Composer require
  3594. 2:01:48Laravel/AI.
  3595. 2:01:49There's a Boost skill available. So,
  3596. 2:01:51install Boost and you will have the
  3597. 2:01:53AISDK skill that kind of tells Boost how
  3598. 2:01:55to use it and just start like, you know,
  3599. 2:01:57kind of like we did here, just like
  3600. 2:01:58building something fun, some cool ideas.
  3601. 2:02:00You'll kind of learn how to use it,
  3602. 2:02:01learn the ropes, and then uh hopefully
  3603. 2:02:03can take it to um
  3604. 2:02:05you know, whatever you're doing at work
  3605. 2:02:06or whatever kind of like business you're
  3606. 2:02:07building or whatever, and hopefully it
  3607. 2:02:08makes uh your life a little bit easier.
  3608. 2:02:11Awesome. I love it. And then for those
  3609. 2:02:12who saw the uh the other kind of demo
  3610. 2:02:15that I that I had kind of uh put
  3611. 2:02:17together for
  3612. 2:02:19um
  3613. 2:02:19the kind of ragged instance and chatting
  3614. 2:02:22with it. Um I'll put that link in the
  3615. 2:02:24chat as well. Uh but I'll also be able
  3616. 2:02:27to uh
  3617. 2:02:28uh
  3618. 2:02:29on that demo will also have like the
  3619. 2:02:31GitHub link so that you can kind of take
  3620. 2:02:32a look through what was what was built
  3621. 2:02:35with that.
  3622. 2:02:36Um uh I guess one last question uh
  3623. 2:02:39to to kind of go through that as well as
  3624. 2:02:42someone mentioned in terms of like prism
  3625. 2:02:43PHP cuz I know you you mentioned a lot
  3626. 2:02:45of some of the stuff in the background
  3627. 2:02:48is using prism PHP. Someone mentioned um
  3628. 2:02:50what does it look like to switch? What
  3629. 2:02:52are some of the gaps at the moment in
  3630. 2:02:53terms of switching?
  3631. 2:02:55Um I think of yeah, we do use prism for
  3632. 2:02:57some of the text stuff under the hood.
  3633. 2:02:59Nice package uh built by TJ Miller.
  3634. 2:03:02Um I think of prism and AI SDK a little
  3635. 2:03:06bit like I think of query builder and
  3636. 2:03:08eloquent. So like
  3637. 2:03:10prism has kind of this fluid query
  3638. 2:03:12builder interface for like querying and
  3639. 2:03:14doing AI things. And I think the AI
  3640. 2:03:16SDK's like
  3641. 2:03:18maybe like a layer of abstraction on top
  3642. 2:03:20of that you might think of where you
  3643. 2:03:21have like agent classes and sort of like
  3644. 2:03:24agent testing and things like that. So
  3645. 2:03:26it's kind of like a little bit higher
  3646. 2:03:27level
  3647. 2:03:28uh of abstraction in terms of like code
  3648. 2:03:30organization and like reuse.
  3649. 2:03:33Uh which I think is kind of like the
  3650. 2:03:34main difference between the two.
  3651. 2:03:37Um and then it kind of like goes beyond
  3652. 2:03:39in a little bit bit around like the
  3653. 2:03:41similarity search, the file search, some
  3654. 2:03:44of that stuff that is maybe not
  3655. 2:03:45available in prism but is available in
  3656. 2:03:47the um AI SDK as well as some extra
  3657. 2:03:50providers like a 11 labs and things like
  3658. 2:03:52that.
  3659. 2:03:53Um so yeah, it's just a little bit
  3660. 2:03:54higher level of abstraction um to get
  3661. 2:03:56started and then of course um
  3662. 2:03:58maintained here by us at Laravel but
  3663. 2:04:00again using prism for a variety of
  3664. 2:04:02things under the hood and uh
  3665. 2:04:05yeah, great library.
  3666. 2:04:07Awesome. Yeah, thank you so much
  3667. 2:04:08everyone in the chat. Uh
  3668. 2:04:11thank you for being here and for joining
  3669. 2:04:13us on this journey. And for those who
  3670. 2:04:15are watching kind of in on demand, uh
  3671. 2:04:18thank you so much for watching this.
  3672. 2:04:19Feel free to like and subscribe so that
  3673. 2:04:21we can have additional content be pushed
  3674. 2:04:23to you as quickly as possible. Uh but
  3675. 2:04:25thank you so much Taylor for joining us
  3676. 2:04:27and
  3677. 2:04:27>> Yes, it's fun.
  3678. 2:04:28for everyone getting started with
  3679. 2:04:30building within Laravel and maybe AI,
  3680. 2:04:32you can use composer require laravel/ai
  3681. 2:04:37to get started um and use Laravel boost
  3682. 2:04:40because it does have a scale to be able
  3683. 2:04:41to generate some of those things even
  3684. 2:04:42like that little demo that we just did.
  3685. 2:04:45Simple, but it was easy to show how
  3686. 2:04:48the LLM's can use things like Laravel
  3687. 2:04:51boost and the AI SDK to create something
  3688. 2:04:54pretty magical in such little code. But
  3689. 2:04:57yeah, hopefully everyone has a fantastic
  3690. 2:04:59day wherever you are or wherever you are
  3691. 2:05:02joining and watching us from. Grab a
  3692. 2:05:04Coke Zero for us and have some Taco Bell
  3693. 2:05:08in favor of
  3694. 2:05:09favor of Taylor and the Laravel team.
  3695. 2:05:12But thank you all so much.
  3696. 2:05:13Thanks. See you.

About this transcript

This page contains the full transcript of Building AI Applications with the Laravel AI SDK by Laravel, generated from the public captions YouTube serves with the video. The transcript has 24,247 words across 3,696 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.