brags
brags (Build-your-own RAG System) is a Python package that makes it easy to spin up a custom Retrieval-Augmented Generation (RAG) pipeline.
It combines Python for the RAG logic and a background Go file watcher that monitors your documents folder, so your vector database is always up to date.
Features
- Config-driven RAG setup (
rag_config.yaml) - Pluggable embeddings (HuggingFace, OpenAI, etc.)
- Flexible LLM providers (OpenAI, Gemini, Ollama, HuggingFace)
- Multiple vector stores (FAISS, Chroma, Qdrant, Pinecone, Weaviate)
- Two file watcher modes:
- Persistent (event-driven) → watches changes in real time via
fsnotify - Cron (polling-based) → scans folder at regular intervals
- Chunking and reranking options
- Hallucination checking with embedding similarity or LLM-based fact checking
- Configurable logging & monitoring
Installation
Requires Python 3.10+. Building the file-watcher binary from source also requires Go 1.22+.
From source (recommended)
git clone https://github.com/Omkar-Wagholikar/adora.git
cd adora
pip install -e .
Build the Go watcher binary (required for background file monitoring):
cd go
./build.sh
This generates brags/bin/server_executable (plus the static UI and pythonFiles/, copied alongside it), which brags init spawns in the background.
From PyPI
pip install brags
Note: the version currently published on PyPI predates several fixes made in this repository (real dependency declarations, a corrected Python version floor, portable file paths) — a new version needs to be tagged and released before
pip install bragsreflects them. Until then, prefer the source install above.The published wheel also bundles a Go binary built for Linux. Installing on macOS or Windows gets you the Python RAG pipeline, but the bundled
brags initbinary won't run there — buildgo/from source on those platforms instead.
Optional: ensemble embeddings
EnsembleEmbedding (TF-IDF + LDA + BM25 blended with dense embeddings) needs an extra
dependency group not installed by default:
poetry install --with ensemble
# or, with plain pip:
pip install scikit-learn gensim rank-bm25
Quick Start
- Copy the example config:
cp brags/rag_config.example.yaml brags/rag_config.yaml
- Edit
rag_config.yamlwith your model, embeddings, and file watcher preferences:
file_watcher:
type: "persistent" # Options: persistent, cron
watch_dir: "./watched"
pattern: "*.txt"
cron_schedule: "*/3 * * * * *" # Only for cron watcher
debounce_seconds: 1 # Only for persistent watcher
- Run your RAG system:
python -m brags.main
The Go watcher will start in the background, monitor your documents folder, and update your vector DB whenever files change.
Project Structure
brags/ # Python package
go/ # Go watchers + Python callback
tests/ # Unit tests
vector_db/ # Local FAISS indexes
rag_config.yaml # Main configuration file
Configuration
All behavior is controlled via rag_config.yaml.
Sections include:
- llm → provider, model, API keys
- embedding → embedding model & dimensions
- vector_store → FAISS, Chroma, etc.
- chunking → chunk size, overlap, splitter
- reranking → reranker model
- hallucination_checker → method + provider
- logging → level and log file path
- file_watcher → watcher type, path, debounce/cron config
See rag_config.example.yaml for details.
Testing
Run unit tests:
pytest tests
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines, and check CHANGELOG.md for updates.
License
This project is licensed under the MIT License.
Metadata
Release files for brags 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brags-0.1.5.tar.gz | 5.3 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| brags-0.1.5-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| brags-0.1.5-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| brags-0.1.5-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| brags-0.1.5-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| brags-0.1.5-py3-none-macosx_10_15_x86_64.whl | Python 3 | none | macOS 10.15+ x86-64 | Details |
Total release size: 31.4 MB
Release files / brags-0.1.5.tar.gz
| Download URL | brags-0.1.5.tar.gz |
|---|---|
| Size | 5.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aef8be19bf7493bb8f39991f5cc245d2fd6a636654aaf22d89ebbaef782ae37f
|
|
BLAKE2b-256 checksum How to use checksums |
1de41fff72b4eb3db37c52bfabd54123726536878ebc6c2493e38f489f32c4d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / brags-0.1.5-py3-none-win_amd64.whl
| Download URL | brags-0.1.5-py3-none-win_amd64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e4c7238f9c66972084ef81d57e971b3b79dd40e9b3980255d66f02dbb7d2c0a5
|
|
BLAKE2b-256 checksum How to use checksums |
741cae618e21522cb55af9a4659cf9e5c7c9802e2d0adc6ce1a5623d1a3c4e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / brags-0.1.5-py3-none-manylinux2014_x86_64.whl
| Download URL | brags-0.1.5-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
88f2d471d0755cfb73d069bf640e1675cb4c611eeaa50fd158cb42534a2361ee
|
|
BLAKE2b-256 checksum How to use checksums |
0c71af0d2cc0181f6fe75c6053de32123d351cd2ca22e27e913a4b0fe4b8c20f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / brags-0.1.5-py3-none-manylinux2014_aarch64.whl
| Download URL | brags-0.1.5-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 4.9 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
01f893d561bb1c46c37750768f72da4e52b51b18524a3ec5b66a54f46c9c0547
|
|
BLAKE2b-256 checksum How to use checksums |
cce994f5a9f4f36c6797f0c4adecb6d4333acea806c70ddd78cf3afff693d8d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / brags-0.1.5-py3-none-macosx_11_0_arm64.whl
| Download URL | brags-0.1.5-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ed9418a12e134cebe589024400c55440daded7e497af614e9c084efdb254ef89
|
|
BLAKE2b-256 checksum How to use checksums |
7669149367cc98a2a21853119fcb8d4970ce19d518a9543b45123f9ec6a89e17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / brags-0.1.5-py3-none-macosx_10_15_x86_64.whl
| Download URL | brags-0.1.5-py3-none-macosx_10_15_x86_64.whl |
|---|---|
| Size | 5.4 MB |
| Tags | Python 3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
7ecd31c0da659a6a9d231440397acf54033d94d36101f0a60bee6058a68e0a59
|
|
BLAKE2b-256 checksum How to use checksums |
1968f27bfd5375a78c7d0dacd264e081bba15e377625ec51f48b0114fe3f0665
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|