laravel-ai-sdk

laravel-ai-sdk is a skill for Claude Code, Codex from fusengine/agents. It costs 35 tokens per session (1,389 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/fusengine/agents/laravel-ai-sdk
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, Codex.

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.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.svg" alt="Measured on agentmods" 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,389 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00035 $0.01389
Opus 5 $0.00017 $0.00694
Sonnet 5 $0.00007 $0.00278
Haiku 4.5 $0.00003 $0.00139

Measured today against content hash 1547c2c2a933, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 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 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. Stream via routes - Return $agent->stream(...) directly from a route; do not buffer in memory

Read the full file on GitHub · 142 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. today Changed 1547c2c2a933
  2. yesterday 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 (25 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,389 once invoked, about $0.0002 per session on Opus 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

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

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

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 · 50 tokens

dspy-haystack-integration

Use for integrating DSPy with Haystack, optimizing Haystack prompts, improving retrieval pipelines, and extracting DSPy prompts.

OmidZamani/dspy-skills · 32 tokens

audit-langfuse-llm

Run a PDCA quality audit on LLM/AI features: traces, prompts, costs, evals, grounding, hallucination. Use for "audit LLM quality", "check Langfuse", "audit prompts", "check AI quality", "audit AI costs", "check traces". Jailbreak/OWASP LLM → audit-llm-security. Token caps → plan-llm-cost-guardrails.

kensaurus/cursor-kenji · 93 tokens