fastrag#

A Python SDK for the whole life of a RAG system: ingest sources, keep a vector collection in sync with them as those sources change, query it, and benchmark the result. pip install fastrag-ai gets you typed, swappable pieces — fetchers, parsers, chunkers, embedders, vector stores, rerankers — composed into a pipeline you own, not a framework you configure.

Note

Want to see a RAG chatbot answering questions end to end — backend, dashboard, and the widget it’s serving — before writing any Python? The repository root’s README.md brings up the whole composed product (docker compose up -d, no install beyond Docker) in a few commands. The guide below is for building your own pipeline with the SDK directly.

Build a pipeline

Install the package, index a source, ask it a question. Start here.

Guide
Talk to it over HTTP

fastrag.serve is a FastAPI app — create_app(engine=, chat_store=) — that streams grounded answers over SSE, for a client with no Python at all.

Serving
Look up a symbol

Every public class and function, generated from its docstring.

API reference
Work on fastrag itself

Clone it, run the Compose stack, and find your way around the source.

Contributing