Articles › Laravel AI SDK
TAG ARCHIVE

Everything on Laravel AI SDK.

14 articles tagged Laravel AI SDK, sorted newest first.

laravel

Check Your LLM's Homework: Verifying Laravel AI SDK Output with Jev

A second LLM grading the first one is slow, expensive and wrong in the same places. Here's how I verify Laravel AI SDK answers with Jev instead.

10 min read →
laravel

Ask a Model About a PDF: Document Attachments in the Laravel AI SDK

A customer uploads a contract and asks a question about it. Here is how to answer it with a document attachment instead of a PDF parser or a week of RAG plumbing.

16 min read →
laravel

Stop Shipping Prompt Regressions: LLM Evals for the Laravel AI SDK with Pest 5

Your faked-agent tests prove the wiring works and tell you nothing about whether the output is still any good. Pest 5's evals plugin closes that gap.

15 min read →
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 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

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

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 →
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 →