← ClaudeAtlas

laravel-ai-sdklisted

Use when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package. Covers 14+ providers (OpenAI, Anthropic, Gemini, Azure, Groq, DeepSeek, Ollama, Mistral, xAI, Cohere, ElevenLabs, Jina, VoyageAI, OpenRouter).
fusengine/agents · ★ 15 · AI & Automation · score 84
Install: claude install-skill fusengine/agents
# Laravel AI SDK ## Agent Workflow (MANDATORY) Before ANY implementation, use `TeamCreate` to spawn 3 agents: 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. --- ## Overview | Feature | Description | |---------|-------------| | **Unified API** | Same code surface for 14+ 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::toEmbeddings()` | | **Streaming** | Native SSE + Vercel AI SDK protocol compatibility | | **Structured output** | `agent(schema: fn ($s) => ...)` with `JsonSchema` | --- ## Critical Rules 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. **Stre