Laravel upgrades

Which Laravel version do you need for the AI SDK?

The Laravel AI SDK (laravel/ai) needs Laravel 12 or 13 and PHP 8.3 or later. If your application is older than that, adding AI is partly an upgrade project. Here’s what to do from where you are now.

By itmarkerz Technologies. Updated 30 October 2026.

The requirements

The package’s published constraints for laravel/ai v1.3.0, checked on 2026-10-30, are ^12.0|^13.0 for the framework and ^8.3 for PHP. Laravel’s AI SDK documentation covers installing it with composer require laravel/ai.

One detail catches people out. Laravel 12 supports PHP 8.2–8.5, so a Laravel 12 application on PHP 8.2 can’t install the SDK, even though the framework version is fine.

What to do from where you are

Route to the Laravel AI SDK from each Laravel and PHP version
You’re onCan you install it?What we’d do
Laravel 13YesInstall it. Laravel 13 requires PHP 8.3, so that’s covered
Laravel 12, PHP 8.3 or laterYesInstall it, and plan Laravel 13 before February 24, 2027
Laravel 12, PHP 8.2NoMove PHP first. You needed to anyway, as 8.2 security support ends on 31 December 2026
Laravel 11NoUpgrade to 13. It’s out of security support, so this is overdue regardless of AI
Laravel 10 or olderNoUpgrade first, and consider the alternatives below if the AI feature can’t wait

For the steps, see our guides to PHP 8.2, Laravel 11 and Laravel 10. Your other packages can also set the pace, so check them against the package compatibility matrix.

If you can’t upgrade yet

Alternatives to the Laravel AI SDK and their constraints
OptionLaravelPHPGood for
prism-php/prism v0.102.0^12.61.1|^13.12.0^8.2A community package, if you’re on recent Laravel 12 or 13 and prefer it
openai-php/laravel v0.21.0^11.29|^12.12|^13.0^8.2.0One provider, starting from Laravel 11.29
Laravel’s HTTP clientLaravel 7 or laterWhatever your Laravel version supportsOne or two simple calls to a provider’s API, on applications too old for the packages

The HTTP client route is less work than it sounds if your feature only sends text and reads an answer. You lose the SDK’s agents, tool calls and provider switching, and you’ll write your own retries and logging. Keep that code in one class, so you can replace it when you upgrade.

Upgrade first, or add AI first?

If you’re already on Laravel 12 with PHP 8.3 or later, add the feature when you’re ready. Upgrading to 13 and adding AI are separate pieces of work, and shipping them separately makes faults easier to trace.

If you’re older than that, we’d usually upgrade first. An AI feature adds a new dependency, new data flows and new costs, and you’ll want a supported framework under it. It also helps to look at what you’d send to a provider, such as customer data, before you pick one. Laravel’s MCP package, laravel/mcp v1.1.2, has its own floor of ^11.45.3|^12.41.1|^13.0 if you plan to expose your application to AI clients.

Our Laravel AI development team can take on both parts, and our upgrade service covers the framework move at a fixed price. See Laravel versions for where 13 stands, including security fixes until March 17, 2028.

Laravel work we have delivered

See all our work

Questions

Does the Laravel AI SDK need Laravel 13?

No. It was introduced with Laravel 13, but laravel/ai v1.3.0 declares ^12.0|^13.0 on Packagist, so Laravel 12 can install it. It needs PHP 8.3 or later on either version.

Can I use the Laravel AI SDK on Laravel 11?

Not according to its published constraint. Laravel 11 security fixes ended on March 12, 2026 in any case, so the better move is to upgrade. If you can’t, you can call an AI provider’s API from Laravel’s HTTP client, which has been in the framework since Laravel 7.

Does Laravel 12 make sense for a new AI feature?

It will work, but Laravel 12 security fixes end on February 24, 2027. If you’re about to add AI features, moving to Laravel 13 first means you won’t need another framework project soon after.

Want AI features in an older Laravel application?

Tell us your versions and what you’d like the feature to do. We’ll tell you what has to change first.

We reply within one business day (IST).