Elyra
Development
Development
Elyra
Laravel AI SDK

Laravel AI SDK

The complete reference for building AI‑powered Laravel applications with laravel/ai.

@elyracode/stack-laravel-ai is a stack profile dedicated entirely to the Laravel AI SDK. It covers agents, sub‑agents, tools, structured output, streaming, embeddings, vector stores, images, audio, reranking, files, testing, configuration, and events.

Install

elyra install npm:@elyracode/stack-laravel-ai

What’s included

Area Coverage
Agents Creating, prompting, conversation context, RemembersConversations
Sub‑agents Multi‑agent delegation with CanActAsTool, isolated execution
Tools Custom tools, provider tools (WebSearch, WebFetch, FileSearch), SimilaritySearch
Structured output JSON schemas with nested objects and arrays
Streaming SSE, Vercel AI SDK protocol, broadcasting
Embeddings Vector columns (pgvector), similarity queries, caching
Vector stores File indexing, metadata, FileSearch integration
Images Generation, reference images, storage
Audio TTS, STT, diarization
Reranking Semantic reordering with Cohere, Jina, VoyageAI
Files Provider file storage, retrieval, deletion
Testing Faking agents, images, audio, embeddings, reranking, files, stores
Configuration Provider attributes, middleware, failover, provider options
Events Full lifecycle event coverage

Examples

> Build a customer service system with a main agent that routes to refund and support sub-agents
> Create an agent that analyzes sales transcripts with structured output
> Set up RAG with embeddings and vector stores for my knowledge base
> Add streaming AI responses to my Laravel app with broadcasting

The agent generates complete, working Laravel AI SDK code following official patterns.