Production-grade RAG in 4 lines — hybrid search, streaming, and agent tools on by default.
Project description
ragwise
The pip-installable Python RAG library built for 2026 — hybrid search, streaming, and agent tools on by default.
No Docker. No background server. No framework lock-in. Just Python.
Docs · Changelog · Contributing · Discussions
Install
pip install ragwise
Quickstart
from ragwise import RAG
async with RAG(llm="openai/gpt-4o-mini") as rag:
await rag.ingest("./docs/")
answer = await rag.query("What is the refund policy?")
print(answer.text)
print(answer.citations)
Why ragwise?
| Feature | ragwise | LangChain | LlamaIndex | RAGFlow |
|---|---|---|---|---|
| Lines to get started | 4 | 40+ | 20+ | Docker setup |
| Hybrid search on by default | ✓ | ✗ | opt-in | ✓ (Docker) |
| pip install (no server) | ✓ | ✓ | ✓ | ✗ |
| Async-first | ✓ | partial | partial | ✗ |
| Streaming responses | ✓ | partial | partial | ✗ |
| Agent tool built-in | ✓ | ✗ | ✗ | ✗ |
| Multi-tenant isolation | ✓ | ✗ | ✗ | ✗ |
| Incremental indexing | ✓ | ✗ | opt-in | ✗ |
| Built-in eval | ✓ | ✗ | partial | ✗ |
Chunking accuracy: RecursiveChunker matches FloTorch Feb 2026 benchmark winner at 69% end-to-end accuracy.
Who It's For
✓ Python developers who want production-ready RAG as a library, not a platform.
✓ Teams already on PostgreSQL — zero new infrastructure with store="postgresql://...".
✓ Anyone who values typed, async-first, minimal-dependency code.
✗ Not for you if you need a no-code UI, knowledge graphs, or agent orchestration — use RAGFlow or LangGraph instead.
Streaming
async for token in rag.stream_query("What changed in v2?"):
print(token, end="", flush=True)
Works with OpenAI, Anthropic, and Ollama. Falls back gracefully for custom LLMs.
Agent Tools
from ragwise.agent import as_claude_tool
# Give your Claude agent access to your document index
tool = as_claude_tool(rag) # Anthropic-compatible tool schema
results = await rag.search("query", top_k=5) # raw retrieval, no generation
Pass as_openai_tool(rag) for OpenAI function calling.
Multi-Tenant Isolation
# Tag documents by tenant at ingest time
await rag.ingest("./org_a_docs/", tenant_id="org_a")
await rag.ingest("./org_b_docs/", tenant_id="org_b")
# Filter by tenant at query time — no code changes to the store
answer = await rag.query("policy?", config=QueryConfig(tenant_id="org_a"))
Store Options
# Development — volatile, zero setup
RAG(store="memory")
# Development — persistent across restarts, embedded
RAG(store="lance://./ragwise-index")
# Production — PostgreSQL + pgvector, native hybrid search
RAG(store="postgresql://user:pass@localhost/mydb")
Upgrade Path
store="memory" # local dev / tests
↓
store="lance://./ragwise-index" # persistent dev, survives restarts
↓
store="postgresql://..." # production (pgvector benchmark: 471 QPS @ 50M vectors)
Configuration
from ragwise import RAG, QueryConfig
async with RAG(
embedder="openai/text-embedding-3-small",
store="lance://./my-index",
llm="openai/gpt-4o-mini",
chunk_size=512,
chunk_overlap=64,
cache=True,
) as rag:
await rag.ingest("./docs/", glob="**/*.md")
answer = await rag.query(
"What changed in v2?",
config=QueryConfig(top_k=5, include_citations=True),
)
Optional Extras
pip install ragwise[lance] # LanceDB persistent store
pip install ragwise[postgres] # PostgreSQL + pgvector
pip install ragwise[local-emb] # sentence-transformers embedder + reranker
pip install ragwise[eval] # RAGAS + Langfuse eval loop
pip install ragwise[serve] # ragwise serve HTTP API
CLI
ragwise init # generate ragwise_config.py with defaults
ragwise serve # start HTTP API on localhost:8000
ragwise serve --port 9000
Roadmap
v0.1.0 is the foundation. Follow GitHub Discussions for what's coming next — roadmap is shaped by real usage and feedback.
Community
- Questions & help → GitHub Discussions
- Bug reports → GitHub Issues
- Contributing → CONTRIBUTING.md
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ragwise-0.1.0.tar.gz.
File metadata
- Download URL: ragwise-0.1.0.tar.gz
- Upload date:
- Size: 8.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8142a0a8e2d874b1277ff62a83c0644212a9f5dcc1282a753a61741cc34a09c
|
|
| MD5 |
4c8f679832ba1ee253c2b6989f97f1a6
|
|
| BLAKE2b-256 |
c9ccb57446e0dd2402cda7af05fb7d8a68961694ddf3e5bb7b59e2a010997e74
|
Provenance
The following attestation bundles were made for ragwise-0.1.0.tar.gz:
Publisher:
release.yml on laxmikanta415/ragwise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ragwise-0.1.0.tar.gz -
Subject digest:
b8142a0a8e2d874b1277ff62a83c0644212a9f5dcc1282a753a61741cc34a09c - Sigstore transparency entry: 1328116267
- Sigstore integration time:
-
Permalink:
laxmikanta415/ragwise@339e91f9bd2a0de37f4aa1565e6fa6d9d15a7a8a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/laxmikanta415
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@339e91f9bd2a0de37f4aa1565e6fa6d9d15a7a8a -
Trigger Event:
push
-
Statement type:
File details
Details for the file ragwise-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ragwise-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5e438d8c3e63fd27dd682d5020e24be6637bfab103dd2c921df73471bdaaf0a
|
|
| MD5 |
c572e08ae8e2d8d675a9b9ae308e3c35
|
|
| BLAKE2b-256 |
fd4ff53fd7206d88a3c82118af5e9b2f0e869b1f3ab8a664b140fa1e731d0cbe
|
Provenance
The following attestation bundles were made for ragwise-0.1.0-py3-none-any.whl:
Publisher:
release.yml on laxmikanta415/ragwise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ragwise-0.1.0-py3-none-any.whl -
Subject digest:
f5e438d8c3e63fd27dd682d5020e24be6637bfab103dd2c921df73471bdaaf0a - Sigstore transparency entry: 1328116285
- Sigstore integration time:
-
Permalink:
laxmikanta415/ragwise@339e91f9bd2a0de37f4aa1565e6fa6d9d15a7a8a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/laxmikanta415
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@339e91f9bd2a0de37f4aa1565e6fa6d9d15a7a8a -
Trigger Event:
push
-
Statement type: