一键导入
laravel-ai-sdk
Build AI features with the first-party Laravel AI SDK (Laravel 13+); agents, embeddings, images, audio, and tool calling with provider-agnostic APIs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build AI features with the first-party Laravel AI SDK (Laravel 13+); agents, embeddings, images, audio, and tool calling with provider-agnostic APIs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use API Resources with pagination and conditional fields; keep response shapes stable and cache-friendly
Compose UIs with Blade components, slots, and layouts; keep templates pure and testable
Request effective code reviews—specify focus areas, provide context, ask for architectural feedback, reference Laravel conventions
Practical daily checklist for Laravel projects; bring services up, run migrations, queues, quality gates, and tests
Create effective debugging prompts—include error messages, stack traces, expected vs actual behavior, logs, and attempted solutions
Provide comprehensive context in prompts—files, errors, Laravel version, dependencies, and monorepo details—for accurate AI responses
| name | laravel:ai-sdk |
| description | Build AI features with the first-party Laravel AI SDK (Laravel 13+); agents, embeddings, images, audio, and tool calling with provider-agnostic APIs |
Use the first-party AI SDK for provider-agnostic text generation, agents, embeddings, images, and audio. Keep provider details in config; keep app code portable across OpenAI, Anthropic, Gemini, Bedrock, Ollama, and others.
# Install the SDK
sail composer require laravel/ai # or: composer require laravel/ai
# Basic agent prompt
use App\Ai\Agents\SalesCoach;
$response = SalesCoach::make()->prompt('Analyze this sales transcript...');
return (string) $response;
# Image generation
use Laravel\Ai\Image;
$image = Image::of('A donut sitting on the kitchen counter')->generate();
# Audio synthesis
use Laravel\Ai\Audio;
$audio = Audio::of('I love coding with Laravel.')->generate();
# Embeddings (also see laravel:vector-search)
use Illuminate\Support\Str;
$embeddings = Str::of('Napa Valley has great wine.')->toEmbeddings();
.env; never hardcode provider credentials