The AI toolkit with batteries included

Laravel AI SDK gives you the power to build complete AI‑native applications in a single first‑party package.

$ composer require laravel/ai

One SDK for every capability

Generate text, images, audio, and embeddings. Rerank files and manage vector stores - all in a single file with Laravel’s elegant APIs.

Agents without limits

Build powerful agents with instructions, memory, tools, structured outputs, and full testing capabilities built-in.

Stream, broadcast, and queue

Stream responses, broadcast events, and queue heavy workloads so AI interactions feel instant, even when the model is still thinking.

Built-in web and file tools

Use WebSearch, WebFetch, and FileSearch to enable agents to browse the web, fetch URLs, and search documents.

As eloquent as Laravel

Interact with multiple providers using familiar Artisan commands, facades, queues, and tests that make AI a first-class Laravel solution.

Testing tools included

Fake agents, images, audio, transcriptions, embeddings, reranking, and file stores, so you can ship AI features with real test coverage.

Powerful search features

Turn your files, embeddings, and vector stores into a searchable knowledge base with built-in RAG features. Every answer is intelligent and context-aware.

Automatic failover

Seamlessly switch between providers and models when a service goes down or hits rate limits. All of your AI features keep running. No fallback logic required.

Video

Learn how to use the Laravel AI SDK

Get a full walkthrough of each feature, how it works, and how it all comes together when building an app.

Agents

Create smart agents with incredible superpowers

Transform raw models into specialized agents with custom prompts, tools, and memory. Each agent acts like an expert built directly into your product.

Multimodal APIs

Generate images, transcribe audio, manage files, and more

Create extraordinary applications with embeddings, reranking, transcripts, files, vector stores, images, and audio to turn raw content into unique experiences. All from one file.

Rapidly ship AI-powered Laravel apps

Seamlessly add AI experiences into your Laravel application

$ composer require laravel/ai