Download the PHP package moneo/laravel-rag without Composer

On this page you can find all versions of the php package moneo/laravel-rag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-rag

Laravel RAG

CI codecov PHPStan Level 9 Infection MSI PHP 8.2+ Laravel 11+

A complete, driver-based RAG (Retrieval-Augmented Generation) pipeline for Laravel. Built on Prism PHP for provider-agnostic LLM and embedding support.

Features

Requirements

Vector store (choose one):

Note: sqlite-vec requires PHP compiled with SQLite extension loading support. macOS PHP (Herd, Homebrew) does not support this. Use Docker, Laravel Sail, or switch to pgvector on macOS.

Installation

Publish the config:

Run migrations:

Configuration

Vector Store Setup

Option A: pgvector (recommended)

Works everywhere. Requires PostgreSQL with pgvector extension.

Option B: sqlite-vec (Docker/Linux only)

Zero-infrastructure local dev. Does NOT work on macOS Herd/Homebrew PHP.

Linux (Ubuntu/Debian):

Docker / Laravel Sail:

macOS: sqlite-vec is not supported with Herd or Homebrew PHP. Use pgvector instead:

Quick Start

1. Prepare Your Model

2. Create a Migration

3. Ingest Content

4. Query

Streaming

Hybrid Search

Re-ranking

Agentic RAG

Conversation Memory

Chunking Strategies

RAG Evals

CLI:

MCP Server

Artisan Commands

Livewire Component

Filament Plugin

DevTools

Debugbar

Auto-registers when barryvdh/laravel-debugbar is installed. Shows:

Telescope

Auto-registers when laravel/telescope is installed. Records:

Error Handling & Retry

All Prism API calls are wrapped in PrismRetryHandler with exponential backoff:

Exception hierarchy:

Structured Logging

All operations emit structured logs via RagLogger (channel: rag.*):

Text fields are SHA-256 hashed for privacy — raw user input never appears in logs.

Custom Vector Store Driver

Implement VectorStoreContract:

Register in a service provider:

Benchmarks

Operation 1K docs 10K docs 100K docs
Character chunking (500 chars) 0.3ms 2.8ms 28ms
Sentence chunking 0.5ms 4.5ms 45ms
Markdown chunking 0.4ms 3.8ms 38ms
RRF merge (100+100 results) 0.1ms 0.1ms 0.1ms
Similarity search (pgvector HNSW) 2ms 5ms 12ms
Hybrid search (pgvector) 8ms 15ms 35ms
Embedding cache hit 0.5ms 0.5ms 0.5ms

Benchmarks run on Apple M2 Pro, PostgreSQL 16 with pgvector 0.7. Results may vary.

Security

This package ships with built-in security hardening:

Testing

Quality Gates

All of these must pass before merge:

Gate Requirement
PHPStan Level 9, zero errors
Test Coverage >= 99% line, >= 95% branch
Mutation Score (MSI) >= 85%
Rector Zero suggestions
Architecture Tests All Pest arch() rules green
Security Audit composer audit — zero vulnerabilities
CI Matrix PHP 8.2/8.3/8.4 x Laravel 11/12

Contributing

  1. Fork the repo and create a feature branch
  2. Write tests first — every new feature needs unit + feature tests
  3. Run the full quality gate suite locally:

  4. Ensure all architecture tests pass: vendor/bin/pest --testsuite=Architecture
  5. Submit a PR — CI will run the full matrix automatically

Adding a Custom Vector Store Driver

Community drivers should:

Security

See SECURITY.md for vulnerability disclosure policy and security measures.

License

MIT License. See LICENSE for details.


All versions of laravel-rag with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/console Version ^11.0|^12.0
illuminate/events Version ^11.0|^12.0
prism-php/prism Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package moneo/laravel-rag contains the following files

Loading the files please wait ...