«

Laravel 13: Laravel's AI Era

Written by Jorge on 
6 minute read

Laravel 13 dropped on March 17, 2026. If you read my What's New in Laravel 13 post, you already know the full changelog. This post isn't about that. This post is about the signal Laravel 13 sends: Laravel is now an AI-first framework, and it's not even subtle about it.

The AI stack

Laravel 13 ships alongside three packages that, together, form a complete AI development platform in PHP. Not experimental. Not "community-driven." First-party, maintained by the Laravel team.

laravel/ai: the SDK

laravel/ai hit stable with this release. It gives you a unified API to work with LLMs from OpenAI, Anthropic, Google, and others. You define agents as PHP classes, each with its own instructions, tools, and output schema.

use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Promptable;

class ArticleSummarizer implements Agent
{
    use Promptable;

    public function instructions(): string
    {
        return 'You summarize articles into two concise sentences.';
    }
}

// Usage
$response = (new ArticleSummarizer)->prompt($article->body);

It handles streaming, tool use, structured output, embeddings, and conversation history. The kind of plumbing you'd otherwise build yourself or bolt on with three different packages that all handle HTTP differently.

The important part: it's a Laravel package. It respects your config, your queue, your cache, your error handling. It doesn't fight the framework. It extends it.

laravel/boost: AI-assisted development

Boost (now at v2.3.4) is a Model Context Protocol server that exposes your Laravel application to AI coding assistants. Point Claude Code, Cursor, or Windsurf at it and your AI assistant understands your models, routes, migrations, validation rules, and business logic.

This isn't "read my files." It's structured context. Your assistant knows that User has a subscriptions relationship, that /api/invoices expects a date_range filter, and that your ProcessPayment action dispatches three events. The assistant works with your codebase instead of guessing at it.

If you've used AI coding assistants on a Laravel project, you know the pain of re-explaining your domain every session. Boost solves that.

laravel/mcp: build your own servers

This is the one that excites me most. laravel/mcp lets you build MCP servers as Laravel applications. You define tools as classes, group them into servers, and expose them over HTTP or stdio.

use Illuminate\Contracts\JsonSchema\JsonSchema;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Tool;

#[Description('Search orders by query string and optional status filter.')]
class SearchOrdersTool extends Tool
{
    public function handle(Request $request): Response
    {
        $query = $request->get('query');
        $status = $request->get('status');

        $results = Order::search($query)
            ->when($status, fn ($q) => $q->where('status', $status))
            ->get();

        return Response::text($results->toJson());
    }

    public function schema(JsonSchema $schema): array
    {
        return [
            'query' => $schema->string()->description('Search term.')->required(),
            'status' => $schema->string()->enum(['pending', 'shipped', 'delivered']),
        ];
    }
}

You're not building a REST API for humans to click through. You're building a tool interface for AI agents to act on. Same authorization gates, same validation, same middleware stack, different consumer.

This is where PHP shops that dismissed AI as "a Python thing" should pay attention. Your existing Laravel application can become an AI-capable service without a rewrite, without a sidecar, without learning a new language.

The rest of Laravel 13

The AI packages get the headline, but the release has substance beyond that.

PHP 8.3 minimum. Laravel 12 already supported 8.3, but now it's the floor. PHP 8.4 support is full. This unlocks performance improvements and language features the framework can now rely on.

PHP Attributes everywhere. About 15 new attribute options across routing, validation, events, and more. If you prefer attributes over docblocks or method calls, Laravel 13 leans into that style hard.

JSON:API resources. First-party support for the JSON:API spec. No more reaching for spatie/laravel-json-api-paginate or laravel-json-api/laravel to get spec-compliant responses. It's built in.

Passkeys. The starter kits and Fortify now support passkeys out of the box. Passwordless auth without third-party packages.

Concurrency defaults to 2. The Concurrency facade now defaults to running 2 concurrent operations instead of unlimited. Sane default. You were probably already setting this manually.

PreventRequestForgery middleware. A new middleware for additional request integrity checks. Another layer you don't have to build yourself.

No breaking changes to application code. Read that again. A major version with zero breaking changes to your app. The version bump exists because of the AI ecosystem integration and the PHP 8.3 minimum, not because your code needs to change.

What this means

Laravel has always been a "full-stack" framework: auth, queues, cache, search, payments. Each major release added another layer that you'd otherwise assemble yourself. Laravel 13 adds AI to that list.

The strategic move is clear: Taylor and the team see AI integration as table stakes for web frameworks, and they're not waiting for the ecosystem to figure it out. They're shipping the answer.

For PHP developers, this matters for three reasons:

  1. You don't need Python. The "AI stuff happens in Python, PHP does the web layer" split was always friction. Now you can build the AI features in the same codebase, same language, same deployment pipeline.
  2. MCP changes the game. Building MCP servers in Laravel means your existing business logic becomes accessible to AI agents. Every Laravel app is a potential AI tool provider. That's a massive surface area.
  3. The ecosystem compounds. laravel/ai for consuming AI, laravel/mcp for exposing to AI, laravel/boost for developing with AI. They're three sides of the same triangle, and they all speak Laravel.

Upgrading from Laravel 12

If you're on Laravel 12, the upgrade is as smooth as it gets for a major version. No breaking changes to application code means composer update does most of the work. Bump your PHP minimum to 8.3 if you haven't already, update laravel/framework to ^13.0, and run your test suite.

The official upgrade guide covers the few internal changes. Unless you're extending framework internals, you're looking at a 15-minute upgrade.

The AI packages are opt-in. You don't have to install laravel/ai, laravel/boost, or laravel/mcp, but you probably should at least try boost. Having your AI assistant understand your codebase changes the development experience immediately.

The bottom line

Laravel 13 isn't just a release. It's a positioning statement. Laravel is the framework for building AI-powered PHP applications, and it's backing that claim with first-party packages, not blog posts and promises.

The PHP community spent the last two years watching from the sidelines while Python got all the AI tooling. That era is over.

Thanks for reading, and see you in the next one.

Copyright 2026. All rights reserved
  • Codepen Logo
  • Youtube Logo
  • GitHub Logo
  • Twitter Logo
  • LinkedIn Logo