Skip to main content

Production-grade RAG in 4 lines — hybrid search, streaming, and agent tools on by default.

Project description

ragwise

CI PyPI Downloads Python 3.11+ License: MIT Docs Code style: ruff

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

ragwise demo

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)

Hybrid search — BM25 + dense retrieval fused with RRF, answer with 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.

Streaming — tokens arrive as they're generated, zero waiting

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.

Agent tools — ready-made Claude and OpenAI tool schemas, raw search results

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"))

Multi-tenant isolation — full doc isolation with no store schema changes

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")

Store upgrade path — same API, one string change

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

License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ragwise-0.1.0.tar.gz (8.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ragwise-0.1.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

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

Hashes for ragwise-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8142a0a8e2d874b1277ff62a83c0644212a9f5dcc1282a753a61741cc34a09c
MD5 4c8f679832ba1ee253c2b6989f97f1a6
BLAKE2b-256 c9ccb57446e0dd2402cda7af05fb7d8a68961694ddf3e5bb7b59e2a010997e74

See more details on using hashes here.

Provenance

The following attestation bundles were made for ragwise-0.1.0.tar.gz:

Publisher: release.yml on laxmikanta415/ragwise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ragwise-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5e438d8c3e63fd27dd682d5020e24be6637bfab103dd2c921df73471bdaaf0a
MD5 c572e08ae8e2d8d675a9b9ae308e3c35
BLAKE2b-256 fd4ff53fd7206d88a3c82118af5e9b2f0e869b1f3ab8a664b140fa1e731d0cbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for ragwise-0.1.0-py3-none-any.whl:

Publisher: release.yml on laxmikanta415/ragwise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page