GLOBUS.RAG Core: RAG in PHP without a second runtime
Retrieval-augmented generation usually arrives with a second stack: a Python service for embeddings, a vector database, an HTTP layer between them. GLOBUS.RAG Core keeps the whole pipeline inside PHP, so an existing application gains search over its own documents without new infrastructure.
What runs inside PHP
FerryAI is the engine under the hood. It bridges PHP 8.3 to native libraries through FFI and runs three model families in the same process: ONNX, GGUF through llama.cpp, and RubixML for classical models. Chat, streaming, embeddings, retrieval and vector search use one API.
That removes the usual glue. No Python worker, no HTTP microservice, no Docker sidecar. A queue worker or a cron job can build embeddings on the same server that serves pages.
Why it matters for a business
Documents live in WordPress, in a CRM, in file storage. A PHP-only pipeline reaches them with the credentials the site already has, and the answer stays inside the perimeter: no third party sees the corpus.
The second effect is operational. One deployment, one set of logs, one place to tune memory limits. Teams that already run PHP do not need to hire for a second ecosystem.
Where the engineering shows
The package ships with 793 tests, PHPStan at level 8 and Psalm at level 3. Version 0.1.1 is an early release with a stabilising API, which the repository states directly: pin a version and read the changelog before upgrading.
Model files stay outside the repository. Inference is the only job; training and fine-tuning happen elsewhere. That boundary keeps the package small and predictable.
How a project starts
The first step is a corpus audit: which documents, how often they change, what a correct answer looks like. Then chunking, embeddings and a retrieval check on twenty real questions. Only after that comes the interface.
Typical work: internal assistant over documentation, search over contracts, support answers from a knowledge base. The RAG development service covers the audit and the build. Related reading: Atomic Framework for the surrounding runtime.
Source and documentation: FerryAI on GitHub, llama.cpp.
