Laravel & AI

Watch and track your favorite playlist.

Curated by: Laravel News (16 videos)


Currently Playing: Your First AI Agent with Laravel 13 - Ship AI with Laravel EP1

Your First AI Agent with Laravel 13 - Ship AI with Laravel EP1 Episode 1 of Ship AI with Laravel, a new series on Laravel News. Laravel 13 ships with an official AI SDK. In this episode, I install it in a fresh app, scaffold a SupportAgent class, tune it with max tokens and temperature, write customer support instructions, and get it responding to customers. The whole thing takes about 10 minutes. I also dig into the response object. You get the reply text, prompt, and completion token counts, the provider, and the model. All of that matters for cost tracking in production. Then I swap the provider from OpenAI to Anthropic mid-request to show that your agent code stays the same regardless of which provider handles it. The starting stack is Laravel 13, Livewire v4, Tailwind CSS v4, and PostgreSQL with pgvector. All of it is in the GitHub repo if you want to follow along with the exact same setup. ⭐ GitHub: https://github.com/harris21/ship-ai-with-laravel 👉 Full series playlist: https://www.youtube.com/playlist?list=PLsmlCYEtWNI_plnKPPO13XjfDJoMIfhLN What we cover: - Installing the AI SDK, publishing config and migrations - Scaffolding a SupportAgent with php artisan make:agent - MaxTokens and Temperature attributes - Writing customer support instructions - Prompting the agent from a test route - Reading token usage, provider, and model from the response - Switching providers per request (OpenAI to Anthropic) 👉 Timestamps 00:00 SDK Launch Overview 00:27 Project Setup Basics 00:42 Install and Migrate 01:33 API Key and Config 02:11 Scaffold Support Agent 03:30 Tune Agent Behavior 04:17 Support Prompt Instructions 05:14 Test Route and First Reply 06:37 Inspect Response Metadata 08:24 Switch Provider and Model 09:23 Wrap Up and Next Episode Sponsored by: * Mastering Laravel - https://masteringlaravel.io/codereview?ref=ln * PhpStorm - https://jb.gg/otlar0 * Laravel Cloud - https://go.laravel.news/cloud/home * Acquaintsoft - https://acquaintsoft.com/hire-laravel-developers * Depot - https://fandf.co/3ZHgelT * Mailtrap - https://l.rw.rw/ln_homepage * Jump24 - https://jump24.co.uk/services/application-development * Polyscope - https://getpolyscope.com/ ➫ Business Inquiries: hello@laravel-news.com ---------------------------------------------------------------------- JOIN OUR WEEKLY LARAVEL NEWSLETTER 👉 https://laravel-news.com/newsletter ----------------------------------------------------------------------


Tracks in this Playlist