Skip to main content

Modular and extensible Agentic RAG library

Project description

AgenticRAG

PyPI version License: MIT Python 3.8+

AgenticRAG is a modular library 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

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.4.tar.gz (48.3 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.4-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agenticrag-0.1.4.tar.gz
  • Upload date:
  • Size: 48.3 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.4.tar.gz
Algorithm Hash digest
SHA256 4276770c0c195ff44dc3f2a7ffadbb80dc726ba243fe0b8ba86cd84722de1516
MD5 3035d4f9c5500a1f9c3132ea7dc02919
BLAKE2b-256 1d945ed176ddd6e8b28791096f8be7991e36eb76d501dccb179ef2cab0753d16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agenticrag-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 60.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5ddf1d5f12fcc52d23565fddddcb822a1e0f93dd019fb47b16a32620ba8fc41c
MD5 f3bd854d1ad9966b147224f85594e335
BLAKE2b-256 53963e22bc3034ebb7a09c8460ff6e609734a6c5bc13176cff86f5a3a52ed862

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