Skip to content

Installation ​

ragX needs Python 3.10 or newer.

bash
pip install pyragx

The distribution is named pyragx on PyPI; the package you import and the command you run are both ragx.

The base install runs the default variant, ragx-lexical, which ranks with BM25 and needs no embedding model, no vector database and no GPU.

Optional extras ​

Install extras for the parts you use:

ExtraInstallWhat it adds
densepip install "pyragx[dense]"sentence-transformers and NumPy, for the dense, fused and rerank rankers (ragx, ragx-core, ragx-fused, ragx-rerank, ragx-fast, ragx-think)
anthropicpip install "pyragx[anthropic]"the Anthropic SDK, for anthropic: models
googlepip install "pyragx[google]"the Google Generative AI SDK, for google: models
localpip install "pyragx[local]"transformers, PyTorch and Accelerate, to run hf: models in-process
serverpip install "pyragx[server]"FastAPI and Uvicorn, for ragx serve
uipip install "pyragx[ui]"Textual, for the full-screen terminal view
allpip install "pyragx[all]"everything above

OpenAI-compatible providers (OpenAI, Groq, Together, Cerebras, Fireworks and any vLLM server) work with the base install.

Set a model ​

ragX reads provider keys from the environment, or from a .env file in the working directory or any parent. It never logs them.

bash
export OPENAI_API_KEY=...        # or ANTHROPIC_API_KEY, GOOGLE_API_KEY, GROQ_API_KEY, ...

Without model=, ragX picks a default from the first key it finds (see Models and providers). With no key at all it falls back to a small local model, which needs the local extra.

Optional tools ​

The classic agent uses ripgrep for exact search when it is on the PATH (and falls back to a pure-Python search when it is not), and ugrep for fuzzy search. The ragX variants need neither.

Verify ​

bash
ragx --version
ragx variants

Released under the Apache 2.0 License.