Skip to main content

Lightweight, LLM-agnostic RAG pipeline with pluggable corpora. Works with Claude, OpenAI, Gemini, or any LLM.

Project description

attune-rag

Lightweight, LLM-agnostic RAG pipeline with pluggable corpora. Works with Claude, OpenAI, Gemini, or any LLM.

  • No LLM SDK at install time. All provider deps are optional extras.
  • Pluggable corpus. Use attune-help (the default), any markdown directory, or your own CorpusProtocol.
  • Returns a prompt string by default — send it to whatever LLM you like. Optional provider adapters ship convenience wrappers.

Install

pip install attune-rag                     # core only
pip install 'attune-rag[attune-help]'      # + bundled help corpus
pip install 'attune-rag[claude]'           # + Claude adapter
pip install 'attune-rag[openai]'           # + OpenAI adapter
pip install 'attune-rag[gemini]'           # + Gemini adapter
pip install 'attune-rag[all]'              # everything

Quick start — Claude

pip install 'attune-rag[attune-help,claude]'
import asyncio
from attune_rag import RagPipeline

async def main():
    pipeline = RagPipeline()  # defaults to AttuneHelpCorpus
    response, result = await pipeline.run_and_generate(
        "How do I run a security audit with attune?",
        provider="claude",
    )
    print(response)
    print("\nSources:", [h.entry.path for h in result.citation.hits])

asyncio.run(main())

Quick start — OpenAI

pip install 'attune-rag[attune-help,openai]'
response, result = await pipeline.run_and_generate(
    "...", provider="openai", model="gpt-4o",
)

Quick start — Gemini

pip install 'attune-rag[attune-help,gemini]'
response, result = await pipeline.run_and_generate(
    "...", provider="gemini", model="gemini-1.5-pro",
)

Quick start — custom corpus, any LLM

from pathlib import Path
from attune_rag import RagPipeline, DirectoryCorpus

pipeline = RagPipeline(corpus=DirectoryCorpus(Path("./my-docs")))
result = pipeline.run("How do I...?")

# Send result.augmented_prompt to whatever LLM you use.
# The pipeline itself does NOT call an LLM unless you use
# run_and_generate or call a provider adapter yourself.

Status

v0.1.0 — initial release. Part of the attune ecosystem (attune-ai, attune-help, attune-author).

License

Apache 2.0. 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

attune_rag-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

attune_rag-0.1.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file attune_rag-0.1.0.tar.gz.

File metadata

  • Download URL: attune_rag-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for attune_rag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d75d03fe06c6f6c5fca15b6297c364ab5f51777be5ff40cf8bdc643bffbad138
MD5 ca520a0c6cd56f78517ce79ca8d73b52
BLAKE2b-256 6906f1531583904edfc5a28e744028c8b1de7ff6bdabc80e0cfef0167e735dc9

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on Smart-AI-Memory/attune-rag

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

File details

Details for the file attune_rag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: attune_rag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for attune_rag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7d402c4a8f7d4fdcb9737572c7c0741908db17a162f9a013fd4ac9c64744d3f
MD5 9cc747836327efc82e39e5245d6eee7f
BLAKE2b-256 f280b2de4e7e53a4299b7f21e23a6dec189145f4a567779f4211c63cb78f139c

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on Smart-AI-Memory/attune-rag

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