Skip to main content

Modular and extensible Agentic RAG framework

Project description

AgenticRAG

PyPI version License: MIT Python 3.8+

AgenticRAG is a modular framework for building customizable Retrieval-Augmented Generation systems. It provides a complete stack for ingesting, storing, retrieving, and acting on diverse data types through a unified interface.

agenticrag


Key Features

  • Modular Architecture: Easily customize any component while maintaining system compatibility
  • Multi-format Data Support: Handle text, tables, and databases through specialized stores
  • Flexible Data Ingestion: Import data from PDFs, CSVs, web pages, and external databases
  • Intelligent Retrieval: Use semantic search, SQL queries, or table operations as needed
  • Task-oriented Design: Perform question answering, chart generation, or custom operations
  • Easy Extensibility: Create custom components with minimal boilerplate

Installation

For Users

Install the stable release from PyPI:

pip install agenticrag

For Contributors

Clone the repository and install development dependencies:

git clone https://github.com/yourusername/agenticrag.git
cd agenticrag
pip install -r requirements.txt
pip install -e .

Quick Start

from agenticrag import RAGAgent

# Initialize agent with default components
agent = RAGAgent(persistent_dir="./agenticrag_data")

# Load some data
agent.load_pdf("path/to/document.pdf", name="company_handbook")
agent.load_csv("path/to/data.csv", name="sales_data")

# Ask questions using the data
response = agent.invoke("What were our top selling products last quarter?")
print(response)

Architecture Overview

AgenticRAG Architecture

The AgenticRAG system follows a modular, layered architecture where each component has specific responsibilities:

  1. Data Storage Layer: Stores maintain structured representations of various data types
  2. Data Ingestion Layer: Loaders and Connectors handle importing data into stores
  3. Data Retrieval Layer: Retrievers access relevant information based on queries
  4. Task Execution Layer: Tasks perform operations using retrieved context
  5. Orchestration Layer: RAGAgent coordinates all components to fulfill user requests

Documentation

For detailed documentation, check out:


Project Structure

├── agenticrag/                # Main package
│   ├── connectors/            # Database and API connectors
│   ├── loaders/               # Data ingestion components
│   ├── retrievers/            # Context retrieval components
│   ├── stores/                # Data storage components
│   ├── tasks/                 # Task execution components
│   ├── types/                 # Data models and type definitions
│   ├── utils/                 # Utility functions and helpers
│   └── rag_agent.py           # Main agent implementation
├── docs/                      # Documentation
├── examples/                  # Example notebooks
├── tests/                     # Unit and integration tests
├── ui/                        # Streamlit demo app
├── LICENSE                    # MIT License
├── pyproject.toml             # Package configuration
├── README.md                  # This file
└── requirements.txt           # Development dependencies

Example Use Cases

Question Answering from Documents

from agenticrag import RAGAgent

agent = RAGAgent()
agent.load_pdf("research_paper.pdf", name="research")
agent.invoke("Summarize the key findings of the research paper")

Data Analysis with Visualizations

from agenticrag import RAGAgent
from agenticrag.retrievers import TableRetriever
from agenticrag.tasks import ChartGenerationTask

agent = RAGAgent(
    retrievers=[TableRetriever()],
    tasks=[ChartGenerationTask()]
)
agent.load_csv("Iris.csv")
agent.invoke("Create a scatter plot showing petel length and width of Iris")

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

agenticrag-0.1.3.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

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

agenticrag-0.1.3-py3-none-any.whl (60.6 kB view details)

Uploaded Python 3

File details

Details for the file agenticrag-0.1.3.tar.gz.

File metadata

  • Download URL: agenticrag-0.1.3.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for agenticrag-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bc0af30464dbd38df5829546418083492bceaf9675968ccc535b881cf90f3bf3
MD5 159f29440568f67660cf2e1b7b8f0726
BLAKE2b-256 af8f0701a2b34a3941a34e8181f45be8b72e500d94d66cdf4e262dd85eabb20c

See more details on using hashes here.

File details

Details for the file agenticrag-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: agenticrag-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 60.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for agenticrag-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4bb65282e2ba49485447123c4fcfe7a84bf83dadff80ca106beb0362a8077da5
MD5 a4b8a35051b51496b169f4249c8e5b04
BLAKE2b-256 9a3bd84f87200014d24aeb8dfca5a094ef7f60bc28f417e6aea4959302cc8edf

See more details on using hashes here.

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