Laravel AI SDK 1.0: Classification &amp; Tool Approvals | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. [Laravel](https://www.msaied.com/public/articles?category=laravel)
6. /
7. Laravel AI SDK 1.0: Classification, Tool Approvals, and Vercel Chat Streaming

   [Laravel](https://www.msaied.com/public/articles?category=laravel) [AI](https://www.msaied.com/public/articles?category=ai) 

 Laravel AI SDK 1.0: Classification, Tool Approvals, and Vercel Chat Streaming
==============================================================================

 Laravel AI SDK 1.0 ships a new Classification capability, human-in-the-loop tool approvals, Vercel Chat and AG-UI streaming support, and a revised conversation storage format—along with breaking changes you need to review before upgrading.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 23 Sep 2026 · Updated 24 Sep 2026 · 4 min read

ShareCopy linkCopied

 ![Laravel AI SDK 1.0: Classification, Tool Approvals, and Vercel Chat Streaming](https://cdn.msaied.com/696/4a8dc0443e01d9ddfd47cae8515f2943.png) 

  On this page +1. [Laravel AI SDK 1.0 Is Here](#laravel-ai-sdk-10-is-here)
2. [Classification: Fast Decisions Without a Full LLM](#classification-fast-decisions-without-a-full-llm)
3. [Vercel Chat and AG-UI Streaming](#vercel-chat-and-ag-ui-streaming)
4. [Approvable Tool Calls](#approvable-tool-calls)
5. [Other Notable Changes in 1.0](#other-notable-changes-in-10)
6. [Upgrading to 1.0](#upgrading-to-10)
7. [Key Takeaways](#key-takeaways)

 Laravel AI SDK 1.0 Is Here
--------------------------

The Laravel team released version 1.0 of the official Laravel AI SDK on September 23, 2026. First announced in February, this milestone release adds a dedicated Classification capability, frontend chat protocol support, human-in-the-loop tool approvals, and a revised conversation storage model. It also ships several breaking changes, so read the upgrade notes before you run `composer update`.

```bash
composer require laravel/ai

```

Classification: Fast Decisions Without a Full LLM
-------------------------------------------------

Classification is now a first-class capability alongside text, images, audio, and embeddings. It is designed for quick routing decisions—think flagging a support ticket as urgent or assigning it to the right department. It runs on Jev models from TypeSafe, which the team describes as answering questions in milliseconds at a fraction of the cost of traditional LLMs.

You define a set of typed questions and get typed answers back:

```php
use Laravel\Ai\Classification;
use Laravel\Ai\Classification\Boolean;
use Laravel\Ai\Classification\Choice;

$response = Classification::of($ticket->body)->questions([
    'is_urgent'  => new Boolean('Does this message convey urgency?'),
    'department' => new Choice('Which team should handle this?', [
        'billing'   => 'Payments, invoicing, refunds',
        'technical' => 'Bugs, outages, integrations',
        'sales'     => 'Pricing, plans, upgrades',
    ]),
])->classify();

$response['is_urgent']->isTrue();
$response['department']->choice; // 'technical'

```

A `Score` type returns a float between 0.0 and 1.0. For a single yes/no check, the new `Str::decide` macro keeps things concise:

```php
Str::of($message)->decide('Is this spam?');

```

Classification currently works with TypeSafe and OpenRouter, with more providers planned.

Vercel Chat and AG-UI Streaming
-------------------------------

The SDK can now read requests and stream responses using the Vercel Chat and AG-UI protocols, making it straightforward to pair a Laravel backend with frontend libraries that already speak those formats.

```php
use Illuminate\Http\Request;
use Laravel\Ai\Vercel\Vercel;

Route::post('/chat', function (Request $request) {
    $chat = Vercel::chat($request);

    return (new SupportAgent)
        ->withMessages($chat->history())
        ->stream($chat)
        ->usingProtocol($chat->protocol());
});

```

For AG-UI clients such as CopilotKit, call `usingAgentUserInteractionProtocol()` on the stream instead. `Vercel::toUiMessages()` converts stored messages back into the client format when rebuilding a chat screen after a page reload.

Approvable Tool Calls
---------------------

Tools that implement the `Approvable` contract and use the `InteractsWithApprovals` trait pause the agent until a human approves the action—ideal for destructive operations like deleting files.

```php
use Laravel\Ai\Concerns\InteractsWithApprovals;
use Laravel\Ai\Contracts\Approvable;
use Laravel\Ai\Contracts\Tool;

class DeleteFile implements Approvable, Tool
{
    use InteractsWithApprovals;
    // ...
}

```

The response lists each pending call with the arguments the model chose. You resume the conversation with a decision per call: approve, reject with a reason the model sees, or edit the arguments before the tool runs. Approvals work with `prompt`, `stream`, `queue`, and broadcast methods.

Other Notable Changes in 1.0
----------------------------

- **Per-step middleware:** Agent middleware now runs on every generation step, not once per prompt. Each step arrives as a `PendingStep` you can modify with `withModel`, `withTools`, `withoutTools`, and `withMaxTokens`.
- **Tool search:** Wrap rarely used tools in `ToolSearch` so the provider loads them only when a prompt needs them (OpenAI and Anthropic).
- **Code execution:** The `CodeExecution` provider tool runs code in the provider's sandbox on Anthropic, OpenAI, Azure, Gemini, and xAI.
- **Conversation steps:** Messages now use a single `steps` JSON column with one entry per round-trip; tool results are stored alongside the call that produced them.
- **Token usage:** `promptTokens` and `completionTokens` are renamed to `inputTokens` and `outputTokens`.

Upgrading to 1.0
----------------

Breaking changes affect conversation storage, agent middleware, token usage fields, and stream protocols. If you query the `tool_calls` or `tool_results` columns directly, migrate that logic to `steps`. Run the backfill migration included in the upgrade guide before deploying.

The team recommends using Laravel Boost to automate most of the upgrade:

```bash
composer require laravel/boost --dev
php artisan boost:install

```

Then run the `/upgrade-ai-sdk-v1` slash command in Claude Code, Cursor, OpenCode, Gemini, or VS Code.

### Key Takeaways

- Classification is a new, cost-efficient capability for routing and flagging tasks
- Vercel Chat and AG-UI protocols are now supported out of the box
- Tool approvals let you pause agents for human review before destructive actions run
- Conversation storage has moved to a single `steps` JSON column—run the backfill migration before deploying
- Token usage fields have been renamed; update any code that reads them
- Laravel Boost can automate most of the upgrade process

---

*Source: [Laravel AI SDK 1.0 Adds Classification and Tool Approvals — Laravel News](https://laravel-news.com/laravel-ai-sdk-1-0)*

- [Laravel AI SDK](https://www.msaied.com/public/articles?search=Laravel%20AI%20SDK)
- [Classification](https://www.msaied.com/public/articles?search=Classification)
- [Tool Approvals](https://www.msaied.com/public/articles?search=Tool%20Approvals)
- [Vercel Chat](https://www.msaied.com/public/articles?search=Vercel%20Chat)
- [AG-UI](https://www.msaied.com/public/articles?search=AG-UI)
- [Laravel Packages](https://www.msaied.com/public/articles?search=Laravel%20Packages)

 Frequently asked questions 
---------------------------

  What is the Classification capability in Laravel AI SDK 1.0?Classification is a new first-class capability that lets you ask typed questions—Boolean, Choice, or Score—about a piece of text and get structured answers back. It runs on Jev models from TypeSafe and is designed for fast, low-cost routing decisions such as flagging urgent tickets or assigning them to the correct department.

   How do approvable tool calls work in Laravel AI SDK 1.0?A tool that implements the Approvable contract and uses the InteractsWithApprovals trait pauses the agent before executing. The response lists each pending call with the model's chosen arguments. You then resume the conversation with a decision to approve, reject with a reason, or edit the arguments before the tool runs.

   What are the main breaking changes when upgrading to Laravel AI SDK 1.0?The main breaking changes are in conversation storage (tool\_calls and tool\_results columns replaced by a single steps JSON column), agent middleware behavior (now runs per step instead of per prompt), token usage field names (renamed to inputTokens and outputTokens), and stream protocols. You must run the included backfill migration before deploying 1.0.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://www.msaied.com/public#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://www.msaied.com/public#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleLaravel AI SDK v1.0: Classification, Approvable Tools, Agent Middleware &amp; More](https://www.msaied.com/public/articles/laravel-ai-sdk-v10-classification-approvable-tools-agent-middleware-more) [Next articleAuto-Load Generated Columns After Save with Laravel's #\[Refreshes\] Attribute](https://www.msaied.com/public/articles/auto-load-generated-columns-after-save-with-laravels-refreshes-attribute)  

   On this page
-------------

1. [Laravel AI SDK 1.0 Is Here](#laravel-ai-sdk-10-is-here)
2. [Classification: Fast Decisions Without a Full LLM](#classification-fast-decisions-without-a-full-llm)
3. [Vercel Chat and AG-UI Streaming](#vercel-chat-and-ag-ui-streaming)
4. [Approvable Tool Calls](#approvable-tool-calls)
5. [Other Notable Changes in 1.0](#other-notable-changes-in-10)
6. [Upgrading to 1.0](#upgrading-to-10)
7. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com/public#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com/public#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/public/sitemap.xml)
