Velocirag
Description
# π¦ VelociRAG **Lightning-fast RAG for AI agents.** _Four-layer retrieval fusion powered by ONNX Runtime. No PyTorch. Sub-200ms warm search. Incremental graph updates. MCP-ready._ --- Most RAG solutions either drag in 2GB+ of PyTorch or limit you to single-layer vector searchβ¦
About
# π¦ VelociRAG **Lightning-fast RAG for AI agents.** _Four-layer retrieval fusion powered by ONNX Runtime. No PyTorch. Sub-200ms warm search. Incremental graph updates. MCP-ready._ --- Most RAG solutions either drag in 2GB+ of PyTorch or limit you to single-layer vector search. VelociRAG gives you four retrievalβ¦
Details
- Author
- HaseebKhalid1507
- Downloads
- 293
- Categories
- Other, Knowledge Base, AI, Search
Jump to
- ONNX Runtime, no PyTorch, no GPU required
- Four-layer fusion: vector, keyword, knowledge graph, metadata
- Cross-encoder reranking via TinyBERT (included)
- Incremental graph updates with file-centric provenance
- MCP server with five tools: search, index, add_document, health, list_sources
- Search daemon keeps model warm over Unix socket
- CPU-only, <8GB RAM, no API keys or external services
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
VelociragCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install with pip install "velocirag[mcp]", index documents with velocirag index ./my-docs, then start the MCP server with velocirag mcp. Configure the MCP server in Claude, Cursor, or Windsurf using the provided JSON snippets. Alternatively, use the Python API (Embedder, VectorStore, Searcher) or the search daemon (velocirag serve) for warm queries.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"velocirag": {
"velocirag": {
"command": "velocirag",
"args": [
"mcp"
],
"env": {
"VELOCIRAG_DB": "/path/to/your/docs"
}
}
}
}
}
McpServers
{
"velocirag": {
"command": "velocirag",
"args": [
"mcp"
],
"env": {
"VELOCIRAG_DB": "/path/to/your/docs"
}
}
}
π¦ VelociRAG
Lightning-fast RAG for AI agents.
_Four-layer retrieval fusion powered by ONNX Runtime. No PyTorch. Sub-200ms warm search. Incremental graph updates. MCP-ready._
---
Most RAG solutions either drag in 2GB+ of PyTorch or limit you to single-layer vector search. VelociRAG gives you four retrieval methods β vector similarity, BM25 keyword matching, knowledge graph traversal, and metadata filtering β fused through reciprocal rank fusion with cross-encoder reranking. All running on ONNX Runtime, no GPU, no API keys. Comes with an MCP server for agent integration, a Unix socket daemon for warm queries, and a CLI that just works.
π Quick Start
MCP Server (Claude, Cursor, Windsurf)
pip install "velocirag[mcp]"
velocirag index ./my-docs
velocirag mcp
Claude Code β add to .mcp.json in your project root:
{
"mcpServers": {
"velocirag": {
"command": "velocirag",
"args": ["mcp"],
"env": { "VELOCIRAG_DB": "/path/to/data" }
}
}
}
Then open
/mcp in Claude Code and enable the velocirag server. If using a virtualenv, use the full path to the binary (e.g. .venv/bin/velocirag).
Claude Desktop β add to claude_desktop_config.json:
{
"mcpServers": {
"velocirag": {
"command": "velocirag",
"args": ["mcp", "--db", "/path/to/data"]
}
}
}
Cursor β add to .cursor/mcp.json:
{
"mcpServers": {
"velocirag": {
"command": "velocirag",
"args": ["mcp", "--db", "/path/to/data"]
}
}
}
Python API
from velocirag import Embedder, VectorStore, Searcher
embedder = Embedder()
store = VectorStore('./my-db', embedder)
store.add_directory('./my-docs')
searcher = Searcher(store, embedder)
results = searcher.search('query', limit=5)
CLI
pip install velocirag
velocirag index ./my-docs
velocirag search "your query here"
Search Daemon (warm engine for CLI users)
velocirag serve --db ./my-data # start daemon (background)
velocirag search "query" # auto-routes through daemon
velocirag status # check daemon health
velocirag stop # stop daemon
The daemon keeps the ONNX model + FAISS index warm over a Unix socket. First query loads the engine (~1s), subsequent queries return in ~180ms with full 4-layer fusion.
π― Why VelociRAG?
| | VelociRAG | LangChain | LlamaIndex | Chroma | mcp-local-rag |
|---|:---:|:---:|:---:|:---:|:---:|
| Search layers | 4 | 2 | 2 | 1 | 2 |
| Cross-encoder reranking | β
| β | β
| β | β |
| Knowledge graph | β
| β | β
| β | β |
| Incremental updates | β
| β | β | β | β |
| LLM required for search | β | β οΈ | β οΈ | β | β |
| MCP server | β
| β | β | β | β
|
| GPU required | β | β | β | β | β |
| PyTorch required | β | β
| β
| β | β |
| Install size | ~80MB | ~750MB+ | ~750MB+ | ~50MB | ~30MB |
| Warm search latency | ~3ms | β | β | ~50ms | ~200ms |
ποΈ How It Works
The 4-layer pipeline:
Query β expand (acronyms, variants)
β [Vector] FAISS cosine similarity (384d, MiniLM-L6-v2 via ONNX)
β [Keyword] BM25 via SQLite FTS5
β [Graph] Knowledge graph traversal
β [Metadata] Structured SQL filters (tags, status, project)
β RRF Fusion β Cross-encoder rerank β Results
What each layer catches:
| Query type | Vector | Keyword | Graph | Metadata |
|-----------|:---:|:---:|:---:|:---:|
| Conceptual ("improve error handling") | β
| β | β | β |
| Exact match ("ERR_CONNECTION_REFUSED") | β | β
| β | β |
| Connected concepts | β | β | β
| β |
| Filtered ("#python status:active") | β | β | β | β
|
| Combined ("React state management") | β
| β
| β
| β
|
β¨ Features
- ONNX Runtime β 184ms cold start, 3ms cached. No PyTorch, no GPU
- Four-layer fusion β FAISS vector similarity + SQLite FTS5 (BM25) + knowledge graph + metadata filtering, merged via reciprocal rank fusion
- Cross-encoder reranking β TinyBERT reranker via ONNX Runtime β included in base install, no PyTorch needed. Downloads ~17MB model on first use
- Incremental graph updates β file-centric provenance tracking detects what changed and only rebuilds affected nodes/edges. Cascading deletes maintain consistency across all stores (vector, graph, metadata). Multi-source support with isolated provenance per source
- MCP server β Five tools (search, index, add_document, health, list_sources) for Claude, Cursor, Windsurf
- Search daemon β Unix socket server keeps ONNX model + FAISS index warm between queries
- Knowledge graph β Analyzers build entity, temporal, topic, and explicit-link edges from markdown. Optional GLiNER NER. 418 files in 2.1s
- Smart chunking β Header-aware splitting preserves document structure and parent context
- Query expansion β Acronym registry, casing/spacing variants, underscore-aware tokenization
- Runs anywhere β CPU-only, 8GB RAM, no API keys, no external services
π€ MCP Server
VelociRAG exposes a Model Context Protocol server for seamless agent integration:
Available tools:
- search β 4-layer fusion search with reranking
- index β Add documents to the knowledge base
- add_document β Insert single document
- health β System diagnostics
- list_sources β Show indexed document sources
The MCP server process stays alive between queries, so models load once and every subsequent search is warm. Works with any MCP-compatible client.
π Python API
Full 4-layer unified search:
```python
from velocirag import (
Embedder, VectorStore, Searcher,
GraphStore, MetadataStore, UnifiedSearch,
GraphPipeline
)
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





