Skip to main content
Ragrails builds the knowledge base for you. It scrapes websites, extracts content from documents, and pulls in REST APIs, then chunks, embeds, stores, and retrieves it, so your AI agents and LLM answers from real, grounded, current information.

Install

pip install "ragrails[voyage,qdrant]"
See installation for all extras.

Quick example

from ragrails import RagRails

rag = RagRails()

# Ingest, chunk, embed, and store in one call
rag.ingest(
    urls="https://example.com/docs",          # scrape a website
    docs=["files/guide.pdf"],                  # parse local files
    api={"url": "https://api.example.com/faq"},  # fetch a REST API
    embedding={"provider": "voyage", "model": "voyage-3"},
    storage={"vector_db": "qdrant", "collection": "docs", "url": "http://localhost:6333"},
)
Mix any sources in one call, or use them on their own:
SourceMethodUsage
Websitesurls=Website to RAG · scrape()
Documentsdocs=Documents to RAG · parse()
REST APIsapi=API to RAG · fetch()
Website scraping needs pip install "ragrails[url]" and a one-time rag.setup_url().

Start here

How RAG works

New to RAG? Read this first. The whole pipeline in 5 minutes.

Quickstart

A working knowledge base and chat in ~20 lines.

Features

Each stage, what it’s for, and how to tune it.

Pick an interface

SDK, CLI, or REST API.

Pick your interface

InterfaceUse it when
SDKYou build in Python
CLIYou work in the terminal or scripts
REST APIYour app isn’t Python