- What is datashaman/claude-agent-laravel used for?
- It is a Laravel companion package for datashaman/claude-agent-sdk that helps you add Anthropic Claude-powered assistants to Laravel applications. It provides a service provider, facade, Artisan commands, queue jobs, SSE streaming, and a Livewire chat component, along with an agent loop, tool calling, conversation history, and configurable system prompts.
- How do I install and configure datashaman/claude-agent-laravel in a Laravel app?
- Install it with Composer, publish the package configuration, and set the required environment variables for your Claude runtime and authentication. The package follows Laravel service-provider and config conventions, so you can keep agent calls behind a service boundary. Verify the PHP and Laravel constraints in the package metadata before installing into an existing application.
- Which PHP and Laravel versions does datashaman/claude-agent-laravel support?
- The release notes and README excerpt do not provide a full PHP and Laravel compatibility matrix, so treat version support as something to verify before adoption. Check the package composer.json constraints and test against your target Laravel version, especially because this is a pre-1.0 package at version 0.2.1 with possible config and API churn.
- Does datashaman/claude-agent-laravel require the Claude CLI or can it use the Anthropic API directly?
- The package appears to depend on an external Claude CLI or runtime rather than being only an HTTP API wrapper. That means container images and deployment environments may need the CLI binary plus explicit authentication provisioning. Confirm the runtime dependency and authentication flow in a disposable environment before designing production deployment around it.
- What is CLAUDE_BARE mode and when should I enable it?
- CLAUDE_BARE is the package's bare mode for headless or containerized deployments where interactive authentication assumptions are not practical. Enable it in non-interactive environments such as Docker or Kubernetes, but validate that authentication is provisioned explicitly and that the Claude CLI is present. Test bare mode in staging first because it may fail closed when auth or the runtime is missing.
- How does exclude_env_keys affect environment variable security?
- exclude_env_keys controls which environment variables are excluded from passthrough to the Claude runtime, and the SDK default reportedly excludes ANTHROPIC_API_KEY. You should confirm whether overriding it is an allowlist, denylist, or merge-over-default behavior before relying on it. Explicitly exclude every sensitive variable, not just ANTHROPIC_API_KEY, because a misconfigured exclusion list could leak credentials beyond the intended secret.
- Can I run Claude agent calls through Laravel queue jobs?
- Yes, the package includes queue jobs, which fit well for Claude agent calls that may be slow or costly when invoked through an external CLI or runtime. Use queues, concurrency limits, timeouts, rate-limit handling, and fallback behavior rather than putting every AI call directly on the request path. Keep the integration behind a service boundary so you can change or disable it without rewriting application code.
- How should I test and stage datashaman/claude-agent-laravel before production?
- Start with a spike in a disposable container using bare mode, then confirm authentication, runtime availability, and environment variable exclusion behavior. Test in staging containers that match production, including env var name collisions and the ANTHROPIC_API_KEY exclusion override. Use redacted logging, health checks, and a fallback path so missing CLI binaries or auth failures do not take down user-facing features.
- Is SSE streaming or the Livewire chat component suitable for high-traffic Laravel applications?
- The package provides SSE streaming and a Livewire chat component, but the TPM assessment notes that high-throughput request-path chat without queueing is a weaker fit. CLI invocation per request can be slow and costly, so use queues, concurrency limits, caching where appropriate, and timeout or rate-limit handling. Validate the streaming path under production-like load before making it a core user experience.
- What are the risks and alternatives to adopting this pre-1.0 package?
- The main risks are pre-1.0 API and config churn, an external Claude CLI or runtime dependency, security-sensitive environment passthrough, and community support without an SLA. Pin the package version, assign an internal owner, monitor 0.x releases, and keep a fallback path for Claude CLI or authentication failures. As an alternative, keep AI chat behind your own service boundary or use a lower-level Anthropic integration until the package has more stability and test evidence.