Download the PHP package sellinnate/rag-engine without Composer

On this page you can find all versions of the php package sellinnate/rag-engine. 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 rag-engine

RAG Engine for Laravel

[Tests]() [Coverage]() [PHPStan]() [PHP]() [Laravel]() Docs

📖 Full documentation: laravel-rag-engine.selli.io

Add semantic search and AI answers over your own content to any Laravel app. RAG Engine owns the whole Retrieval-Augmented Generation pipeline — ingesting documents, splitting them, turning them into searchable vectors, and retrieving the most relevant passages for any query. Writing a final answer with an LLM is an optional layer on top.

Infrastructure, not a feature. The engine owns ingestion → retrieval; generation is optional and decoupled. Vertical packages, internal agents and search modules build on top without re-implementing ingestion, chunking, embedding or retrieval.

What you can build

Use just the search half (no LLM, no AI bill) or add generation later — same code, one config switch.

Table of contents

Features

Requirements

Requirement Version
PHP 8.2+
Laravel 11, 12 or 13
A database any Laravel-supported (SQLite is fine to start)

A dedicated vector database is not required to begin: the default store is in-memory, and the database store works on plain Postgres/MySQL/SQLite. Use native pgvector or Qdrant at larger scale.

Installation

The service provider and Rag facade auto-register via package discovery. Out of the box the package uses zero-network, deterministic drivers (fake embedder, in-memory store, local KMS) so your test suite runs offline.

[!IMPORTANT] The fake embedder is for tests only — it doesn't understand meaning. For a real search feature, configure a real embedder (see Configuration).

Quick start

Refine retrieval fluently:

Indexing Eloquent models

If the content you want to search already lives in your database, make the model embeddable — it then stays in sync automatically as rows change, and every vector traces back to its model.

Model file fields (a PDF/DOCX upload) can be embedded too — addFile() parses the file to text and folds it into the model's embedding; non-embeddable binaries (zip/exe…) are skipped or rejected per policy. See docs/concepts/eloquent-models.md.

Asking questions with an LLM

Search returns the relevant chunks; an LLM turns them into a written, cited answer via Rag::ask(). This layer is optional and decoupled — with the default null driver, ask() returns the sources with an empty answer, so search-only apps carry no LLM dependency.

The package ships two LLM drivers: anthropic (Claude) and openai (OpenAI and any OpenAI-compatible API — Mistral, Ollama, Groq, OpenRouter…).

[!NOTE] Anthropic has no embedding API, so anthropic is a generation-only driver. Keep a real RAG_EMBEDDER (Mistral, OpenAI, Ollama…) for the search side. A common combo is Mistral/Ollama embeddings + Claude answers.

Retrieved content is treated as untrusted: the default prompt fences it and tells the model not to follow instructions inside it (prompt-injection hardening). Full guide: docs/concepts/generation.md.

Configuration

Configuration lives in config/rag-engine.php and works like Laravel's config/database.php: you define named connections per subsystem and pick a default. Switching provider = changing one name in .env.

[!NOTE] API keys go in .env, never in the committed config. A copy-ready list of every variable ships as .env.example. See docs/getting-started/configuration.md.

Supported drivers

Embedders (RAG_EMBEDDER)

Driver Provider Residency
openai OpenAI global
azure-openai Azure OpenAI EU (EU region)
mistral Mistral EU
jina Jina AI EU
voyage Voyage AI global
cohere Cohere global
gemini Google Gemini global
huggingface Hugging Face / self-hosted TEI global / self-host
ollama Ollama (BGE/E5/Nomic) self-hosted
fake deterministic (tests) local

Vector stores (RAG_VECTOR_STORE): memory (tests/dev) · database (portable SQL: Postgres/MySQL/SQLite, brute-force) · pgvector (native Postgres ANN: vector column + HNSW + <=>) · qdrant (EU self-hostable, ANN at scale). Full setup, including where to configure the Postgres connection, is in the Vector stores guide.

LLMs (RAG_LLM, for ask()): anthropic (Claude) · openai (OpenAI and any OpenAI-compatible API: Mistral, Ollama, Groq, OpenRouter…) · null/fake. Anthropic is generation-only (no embeddings). Answers can be streamed with Rag::ask(...)->stream().

Rerankers (RAG_RERANKER, optional cross-encoder pass): cohere · jina (EU) · null/fake.

KMS (RAG_KMS, BYOK key management): local (dev) · aws (AWS KMS, production).

OCR (RAG_OCR, scanned-PDF fallback): null · tesseract.

Parsers: plain text · Markdown · HTML · XML · CSV/TSV · JSON · DOCX · PDF (+ OCR for scans).

Chunkers: recursive (default) · sentence · markdown · fixed (char- or token-based), with optional parent-child and contextual headers.

All drivers share one contract — switching backends needs no code changes, and you can register your own (see docs/guides/custom-drivers.md).

Security & multi-tenancy

See docs/concepts/security.md and docs/concepts/multi-tenancy.md.

Documentation

The full documentation is hosted at laravel-rag-engine.selli.io. The sources live in docs/ and are built into a static site with docmd:

Start here:

Testing & development

Quality gates kept green on every change: 429 tests, PHPStan level 8, Pint clean, ≥90% coverage.

License

MIT — see LICENSE.md.


All versions of rag-engine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0||^13.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 sellinnate/rag-engine contains the following files

Loading the files please wait ...