laravel-ai-sdk

laravel-ai-sdk is a skill for Claude Code from fusengine/agents. It costs 35 tokens per session (1,397 once invoked), scanned A, original, MIT.

A Laravel integration guide for adding AI agents, tool calls, embeddings, structured responses, and streaming through the Laravel AI SDK. Embeddings are numeric representations of content that help software compare and search meaning.

In plain words
What is it for?
Use it to add AI agents, custom tools, file search, vector embeddings, streamed responses, or schema-based JSON output to Laravel 13 applications.
Why use it?
It provides one Laravel-oriented approach to connecting AI providers and handling common AI outputs, instead of assembling separate integrations for each feature.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the fuse-laravel plugin — 23 skills, 1 agent shipped together

Good fit Use it to add AI agents, custom tools, file search, vector embeddings, streamed responses, or schema-based JSON output to Laravel 13 applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fusengine/agents/laravel-ai-sdk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fusengine/agents --skill laravel-ai-sdk
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code.

Or install fuse-laravel, the plugin that ships this one along with the rest of its 23 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for laravel-ai-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/fusengine/agents/laravel-ai-sdk/github.svg)](https://agentmods.dev/skills/fusengine/agents/laravel-ai-sdk)
Your own site
<a href="https://agentmods.dev/skills/fusengine/agents/laravel-ai-sdk"><img src="https://agentmods.dev/badge/skills/fusengine/agents/laravel-ai-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laravel-ai-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/fusengine/agents/laravel-ai-sdk"><img src="https://agentmods.dev/badge/skills/fusengine/agents/laravel-ai-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,397 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 72
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01397
Opus 5.5 $0.00014 $0.00559
Sonnet 5.5 $0.00007 $0.00279
Haiku 4.5 $0.00003 $0.00140

Measured 22d ago against content hash 2bd674b9862b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

laravel-ai-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/laravel-expert/skills/laravel-ai-sdk/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Laravel AI SDK

Agent Workflow (MANDATORY)

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.


Overview

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

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. Stream via routes - Return $agent->stream(...) directly from a route; do not buffer in memory

Read the full file on GitHub · 143 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago Changed · +1 lines 2bd674b9862b
  2. 1mo ago Changed 1547c2c2a933
  3. 1mo ago First seen · 142 lines · 35 tokens per session scan A 605f06f6ad41

Subscribe to this mod's changes

laravel-ai-sdk is a skill published in the GitHub repository fusengine/agents (33 stars, last pushed 7d ago), licensed MIT. It adds 35 tokens to every session and 1,397 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

expert-ai-engineer

AI/ML engineering specialist — LLM integrations, prompt design, RAG pipelines, embeddings, evals, fine-tuning decisions, agent architectures. Use for any task involving model APIs, prompts, vector stores, or ML tradeoffs. Normally invoked by model-router.

mehtab78/skills · 59 tokens

markitdown

Converts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 62 tokens

ai-workflow-architect

Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…

cbrock84/headcount · 89 tokens

langchain-development

Expert guidance for LangChain and LangGraph development with Python, covering chain composition, agents, memory, and RAG implementations.

Mindrally/skills · 29 tokens

reviewing-ai-papers

Analyzes an AI/ML publication — paper, preprint, article, technical blog post — and extracts what an enterprise AI engineer should do about it. Use when someone supplies a URL or document on RAG, embeddings, fine-tuning, prompt engineering, agents, or LLM deployment and asks "review this paper", "what do you make of…

oaustegard/claude-skills · 105 tokens

16-ai-llm-security

LLM and AI application security testing — prompt injection, jailbreak resistance, OWASP LLM Top 10 (2025), RAG and agent/tool-use security, model supply chain, and AI red teaming for authorized assessments.

Masriyan/Claude-Code-CyberSecurity-Skill · 51 tokens