Skip to main content

Agentic RAG

A configurable, stateful RAG workflow built with LangGraph for retrieval, answer validation, and iterative refinement.

Workflow

flowchart TD
    START([__start__]) --> retrieve[retrieve]
    retrieve --> relevance{is_relevant}

    relevance -.->|no_answer_found| END([__end__])
    relevance -.->|generate| generate[generate]

    generate --> support{is_supported}

    support -.->|no_answer_found| END
    support -.->|usefulness| usefulness{is_useful}
    support -.->|revise| revise[revise_answer]

    revise --> support

    usefulness -.->|accepted| END
    usefulness -.->|rewrite| rewrite[rewrite_query]

    rewrite --> retrieve

    style START fill:#ffffff,stroke:#8b5cf6,color:#333333
    style retrieve fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style relevance fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style generate fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style support fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style usefulness fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style revise fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style rewrite fill:#f5f0ff,stroke:#8b5cf6,color:#333333
    style END fill:#c4b5fd,stroke:#8b5cf6,color:#333333

Installation

pip install agentic-rag

Usage

from agentic_rag import AgenticRAGConfig, build_graph

Create a compatible LangChain chat model and provide a retrieval callable, then build the workflow:

config = AgenticRAGConfig(max_attempts=2)

graph = build_graph(
    llm=llm,
    rag_search=rag_search,
    config=config,
)

Invoke the compiled graph with the initial state required by the workflow.

License

This project is licensed under the MIT License. See LICENSE for details.

Metadata

Release files for agentic-rag-kit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentic-rag-kit 0.1.0
File Size Uploaded Provenance Actions
agentic_rag_kit-0.1.0.tar.gz 6.2 kB With provenance Details for agentic_rag_kit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentic-rag-kit 0.1.0
File Interpreter ABI Platform Actions
agentic_rag_kit-0.1.0-py3-none-any.whl Python 3 none any Details for agentic_rag_kit-0.1.0-py3-none-any.whl

Total release size: 17.6 kB

Release files / agentic_rag_kit-0.1.0.tar.gz

Download URL agentic_rag_kit-0.1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
61781d9d9941dd25dbd2d6ac92a4cc5c26ef2f3c804c3be4a9b908b070e3149e
BLAKE2b-256 checksum
How to use checksums
866f70103984143cc5e8316b496b2929fa938a684ee0e391ba90d3cbb0247971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / agentic_rag_kit-0.1.0-py3-none-any.whl

Download URL agentic_rag_kit-0.1.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
604bf0bd4a2d27f5d8ca513b6cc119f3e0e7e1ee915de6ef2685bfeedc796c05
BLAKE2b-256 checksum
How to use checksums
49055c7691afd51f33ce685e36ce221e40625e9b117f563cb24836ceca5a0175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for agentic-rag-kit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentic_rag_kit-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page