mohamed-ashraf-elsaed/claude-agent-sdk-laravel
Agent, Tool, Hook), reducing boilerplate for AI agent orchestration.claude-code CLI, introducing:
AgentExecuted).AgentInterface).Tool system to encapsulate API calls (e.g., FileTool, WebSearchTool).bash script to a php artisan agent:run command.php artisan vendor:publish --provider="...") to customize:
fileinfo, curl).composer.json constraints).claude-code CLI globally (npm install -g @anthropic-ai/claude-code)..env (e.g., ANTHROPIC_API_KEY).config/app.php.Agent facade for convenience.php artisan make:agent-tool FileEditor).AgentHook::beforeExecute()).claude-code CLI updates for breaking changes.composer.json to avoid auto-updates.README for each Tool class).config/claude-agent.php).dd() or Log::debug() in hooks for troubleshooting.Agent::retryOnFailure()).| Failure Type | Impact | Mitigation |
|---|---|---|
| CLI Unavailable | Agents fail silently. | Health checks + fallback to cached data. |
| API Rate Limits | Agent timeouts or throttling. | Queue retries + request batching. |
| Sandbox Permission Errors | File/process operations blocked. | Validate sandbox paths in CI/CD. |
| Parsing Errors | Malformed outputs (e.g., JSON). | Validate structured outputs with schemas. |
| Dependency Conflicts | CLI/SDK version mismatches. | Pin versions in composer.json. |
| Cost Overruns | Unexpected API charges. | Set budget alerts + token limits. |
How can I help you explore Laravel packages today?