akira / laravel-rag
Akira RAG for Laravel 12 with PostgreSQL + pgvector
Fund package maintenance!
kidiatoliny
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/akira/laravel-rag
Requires
- php: ^8.4
- ext-zlib: *
- illuminate/contracts: ^12.0
- spatie/laravel-data: ^4.6
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- akira/laravel-debugger: ^1.0
- akira/setup: ^1.2
- driftingly/rector-laravel: ^2.1
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0
- peckphp/peck: ^0.1.3
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- rector/rector: ^2.0
README
This package provides a complete Retrieval-Augmented Generation (RAG) system for Laravel (12+) using PostgreSQL + pgvector, PrismPHP, and Spatie Laravel Data.
Installation
- Require the package
composer require akira/laravel-rag
- Preferred: use the installer
php artisan rag:install
Non-interactive (CI/scripts):
php artisan rag:install \ --force \ --with-tenancy \ --run-migrate \ --star
- Alternative: manual setup
php artisan vendor:publish --tag="laravel-rag-config" php artisan vendor:publish --tag="laravel-rag-migrations"
- Run migrations
php artisan migrate
Quick Start
use Akira\\Rag\\Facades\\Rag; Rag::ingest([ 'title' => 'Labor Law', 'source_type' => 'law', 'source_ref' => 'law:2021:123', 'content' => $text, 'meta' => ['lang' => 'en'], ]); $answer = Rag::ask('What are the notice periods?');
Documentation
For detailed documentation, please visit the package documentation website: https://packages.akira-io.com/packages/laravel-rag
CLI Commands
Commands support interactive prompts and non-interactive flags.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.