Loading...
Loading...
Laravel AI SDK for building AI-powered features. Use when creating agents, generating images or audio, working with embeddings, vector search, or testing AI features. Triggers on tasks involving laravel/ai, AI agents, tool-calling, structured output, streaming, embeddings, reranking, or AI faking in tests.
npx skill4agent add asyrafhussin/agent-skills laravel-ai-sdklaravel/ai| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Agents | CRITICAL | |
| 2 | Tools | HIGH | |
| 3 | Embeddings & Search | HIGH | |
| 4 | Media Generation | MEDIUM | |
| 5 | Files & Storage | MEDIUM | |
| 6 | Infrastructure | MEDIUM | |
| 7 | Testing | HIGH | |
agent-create-configureagent-promptingagent-structured-outputagent-streaming-asyncagent-middlewareagent-anonymoustool-createtool-providerembed-generate-cacheembed-rerankmedia-imagesmedia-audio-transcriptionfiles-vector-storesinfra-failovertest-agentstest-mediatest-data<?php
namespace App\Ai\Agents;
use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Promptable;
class SalesCoach implements Agent
{
use Promptable;
public function instructions(): string
{
return 'You are a sales coach, analyzing transcripts and providing feedback.';
}
}use App\Ai\Agents\SalesCoach;
$response = SalesCoach::make()->prompt('Analyze this sales transcript...');
return (string) $response;use Laravel\Ai\Image;
$image = Image::of('A donut sitting on the kitchen counter')
->landscape()
->generate();
$path = $image->store();use Illuminate\Support\Str;
$embeddings = Str::of('Napa Valley has great wine.')->toEmbeddings();use App\Ai\Agents\SalesCoach;
SalesCoach::fake(['First response', 'Second response']);
SalesCoach::make()->prompt('Analyze this...');
SalesCoach::assertPrompted('Analyze this...');AGENTS.md