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

v0.1.0 2025-12-19 00:16 UTC

This package is auto-updated.

Last update: 2025-12-19 00:55:31 UTC


README

This package provides a complete Retrieval-Augmented Generation (RAG) system for Laravel (12+) using PostgreSQL + pgvector, PrismPHP, and Spatie Laravel Data.

Installation

  1. Require the package
composer require akira/laravel-rag
  1. Preferred: use the installer
php artisan rag:install

Non-interactive (CI/scripts):

php artisan rag:install \
  --force \
  --with-tenancy \
  --run-migrate \
  --star
  1. Alternative: manual setup
php artisan vendor:publish --tag="laravel-rag-config"
php artisan vendor:publish --tag="laravel-rag-migrations"
  1. 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.