Today, we’re releasing v1.0 of the Laravel AI SDK.
Our AI SDK entered beta earlier this year with the promise of one elegant, Laravel-native API for every provider.
For v1.0, we’ve cooked. We’ve closed hundreds of bugs, shipped incredibly powerful features, and added entirely new forms of AI to the SDK.
To get started, install the Laravel AI SDK with Composer:
A new kind of model
Some AI work isn't writing at all. Routing a ticket, flagging a comment, picking a branch in a workflow: these are classification decisions that need to be made quickly and cheaply.
TypeSafe, the creators of Jev, calls these System One models, and Laravel AI SDK now includes classification as a capability of its own alongside text, images, audio, and embeddings. Jev can answer classification questions in milliseconds at a fraction of the price of traditional LLMs:
For even simpler classification, the new decide macro on the Str class asks one yes-or-no question and returns a boolean. The threshold argument lets you control how much certainty the model should have in its classification:
Classification runs on TypeSafe & OpenRouter today. As other providers ship models of this kind, we will add them to the SDK behind this same API.
Speak your frontend's protocol
We’ve also built deeper support for Vercel Chat and AG-UI protocol standards, allowing the Laravel AI SDK to read requests and stream responses using those protocols so you can quickly build feature-rich UI experiences using the Laravel AI SDK with popular frontend libraries and tooling.
To get started, hand the request to Vercel::chat and pass the result straight to your agent:
That single route handles consuming the new message, updating the conversation history in your database, and inspecting any tool approval decisions the user submitted.
The Laravel AI SDK also now speaks the Agent User Interaction (AG-UI) protocol used by clients such as CopilotKit:
Need to rebuild a chat screen after a page reload? Convert your stored messages back into the shape the client expects:
Middleware now supports agent loop customization
Previously, agent middleware ran once per prompt. It now wraps each generation step, so an agent that calls three tools before answering runs your middleware three times. Each step arrives as a PendingStep that you can inspect and copy with changes.
This change makes middleware a more powerful place to control cost and context, and gives you the ability to customize an agent’s messages, tools, and more as the agent handles your prompt. For example, you can take an expensive tool away from the agent once the agent has already used it:
You can even swap the entire model mid-prompt, summarize a long message history, or return a cached answer without calling the provider at all. The withModel, withInstructions, withMessages, withTools, onlyTools, withToolChoice, withMaxTokens, and withProviderOptions methods allow you to customize every part of the prompt mid-execution.
Approvable tool calls
Some tools should not run without explicit human approval. You can now implement the Approvable contract on a tool and use the InteractsWithApprovals trait. When the agent encounters an Approvable tool, it will pause for approval instead of invoking the tool:
The response tells you what is waiting, including the arguments the model picked:
Resume by continuing the conversation with a decision for each pending call. A decision can approve the tool call, reject it with a reason that is provided to the model, or edit the arguments before the tool runs:
Approvals work with prompt, stream, queue, and the broadcast methods.
Conversations now store every step
We knew the conversations table would be the hardest thing to change once the AI SDK reached v1.0, so we gave extra consideration to its final shape before shipping.
A turn used to store its tool calls and its tool results as two flat lists, with replay state stored in the meta column. This approach lost which round-trip made a specific tool call, so rebuilding the history for a provider meant guessing, and some providers rejected the result. It also made a call that never ran look exactly like a call waiting on approval.
Instead of this approach, messages now carry have a single steps JSON column with one entry per round-trip, and each result is stored with the call that produced it:
Conversations are still stored as one row per turn, so pagination and the toolCalls and toolResults accessors keep working as before.
Raw SQL against tool_calls or tool_results will need to migrate to utilize the steps column. In addition, the upgrade guide includes a backfill migration that must be run once before you deploy v1.0.
Stop sending every tool on every request
An agent with 30 tools describes all 30 on every request, which costs tokens and makes the model's choice less accurate as the list grows. You may now wrap rarely used tools in ToolSearch, and the provider loads them only when the prompt calls for them:
The wrapped tools need no changes, and the agent calls them like any other tool once they are loaded. Tool search is supported on OpenAI and Anthropic.
Let agents run code
The new CodeExecution provider tool runs code in the provider's own sandbox instead, allowing more accurate results for agents that perform data analysis or calculations:
Code execution is supported on Anthropic, OpenAI, Azure, Gemini, and xAI.
Unified usage reporting across providers
Usage reporting is now consistent across every provider. The promptTokens and completionTokens properties are now inputTokens and outputTokens, and they include the provider's full counts:
Cached, cache-written, and reasoning tokens are now subsets of those totals.
Upgrading to v1.0
Laravel AI SDK v1.0 does include breaking changes, primarily around conversation storage, agent middleware, token usage, and stream protocols.
The Laravel AI SDK upgrade guide discusses each breaking change with before-and-after code and a likelihood of impact, so you can work through only what applies to you.
Upgrading using AI
We recommend you let an AI assistant do most of the upgrade work. Laravel Boost is our first-party Model Context Protocol (MCP) server, and it ships guided upgrade prompts for the AI SDK.
To get started, install Boost as a development dependency of your application, then install its MCP server and guidelines:
Once installed, run the /upgrade-ai-sdk-v1 slash command in Claude Code, Cursor, OpenCode, Gemini, or VS Code to begin the upgrade. Boost will automatically walk your assistant through the guide one change at a time.
Start building
The Laravel AI SDK gives you one clean, testable place for AI in your application. v1.0 makes that place ready for production.
Read the full documentation for guides on agents, tools, streaming, conversations, and more.
We can't wait to see what you build.