Articles AI
TAG ARCHIVE

Everything on AI.

28 articles tagged AI, sorted newest first.

ai

Generate Speech from Text in Laravel with the AI SDK's Audio Class

The Laravel AI SDK turns text-to-speech into four lines and hands you a Storage path instead of a byte string. Here is the whole surface — voices, queueing, serving — plus the hash cache that stops you paying twice for the same sentence.

10 min read
laravel-ai-sdk

Transcribe Audio in Laravel with the AI SDK: Uploads, Storage and Speaker Diarization

Transcription ships in the Laravel AI SDK with queueing, diarization and faking built in. Almost nobody knows it's there, so here's the whole path.

8 min read
laravel-ai-sdk

Generate and Store Images with the Laravel AI SDK

The AI SDK docs lead with text, so most people reach for a raw HTTP client to generate images. There's a first-class API for it — here's how I wire it up.

10 min read
laravel

Manage Laravel AI SDK Prompts as Versioned Blade Templates

Heredoc prompts buried in service classes cannot be diffed, reviewed or rolled back. Here is how I move them into versioned Blade templates that CI can catch.

9 min read
laravel

Add Input and Output Guardrails to a Laravel AI SDK Agent

The Laravel AI SDK ships no moderation API, but it does give you one clean interception seam. Here is how I wrap an agent with input and output guardrails using agent middleware.

9 min read
Laravel AI SDK

Cut LLM Costs with a Semantic Response Cache in the Laravel AI SDK

Exact-match caching never fires on natural-language prompts. Here's how I cache LLM responses by meaning using embeddings, pgvector, and the Laravel AI SDK.

10 min read
laravel

Build Multi-Agent Workflows with the Laravel AI SDK

One agent with a dozen tools and a bloated prompt gets flaky fast. Here's how to split the work across a coordinator and focused specialists with the Laravel AI SDK.

8 min read
laravel

Give Laravel AI SDK Agents External Tools with MCP Servers

Stop hand-writing a tool for every capability. Register an MCP client, authenticate it, and spread its tools straight into your Laravel AI SDK agent.

8 min read
laravel

Run Laravel AI SDK Agents in the Background with Queued Jobs

A synchronous AI call can tie up a PHP worker for half a minute. Here's how to run Laravel AI SDK agents on a queue and surface the result when it's done.

7 min read
laravel

Persist Multi-Turn Chat History with the Laravel AI SDK

A stateless agent forgets every turn. Here's how to wire persistent conversation memory into a Laravel AI SDK agent, resume a chat by ID, and stop long histories from wrecking your token budget.

7 min read
Laravel AI SDK

Track Token Usage and Cost with the Laravel AI SDK

Every Laravel AI SDK response carries a usage object. Here's how to capture it, attribute it to a user and feature, and turn tokens into a real cost dashboard.

8 min read
laravel

Laravel AI SDK Tool Calling: Let the Model Run Your PHP

Give a Laravel AI agent real abilities: typed PHP tools the model can call to look up data, with enum-constrained inputs and a hard cap on runaway loops.

7 min read
laravel

Test AI Features Without Calling the API: Agent::fake() in the Laravel AI SDK

You shipped an agent and wrote zero tests for it, because hitting a real model is slow, costs tokens, and needs a key in CI. The Laravel AI SDK's fake() fixes all three.

8 min read
laravel-ai-sdk

Analyze Images with the Laravel AI SDK: Vision and Multimodal Prompts

The Laravel AI SDK does more than generate text. Here's how to attach an image to a prompt and have a vision model describe, classify, or extract data from it.

7 min read
laravel

Provider Fallback and Failover with the Laravel AI SDK

A single LLM provider is a single point of failure. Here's how to fail over to a backup provider with the Laravel AI SDK without rewriting a line of prompt code.

7 min read
laravel

Laravel AI SDK Structured Output — JSON Schema Enforcement for LLM Responses

Stop parsing markdown fences and stripping prose out of LLM replies. The Laravel AI SDK ships a HasStructuredOutput contract that forces the model to return JSON matching the schema you describe in PHP — and the same agent works across every supported provider.

9 min read
ai

Stream Prism AI Responses Token-by-Token into Livewire with wire:stream

A ChatGPT-style chat UI in Laravel without writing a line of JavaScript, without WebSockets, without a separate Node process. Prism streams the tokens, Livewire's wire:stream paints them, you write the bubble.

11 min read
laravel

Trace Every LLM Call: Langfuse Observability for Prism in Laravel

Prism gives you the LLM API; Langfuse gives you the receipts. Wire them together with one env var and trace every prompt, token, and tool call in twenty minutes.

8 min read
laravel

Production AI Agents in Laravel: Reliable Loops with Prism and Laravel Workflow

A production-grade playbook for Laravel AI agents: verifier loops, idempotent tools, durable workflow state, Langfuse tracing, and evaluating agent quality in CI.

18 min read
laravel

Laravel 13 whereVectorSimilarTo(): Native Semantic Search in the Query Builder

Laravel 13's whereVectorSimilarTo() turns the query builder into a vector store. Plain strings in, ranked results out: no manual embedding pipeline.

9 min read
laravel

Building a RAG Pipeline with Laravel AI SDK and pgvector

Build a complete retrieval-augmented generation pipeline in Laravel: from embedding documents and storing vectors in pgvector to generating grounded answers with the AI SDK.

9 min read
laravel

Laravel Boost MCP: Let AI Agents Understand Your Codebase

AI coding assistants stumble on Laravel's magic methods and facades. Boost is a local MCP server that gives them structured context so they stop guessing.

6 min read
laravel

Laravel MCP Server: Expose Your App to AI Clients in 15 Minutes

The laravel/mcp package turns your Laravel app into an MCP server with a few artisan commands: no Node, no Python, just familiar middleware and routing.

6 min read
laravel

Laravel Prism Tool Calling: Build AI Agents That Actually Do Things

Prism's tool calling turns a text-generating LLM into an agent that can actually *do* things: query your database, hit an external API, or dispatch a queued job.

7 min read
laravel

Upgrading From Laravel 12 to Laravel 13: The Practical Guide

The Laravel 13 upgrade is mostly painless: but three config areas will silently change how your app behaves if you skip them. Here's what actually changed and what's worth adopting.

7 min read
laravel

The Complete Guide to the Laravel AI SDK in Laravel 13

Laravel 13 ships a first-party AI SDK that replaces the patchwork of vendor SDKs and community packages. Here's how to use every capability: agents, streaming, structured output, tools, embeddings and RAG: in one working project.

17 min read
laravel

Getting Started With Laravel Prism: Add AI to Any Laravel App in Minutes

Prism gives you a provider-agnostic fluent interface for OpenAI, Anthropic, Ollama, and more inside any Laravel app. Here's how to go from zero to your first AI response.

4 min read
devops

Building an Automated Bug-Fixing Pipeline with Claude Cowork

A Claude Cowork scheduled task that reads Sentry errors, triages them via Linear, implements fixes in your Laravel codebase, and opens a GitHub PR: without you lifting a finger until review.

8 min read