Available for Q3 2026 projects — Laravel, AI agents & automation
Build With Abdallah logo Build With Abdallah Software · AI · Automation
APIs 5 min read May 30, 2026

Laravel 13 is Here: First-Party AI SDK, Vector Search, and PHP Attributes — What It Means for Production Apps

Laravel 13 shipped in March 2026 with a first-party AI SDK, native vector search, PHP 8.3 attributes, and queue routing. Here's what changed, why it matters, and how to use it without breaking existing code.

A
Abdallah Mohamed
Senior Full-Stack Engineer
Laravel 13 is Here: First-Party AI SDK, Vector Search, and PHP Attributes — What It Means for Production Apps

The Headline

Laravel 13 launched on March 17, 2026, and it is not a maintenance release. The framework now ships with a first-party AI SDK, native semantic/vector search, JSON:API resources, queue routing by class, and first-class PHP 8.3 attributes across models, jobs, and commands.

Most applications can upgrade in a day. The breaking changes are minimal. The productivity gains are not.


Sources


What Changed

1. Laravel AI SDK (Production-Stable)

The biggest shift in Laravel 13 is the graduation of the Laravel AI SDK from experimental to first-party, production-stable. It gives you a unified, provider-agnostic API for:

  • Text generation and tool-calling agents
  • Image generation
  • Audio synthesis (TTS)
  • Embeddings for semantic search
  • Vector-store integrations
use App\Ai\Agents\SalesCoach;

$response = SalesCoach::make()->prompt('Analyze this sales transcript...');
return (string) $response;

Image generation:

use Laravel\Ai\Image;

$image = Image::of('A dashboard mockup in dark mode')->generate();
$rawContent = (string) $image;

Audio synthesis:

use Laravel\Ai\Audio;

$audio = Audio::of('Your appointment is confirmed.')->generate();

Why this matters: before Laravel 13, wiring AI into a Laravel app meant managing multiple provider SDKs, inconsistent config, and ad-hoc error handling. Now it is a first-class framework primitive — consistent drivers, consistent config, consistent exceptions.

2. Semantic / Vector Search

Laravel 13 adds native vector query support and embedding workflows. You can run similarity search directly from the query builder:

$documents = DB::table('documents')
    ->whereVectorSimilarTo('embedding', 'Best wineries in Napa Valley')
    ->limit(10)
    ->get();

This works with PostgreSQL + pgvector, and the embedding generation is built into the AI SDK. No third-party service required unless you want one.

Production note: if you are already running Postgres, adding pgvector is a single extension install. No new infrastructure. No new vendor lock-in.

3. PHP 8.3 Attributes Across the Framework

Laravel 13 introduces native PHP Attributes as an optional, backward-compatible alternative to class properties for configuration:

#[Table('users', key: 'user_id', keyType: 'string', incrementing: false)]
#[Hidden(['password'])]
#[Fillable(['name', 'email'])]
class User extends Model {}

This works for:

  • Eloquent models (#[Table], #[Hidden], #[Fillable], etc.)
  • Jobs
  • Console commands
  • And 15+ other framework locations

It is fully optional. Your existing $table, $fillable, and $hidden properties keep working. Attributes just give you a cleaner, type-safe, refactor-friendly alternative.

4. JSON:API Resources (First-Party)

Laravel now ships with first-party JSON:API resources, handling:

  • Resource object serialization
  • Relationship inclusion (?include=author)
  • Sparse fieldsets (?fields[posts]=title,body)
  • Links and JSON:API-compliant headers

If your API serves mobile apps or public consumers, this removes the need to hand-roll JSON:API compliance or pull in a third-party package.

5. Queue Routing by Class

Instead of scattering queue/connection assignments inside job classes, you can now define routing centrally:

Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'podcasts');

This keeps queue topology in one place — useful when you have different Redis clusters, SQS queues, or database connections per workload.

6. Cache::touch()

A small but sharp quality-of-life addition: Cache::touch() extends a cached item’s TTL without fetching or re-storing the value.

Cache::touch('user_session:123', 3600);
Cache::touch('report_cache', null); // extend indefinitely

Behind the scenes, Redis uses a single EXPIRE command. Memcached uses TOUCH. No data transfer over the wire. This matters at scale.

7. PHP 8.3 Required

Laravel 13 drops PHP 8.2 and requires PHP 8.3 or higher. If you are on PHP 8.3 already, the upgrade path is smooth. If you are on 8.2, you need to bump PHP first — plan that before touching composer.json.


Upgrade Path (Realistic)

  1. Bump PHP to 8.3 on your local and CI environments.
  2. Update composer.json: "laravel/framework": "^13.0"
  3. Run composer update and fix any third-party packages that conflict.
  4. Run your test suite. Most apps pass with zero code changes.
  5. Opt into attributes gradually — start with one model or one job.
  6. Try the AI SDK on a non-critical feature first (e.g., an internal admin summary tool).

If you want a managed upgrade path, Laravel Shift supports Laravel 13.


What This Means for Production Engineers

  • AI is now a framework primitive, not a bolt-on. You can build agentic workflows, semantic search, and media generation with the same consistency you expect from Eloquent or Queues.
  • Vector search is native. If you are already on Postgres, the cost to add semantic search is close to zero.
  • Attributes reduce boilerplate without breaking existing code. Migrate at your own pace.
  • Queue routing centralizes ops logic. No more hunting through job classes to figure out which Redis cluster a workload lands on.

Bottom Line

Laravel 13 is not a revolution. It is a careful, production-ready expansion of what the framework can do — AI, semantic search, cleaner config, and sharper caching — without asking you to rewrite your app.

If you are running Laravel 12 on PHP 8.3, the upgrade is low-risk and high-reward. If you are on Laravel 11 or earlier, plan the PHP bump first, then move to 13.


Build With Abdallah — Laravel + AI production engineering. Questions? Send a message or email buildwithabdallah@gmail.com