agent-creator
Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
Use when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package.
Claude Code
$ npx -y skills add fusengine/claude-plugins --skill laravel-ai-sdk --agent claude-code
Codex
$ npx skills add fusengine/claude-plugins --skill laravel-ai-sdk -a codex -y
Cursor
$ npx skills add fusengine/claude-plugins --skill laravel-ai-sdk -a cursor -y
Gemini CLI
$ npx skills add fusengine/claude-plugins --skill laravel-ai-sdk -a gemini-cli -y
GitHub Copilot
$ npx skills add fusengine/claude-plugins --skill laravel-ai-sdk -a github-copilot -y
OpenCode
$ npx skills add fusengine/claude-plugins --skill laravel-ai-sdk -a opencode -y
Windsurf
$ npx skills add fusengine/claude-plugins --skill laravel-ai-sdk -a windsurf -y
name: laravel-ai-sdk description: Use when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package. versions: laravel: "13.0" php: "8.3" laravel/ai: "^1.0" user-invocable: true references: references/installation.md, references/agents.md, references/tools.md, references/embeddings.md, references/streaming.md, references/structured-output.md, references/templates/Agent.php.md, references/templates/Tool.php.md, references/templates/EmbeddingService.php.md, references/templates/StreamingController.php.md related-skills: laravel-attributes, laravel-vector-search
<objective> Covers the `laravel/ai` package for Laravel 13: building class-based Agents (Agent contract + Promptable trait), tool calling (FileSearch + custom tools), generating and storing embeddings, structured output via JSON Schema, and streaming (SSE + Vercel AI SDK protocol). Supports 17 providers through the unified `Lab` enum — OpenAI, OpenAI-compatible, Anthropic, Gemini, Azure, Bedrock, Groq, DeepSeek, Ollama, Mistral, xAI, Cohere, ElevenLabs, Jina, TypeSafe, VoyageAI, OpenRouter. </objective>
Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:
1. **fuse-ai-pilot:explore-codebase** - Map existing AI usage (custom HTTP clients, OpenAI PHP, etc.) to migrate 2. **fuse-ai-pilot:research-expert** - Verify provider model IDs and pricing on the official Laravel AI SDK docs 3. **mcp__context7__query-docs** - Pull latest `laravel.com/docs/13.x/ai-sdk` examples
After implementation, run **fuse-ai-pilot:sniper** for validation.
---
| Feature | Description | |---------|-------------| | **Unified API** | Same code surface for 17 providers via `Lab` enum | | **Agents** | Class-based with `Agent` contract + `Promptable` trait | | **Tool calling** | First-party `FileSearch` + custom tools per agent | | **Embeddings** | `Embeddings::for([...])->generate()` + `Str::of(...)->toEmbeddings()` | | **Streaming** | Native SSE + Vercel AI SDK protocol compatibility | | **Structured output** | `agent(schema: fn ($s) => ...)` with `JsonSchema` |
---
1. **Use the `Lab` enum** - Never hard-code provider strings; use `Lab::Anthropic`, `Lab::OpenAI`, etc. 2. **Configure keys in `.env`** - One env var per provider (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, ...) read by `config/ai.php` 3. **Agents are classes** - Always implement `Laravel\Ai\Contracts\Agent` and use `Promptable` trait 4. **Declare tools explicitly** - Override `tools(): iterable` to expose tool calls; never assume implicit registration 5. **Stream via routes** - Return `$agent->stream(...)` directly from a route; do not buffer in memory
---
app/ ├── Ai/ │ ├── Agents/ │ │ └── SalesCoach.php # implements Agent, uses Promptable │ ├── Tools/ │ │ └── SearchProducts.php # custom tool class │ └── Services/ │ └── EmbeddingService.php # Embeddings::for() wrapper config/ └── ai.php # providers, default models .env # *_API_KEY entries
→ See [Agent.php.md](references/templates/Agent.php.md) for a full agent
---
| Topic | Reference | When to Consult | |-------|-----------|-----------------| | **Installation** | [installation.md](references/installation.md) | Setting up `laravel/ai` and providers | | **Agents** | [agents.md](references/agents.md) | Building agent classes with attributes | | **Tools** | [tools.md](references/tools.md) | Tool calling, `FileSearch`, custom tools | | **Embeddings** | [embeddings.md](references/embeddings.md) | Generating vectors for semantic search | | **Streaming** | [streaming.md](references/streaming.md) | SSE + Vercel AI SDK protocol | | **Structured output** | [structured-output.md](references/structured-output.md) | `agent()` helper + JSON Schema |
| Template | When to Use | |----------|-------------| | [Agent.php.md](references/templates/Agent.php.md) | Net new agent class | | [Tool.php.md](references/templates/Tool.php.md) | Custom tool implementation | | [EmbeddingService.php.md](references/templates/EmbeddingService.php.md) | Batch embedding generation | | [StreamingController.php.md](references/templates/StreamingController.php.md) | SSE streaming endpoint |
---
use App\Ai\Agents\SalesCoach;
$response = (new SalesCoach)->prompt('Summarize this call');use Illuminate\Support\Str;
$embedding = Str::of('Napa Valley wine')->toEmbeddings();Route::get('/coach', fn () => (new SalesCoach)->stream('Analyze this'));→ See [Agent.php.md](references/templates/Agent.php.md) for complete example
---
A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.
Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
Use when starting ANY development task -- feature, bug fix, refactor, hotfix (triggers: implement, create, build, fix, add…
Use when creating a feature/component or adding functionality. Fires BEFORE APEX Analyze to refine requirements via structured…
Use before a root-cause, done/verified claim, irreversible action, or 2nd-time fix reaches the owner (APEX or plain…
Use when validating code quality after modifications -- SOLID compliance, DRY duplication, linter errors, architecture…
Use when an expert agent self-reviews and self-corrects code after the Execute phase, before sniper validation (BMAD-METHOD…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.