carlin / laravel-ai
Laravel AI SDK with PHP 8.1+ and Laravel 8-13 compatibility (drop-in fork of laravel/ai).
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0.1|^8.0
- illuminate/console: ^8.77|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/container: ^8.77|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/contracts: ^8.77|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/database: ^8.77|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/filesystem: ^8.77|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^8.77|^9.0|^10.0|^11.0|^12.0|^13.0
- laravel/serializable-closure: ^1.3|^2.0
- symfony/polyfill-php83: ^1.31
- symfony/polyfill-php84: ^1.31
- symfony/uid: ^5.4|^6.0|^7.0|^8.0
- symfony/yaml: ^5.4|^6.0|^7.0|^8.0
Requires (Dev)
- aws/aws-sdk-php: ^3.369.1
- driftingly/rector-laravel: ^2.5
- jasonmccreary/double: ^1.0
- laravel/mcp: ^1.0
- laravel/pint: ^1.26
- orchestra/testbench: ^6.24|^7.15|^8.15|^9.0|^10.6|^11.0
- pestphp/pest: ^1.23|^2.34|^3.0|^4.0
- pestphp/pest-plugin-laravel: ^1.4|^2.4|^3.0|^4.0
- phpstan/phpstan: ^2.1
- rector/rector: ^2.5
Suggests
- aws/aws-sdk-php: Required to use the Bedrock provider.
- carlin/laravel-mcp: Required to use MCP client tools or MCP server tools with Laravel AI agents on Laravel 8-13 (replaces laravel/mcp).
- laravel/prompts: Recommended on Laravel 10.25+ for interactive Artisan prompts.
Provides
None
Conflicts
- aws/aws-sdk-php: <3.369.1
- laravel/mcp: <1.0
Replaces
- laravel/ai: v1.4.3.1
- 1.x-dev
- dev-compat/laravel-8-11 / 1.x-dev
- v1.4.3.1
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.1
- v1.0.0
- 0.x-dev
- v0.11.3
- v0.11.2
- v0.11.1
- v0.11.0
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.1
- v0.9.0
- v0.8.1
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.8
- v0.6.7
- v0.6.6
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.1
- v0.5.0
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-sign-tool-approvals
- dev-feat/anthropic-thinking-across-turns
- dev-update-openai-models
- dev-clarify-unauthenticated-provider-errors
- dev-fix/anthropic-empty-user-text
- dev-dev-title-generation-events
- dev-fix/openai-compatible-tool-calls
- dev-expose-reranking-raw-response
- dev-expose-transcription-raw-response
- dev-fix/tool-call-approval-ids
- dev-limit-remote-file-size-0.x
- dev-limit-remote-file-size
- dev-validate-provider-resource-ids
- dev-fix/interrupted-result-call-id
- dev-security-policy-parity
- dev-mistral/file-search
- dev-mistral/stores
- dev-mistral/store-direct-uploads
- dev-openai-compatible-classification
- dev-mistral/files
- dev-fix/openrouter-audio-content
- dev-fix-openrouter-image-endpoint
- dev-upgrade-guide-1-2
- dev-anthropic-haiku-5-5-sampling
- dev-openai-decisions
- dev-sandboxes
- dev-pi-harness
- dev-azure-tool-search-groq-built-in-tools
- dev-docs/upgrade-boost-requirements
- dev-share-provider-capability-check
- dev-add-cohere-text-generation
- dev-claim-approvals-before-resume
- dev-share-file-content-traits
- dev-report-missing-provider-driver
- dev-remove-dead-code
- dev-upgrade-guide
- dev-gemini-refactor
- dev-persist-a-turn-that-fails
- dev-document-the-conversation-gotchas
- dev-replace-approval-timestamp-with-status
- dev-record-turns-as-they-run
- dev-decide-macro
- dev-fold-approval-resume-into-paused-turn
- dev-remove-gateway-umbrella-interface
- dev-persist-provider-tool-calls
- dev-conversation-steps-reasoning
- dev-conversation-steps-schema
- dev-pr/1.x/transcription-usage
- dev-pr/1.x/image-usage
- dev-conversation-steps
- dev-text-usage
- dev-openai-retain-replay-blocks
- dev-upgrade-guide-1.0
- dev-fix/citations/streaming-events
- dev-fix/anthropic-reasoning-tokens
- dev-feature/surfaces
- dev-feature/claude-code-harness-agents
- dev-pushpak/ag-ui-chat
- dev-add-agent-instruction-views
- dev-fix/cohere-bedrock-input-token-count
- dev-tool-model-binding
- dev-fix/fake-gateway-exhaustion
- dev-fix/xai-streaming-web-search-citations
- dev-ui-message-conversion
- dev-fix/anthropic-web-fetch-citations
- dev-add-context-compaction
- dev-feature/caller-supplied-invocation-id
- dev-fix/mcp-generator-request-scope
- dev-gemini-3.7-flash-tests
- dev-pulse-cards
- dev-fix/gemini-thought-signature-persisted-conversations
- dev-fix/openai-text-part-reset-after-text-end
- dev-complete-agent-event-surface
- dev-prompt-cache-breakpoints
- dev-add-headers
- dev-fix/multi-step-approval-resume
- dev-feature/deferred-tool-loading
- dev-add-ag-ui-protocol-streaming
- dev-parallel-tools
This package is auto-updated.
Last update: 2026-12-03 01:45:04 UTC
README
Introduction
carlin/laravel-ai is a drop-in compatibility fork of laravel/ai supporting PHP 8.1+ and Laravel 8.77+, 9.x, 10.x, 11.x, 12.x, and 13.x, while keeping identical Laravel\Ai\* namespaces and declaring "replace": { "laravel/ai": "self.version" }.
The Laravel AI SDK provides a unified, expressive API for interacting with AI providers such as OpenAI, Anthropic, Gemini, and more. With the AI SDK, you can build intelligent agents with tools and structured output, generate images, synthesize and transcribe audio, create vector embeddings, and much more — all using a consistent, Laravel-friendly interface.
Laravel 8–13 Compatibility & Installation
composer require carlin/laravel-ai
# Optional: if using MCP client/server tools on Laravel 8-13
composer require carlin/laravel-mcp
- Preserves the exact
Laravel\Ai\*namespaces, service provider, config, and Artisan commands so upgrading back to officiallaravel/aion Laravel 12/13 requires zero code changes. - See COMPAT.md for the full compatibility matrix, database vector polyfills, and architecture details.
Documentation
Documentation for the Laravel AI SDK can be found on the Laravel website.
Contributing
Thank you for considering contributing to Laravel! The contribution guide can be found in the Laravel documentation.
Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The Laravel AI SDK is open-sourced software licensed under the MIT license.