Laravel AI SDK
An officially maintained AI integration SDK for the Laravel framework that provides a unified HTTP API abstraction layer. It supports connections to major large language model providers such as OpenAI and Google, and includes built-in Agent, Tools, and Memory capabilities, eliminating the need to install third-party AI client libraries.
Timeline (last 90 days)
Laravel officially released AI SDK v1.0, enabling PHP developers to connect to various large models and build AI agents in a unified way
Laravel AI SDK does not require installing any vendor's client SDK separately, but instead makes calls to each vendor through a unified HTTP API abstraction layer
Laravel AI SDK provides three core capabilities: Agent, Tools, and Memory
Using the Artisan command `php artisan make:agent` can generate an agent PHP file in the app/AI/Agents directory
Using the `php artisan make:tool` command can create a tool class, whose three core methods are description, schema, and handle
The #[MaxSteps(6)] attribute can be used to limit the maximum number of reasoning steps for an agent, preventing repeated tool calls from accumulating large amounts of tokens or falling into a loop
Laravel AI SDK's migration files come with two tables, agent_conversation and agent_conversation_message, for storing conversation history, roles, and message order
By introducing Conversational and using the tryRememberConversation method, Laravel automatically saves and restores conversations without the need to manually write message storage and retrieval methods
Laravel AI SDK v1.0 does not yet have built-in conversation summary compression or maximum history round control, and developers need to implement these themselves to manage costs
All Facts (9)
Laravel AI SDK v1.0 does not yet have built-in conversation summary compression or maximum history round control, and developers need to implement these themselves to manage costs
50%UnverifiedLaravel AI SDK does not require installing any vendor's client SDK separately, but instead makes calls to each vendor through a unified HTTP API abstraction layer
50%UnverifiedLaravel AI SDK provides three core capabilities: Agent, Tools, and Memory
50%UnverifiedUsing the Artisan command `php artisan make:agent` can generate an agent PHP file in the app/AI/Agents directory
50%UnverifiedUsing the `php artisan make:tool` command can create a tool class, whose three core methods are description, schema, and handle
50%UnverifiedThe #[MaxSteps(6)] attribute can be used to limit the maximum number of reasoning steps for an agent, preventing repeated tool calls from accumulating large amounts of tokens or falling into a loop
50%UnverifiedLaravel AI SDK's migration files come with two tables, agent_conversation and agent_conversation_message, for storing conversation history, roles, and message order
50%UnverifiedBy introducing Conversational and using the tryRememberConversation method, Laravel automatically saves and restores conversations without the need to manually write message storage and retrieval methods
50%UnverifiedLaravel officially released AI SDK v1.0, enabling PHP developers to connect to various large models and build AI agents in a unified way
50%