Claude Agent Sdk Laravel
Description
Anthropic Claude Agent SDK for PHP & Laravel — build AI agents with tool use, sandboxing, MCP servers, subagents, hooks, and structured output via the Claude Code CLI
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude Agent SDK for Laravel
[](https://github.com/mohamed-ashraf-elsaed/claude-agent-sdk-laravel/actions) [](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-agent-sdk-laravel) [](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-agent-sdk-laravel) [](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-agent-sdk-laravel) [](https://laravel.com) [](LICENSE)
Build AI agents with Claude Code as a library in your Laravel applications. This SDK wraps the Claude Code CLI to give your app access to file operations, bash commands, code editing, web search, subagents, and more.
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12 and 13
- Claude Code CLI (
npm install -g @anthropic-ai/claude-code) - Anthropic API key
Installation
composer require mohamed-ashraf-elsaed/claude-agent-sdk-laravel
Publish the config:
php artisan vendor:publish --tag=claude-agent-config
Add your API key to `.env`:
ANTHROPIC_API_KEY=your-api-key
Quick Start
Simple Query
use ClaudeAgentSDK\Facades\ClaudeAgent;
$result = ClaudeAgent::query('What files are in this directory?');
echo $result->text(); // Final text result
echo $result->costUsd(); // Cost in USD
echo $result->sessionId; // Session ID for resuming
With Options (Fluent API)
use ClaudeAgentSDK\Options\ClaudeAgentOptions;
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI