The Laravel AI SDK (laravel/ai) is a first-party PHP package that brings full AI agent capabilities to Laravel developers without requiring Python. It supports 14 AI providers including OpenAI and Anthropic, and offers tool calling, structured output, streaming, conversation memory, RAG with pgvector, queue integration, and five multi-agent workflow patterns (prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer). The SDK is positioned as the LangChain equivalent for PHP, using familiar Laravel conventions like Eloquent, queues, and the service container. A built-in fake/testing layer is included for unit testing agents without external services.

7m read timeFrom laravel.com
Post cover image
Table of contents
# What the Laravel AI SDK Is# Building Your First Laravel Agent# What Laravel Agents Can Do# Multi-Agent Workflows# Getting Started

Sort: