Laravel 13 is the first framework release built with AI agents in mind. The laravel/boost package transforms Claude Code, Cursor, and other AI agents from general-purpose assistants into Laravel experts that understand your specific application’s routes, database, and configuration. Combined with the official Laravel AI SDK and first-party agent skills, you can build AI-powered features faster than ever.
This guide covers the complete setup: installing Laravel 13, configuring Boost for AI-assisted development, and preparing your application for LLM integration. By the end, your IDE will have deep Laravel context and your app will be ready for features like AI content generation, vector search, and autonomous agents.
:::note[TL;DR]
- Install Laravel 13 with the React/Svelte/Vue/Livewire starter kits
- Add
laravel/boostfor AI agent context (MCP server with 15+ tools) - Install agent skills:
laravel-simplifier,laravel-cloud,laravel-nightwatch - Configure
.mcp.jsonandCLAUDE.mdfor your IDE - Set up OpenAI/Claude API keys for application-level AI features
- Use structured outputs for reliable AI responses :::
What Changed in Laravel 13 for AI Development?
Laravel 13 ships with three major AI-focused additions that change how you build applications.
Laravel Boost is an MCP (Model Context Protocol) server that exposes your application’s internals to AI agents. It provides 15+ tools for introspection: database schema queries, route inspection, log analysis, Artisan command discovery, and access to 17,000+ pieces of version-specific Laravel documentation. When you ask Claude Code to “create a migration for user profiles,” it already knows your existing schema and won’t suggest conflicting column names.
Agent Skills are lightweight knowledge modules that agents load on-demand. Unlike heavy context files that bloat every request, skills activate only when relevant. Laravel provides skills for Livewire, Inertia.js, Tailwind CSS, Pest, and more. When you’re working on a Livewire component, the agent loads Livewire-specific patterns without carrying that weight during unrelated tasks.
The Laravel AI SDK (announced with Laravel 13) provides a unified interface for building AI features into your application. It handles structured outputs, streaming responses, multi-provider support (OpenAI, Claude, Gemini), and conversation state management. You can switch from OpenAI to Claude without rewriting your feature logic.
How Do I Install Laravel 13 with AI Support?
Start with one of the new official starter kits. Laravel 12 and 13 introduced starter kits for React, Svelte, Vue, and Livewire that replace Breeze and Jetstream.
# Create a Laravel 13 application with the React starter kit
laravel new my-ai-app --react
# Or with Livewire + Flux UI
laravel new my-ai-app --livewire
# Or with WorkOS AuthKit for social auth, passkeys, and SSO
laravel new my-ai-app --react --workos
The starter kits include login, registration, password reset, email verification, and TypeScript support. They’re built with Inertia 2, Tailwind CSS, and shadcn/ui components (React/Svelte/Vue) or Flux UI (Livewire).
Once created, verify you’re on Laravel 13:
cd my-ai-app
php artisan --version
# Laravel Framework 13.x
How Do I Install and Configure Laravel Boost?
Boost bridges the gap between your IDE’s AI agent and your Laravel application. Install it as a dev dependency:
composer require laravel/boost --dev
Run the interactive installer:
php artisan boost:install
The installer detects your IDE and AI agents, then generates configuration files:
.mcp.json- MCP server configuration for IDE integrationCLAUDE.md- Context file for Claude Code with Laravel guidelinesboost.json- Boost-specific settings
Setting Up Claude Code
Install the official Laravel agent skills:
/plugin marketplace add laravel/agent-skills
/plugin install laravel-simplifier@laravel
/plugin install laravel-cloud@laravel
/plugin install laravel-nightwatch@laravel
The laravel-simplifier skill reviews your code after changes. The laravel-cloud skill helps deploy to Laravel Cloud. The laravel-nightwatch skill configures monitoring and PII redaction.
Setting Up Cursor
Open the Cursor plugin marketplace and search for “Laravel.” Install the Laravel plugins (they pull from the same laravel/agent-skills repository).
How Do I Prepare My Application for LLM Integration?
Boost provides context to your IDE’s AI. For application-level AI features (content generation, chatbots, autonomous agents), you need to configure API access.
Setting Up OpenAI
Add your OpenAI API key to .env:
OPENAI_API_KEY=sk-your-key-here
OPENAI_ORGANIZATION=org-your-org
Install the official PHP client:
composer require openai-php/client
For Laravel-specific helpers, you can use openai-php/laravel:
composer require openai-php/laravel
Publish the config:
php artisan vendor:publish --provider="OpenAI\Laravel\ServiceProvider"
Setting Up Claude (Anthropic)
Add your Anthropic API key:
ANTHROPIC_API_KEY=sk-ant-your-key-here
Install the Laravel Anthropic package:
composer require sixlive/laravel-anthropic
Structured Outputs for Reliable AI Responses
Raw LLM responses are unpredictable. Laravel 13’s AI SDK and packages like spatie/laravel-data let you define response structures:
use Spatie\LaravelData\Data;
class ArticleSummary extends Data
{
public function __construct(
public string $headline,
public string $summary,
public array $keyPoints,
public string $sentiment,
) {}
}
// In your controller
$response = OpenAI::chat()->create([
'model' => 'gpt-4o',
'messages' => [
['role' => 'system', 'content' => 'Summarize articles into structured data.'],
['role' => 'user', 'content' => $articleText],
],
'response_format' => ['type' => 'json_object'],
]);
$summary = ArticleSummary::from(json_decode($response->choices[0]->message->content, true));
Structured outputs eliminate parsing errors and give you type-safe AI responses.
What Can I Do With Boost’s MCP Tools?
Boost exposes tools via the Model Context Protocol that let AI agents inspect your application:
| Tool | What It Does |
|---|---|
get_php_version | Reports PHP and Laravel versions, installed packages |
get_database_schema | Lists tables, columns, indexes, foreign keys |
execute_read_only_query | Runs safe SELECT queries against your database |
get_routes | Lists all routes with methods, URIs, controllers |
get_artisan_commands | Discovers available Artisan commands and arguments |
read_logs | Analyzes application log files for debugging |
tinker | Executes PHP code via Laravel Tinker |
search_documentation | Queries 17,000+ Laravel docs with version filtering |
Real scenario: You’re debugging a failed job at 11 PM. Instead of grepping logs yourself, you ask Claude Code: “Why did the payment job fail in the last hour?” The agent uses read_logs to pull recent entries, get_database_schema to check your payments table structure, and search_documentation to verify Queue configuration. You get the answer without touching the terminal.
How Do Agent Skills Work in Practice?
Skills are knowledge modules that load contextually. When you invoke a skill, the agent receives detailed patterns and best practices for that specific domain.
After installing the Laravel agent skills, try these commands in Claude Code:
> Create a Livewire component for user profile editing
The agent detects “Livewire,” loads the Livewire skill, and generates a component following Livewire 3 conventions (forms, validation, events) rather than generic Blade patterns.
> Review recent changes using the laravel-simplifier agent
The laravel-simplifier skill analyzes your recent git commits and suggests refactoring, catches missed validation rules, or flags potential N+1 queries.
> Deploy my app to Laravel Cloud
The laravel-cloud skill triggers automatically. It asks about environment variables, database setup, and cache configuration, then generates the correct cloud deploy commands.
How Do I Test That Everything Works?
Verify your setup with a quick test:
# Test Boost is installed
php artisan boost:status
# Test MCP connection (in Claude Code)
> What Laravel version am I running?
# Should respond with your exact version via get_php_version tool
# Test OpenAI integration
php artisan tinker
>>> OpenAI::chat()->create(['model' => 'gpt-4o-mini', 'messages' => [['role' => 'user', 'content' => 'Hello']]]);
Summary
- Laravel 13 provides first-class AI support through Boost, Agent Skills, and the AI SDK
- Laravel Boost (
laravel/boost) gives AI agents 15+ tools for application introspection - Agent Skills provide on-demand knowledge for Livewire, Inertia, Cloud, and Nightwatch
- Structured outputs make AI responses predictable and type-safe
- Install starter kits with
laravel new --react(or--livewire,--vue,--svelte)
FAQ
Is Laravel Boost free? Yes. Boost is open source and free for all Laravel applications. Some advanced AI features in Laravel Cloud may have associated costs, but the core Boost MCP server and agent skills are free.
Do I need Claude Code specifically?
No. Boost works with any MCP-compatible agent. Claude Code has the best integration, but Cursor and other MCP-supporting tools can use the same .mcp.json configuration.
Can I use Boost on Laravel 10 or 11? Yes. Boost supports Laravel 10, 11, 12, and 13 running PHP 8.1+. However, some AI SDK features require Laravel 13.
What happens to my .mcp.json in production?
Boost is a dev dependency. The .mcp.json, CLAUDE.md, and boost.json files are only used during development. You can safely add them to .gitignore if your team prefers individual configuration.
Do agent skills work with GitHub Copilot? Currently, agent skills are designed for Claude Code and Cursor through the MCP protocol. GitHub Copilot has its own extension system; official Laravel Copilot integration is planned.
What to Read Next
- Adding AI to Existing Laravel Projects: 10, 11, and 12 Upgrade Guide - Integrate AI without upgrading your entire application
- AI-Assisted Eloquent: Database Design with Laravel Boost - Use AI agents to generate migrations, relationships, and complex queries
- Laravel OpenAI Integration: Building Your First AI Feature - Complete guide to adding content generation, summarization, and classification to your app