@mohamedelsaed Does the first-party laravel/ai package not already support this?
Claude Agent SDK for Laravel — Build AI agents with Claude Code in PHP
Hey Laracasters,
I just published a Laravel package that wraps the Claude Code CLI as a library. It gives you a fluent PHP API for building AI agents with file operations, bash commands, code editing, subagents, MCP servers, and structured output.
Quick example:
use ClaudeAgentSDK\Facades\ClaudeAgent;
use ClaudeAgentSDK\Options\ClaudeAgentOptions;
$options = ClaudeAgentOptions::make()
->tools(['Read', 'Edit', 'Bash'])
->permission('acceptEdits')
->maxTurns(10);
$result = ClaudeAgent::query('Find bugs in the User model', $options);
echo $result->text();
Features: streaming, subagents, MCP servers, JSON schema output, session resume/fork.
Supports PHP 8.1+ and Laravel 10/11/12.
Install: composer require mohamed-ashraf-elsaed/claude-agent-sdk-laravel
GitHub: https://github.com/mohamed-ashraf-elsaed/claude-agent-sdk-laravel Docs: https://github.com/mohamed-ashraf-elsaed/claude-agent-sdk-laravel/wiki
Would appreciate any feedback on the API design or feature suggestions.
Please or to participate in this conversation.