Laravel AI
Laravel AI SDK or Prism?
On a new feature in a Laravel 12 or 13 application, start with the first-party SDK. Prism remains a sensible choice if it already works in your codebase, or for its PHP 8.2 floor and a fluent API you prefer.
By itmarkerz Technologies. Updated 30 October 2026.
The two packages, as of today
Both are actively released. We checked Packagist on 30 October 2026; constraints change, so run composer why-not against your own project.
| Laravel AI SDK | Prism | |
|---|---|---|
| Package | laravel/ai | prism-php/prism |
| Maintained by | The Laravel team | Community project |
| Latest release checked | v1.3.0 (19 October 2026) | v0.102.0 (16 October 2026) |
| PHP | ^8.3 | ^8.2 |
| Laravel | ^12.0 or ^13.0, with illuminate/json-schema ^12.62 or ^13.15 | ^12.61.1 or ^13.12.0 |
| Style | Agent and tool classes, generated by Artisan | Fluent builder calls |
| Testing | Fakes and assertions for each capability | Fakes and assertions |
Sources: laravel/ai, prism-php/prism, the AI SDK documentation and the Prism documentation. Prism’s own matrix shows which features each provider supports and notes that support can depend on the model. The SDK’s documentation has a similar table by capability.
Reasons to choose the SDK
- Support line. It is maintained alongside the framework and documented in the main Laravel docs. For a team that will own this code for years, that counts for a lot.
- It joins up with the rest of Laravel 13. The search docs build on it:
whereVectorSimilarTorequires the SDK, and strings can be embedded withStr::of()->toEmbeddings(). - Application-shaped features. Approval for tools, conversation storage, queued agents and failover between providers are all built in. On an existing business application, these are the things you would otherwise write yourself.
Reasons to choose or keep Prism
- It already works. If Prism is in production and doing its job, “a first-party package exists” isn’t a reason to rewrite. Migrate when you need something it can’t do.
- PHP 8.2. Prism’s floor is one PHP version lower. That is only a temporary advantage: check your Laravel and PHP support dates, because the better fix is usually to move PHP.
- A lighter call. If you want one text generation behind a fluent builder rather than an agent class, you may prefer Prism’s style. The SDK also has anonymous agents through
agent(), so try both before deciding on this basis.
How to decide in an hour
- Run
composer why-notfor both packages against your application. - Check that the providers and capabilities you need are listed for your choice, on the current docs.
- Build the same small task both ways against a handful of your real examples, and read the two diffs.
- Choose the one your team would rather maintain, and uninstall the other.
The package is the smaller decision. The harder questions are in our readiness checklist: what data may leave, what it costs, and how you will judge the output. Most of our work is delivered under NDA, so many projects cannot be named. So this comparison comes from the public packages and documents, which you can check for yourself.
Questions
Is the Laravel AI SDK built on Prism?
The current laravel/ai composer.json doesn't list prism-php/prism as a dependency, so you can choose between them independently.
Can both be installed in one application?
Their Composer requirements don't exclude each other, as long as your application meets both sets of constraints. We would still avoid running both long term, because two abstractions over the same providers means two sets of configuration and tests.
Does either lock us in to a model provider?
Both packages exist partly to avoid that. Each one puts many providers behind one API, though provider-specific features and model behaviour still differ, so a switch always needs re-testing against your examples.
More on Laravel AI
- Adding AI to an existing Laravel app: version, data and cost checksA readiness checklist and a cost estimator, before anyone writes an agent.
- Semantic search on PostgreSQL with Laravel 13pgvector, the vector column, tenant scoping and when full-text is enough.
- Exposing your Laravel app over MCPWhat to expose first, how to authenticate it and how to test it.
Not sure which fits your application?
Tell us your Laravel version and what the feature has to do. We will give you a straight view on the package and on whether the feature is worth building.
We reply within one business day (IST).