Skip to main content

A boilerplate for creating agentic RAG applications

Project description

Agentic RAG Boilerplate

A powerful boilerplate for creating Retrieval-Augmented Generation (RAG) applications with agentic capabilities. This template provides a solid foundation for building AI-powered applications that can retrieve and process information intelligently.

Features

  • 🚀 FastAPI-based REST API
  • 🤖 LangChain integration for RAG capabilities
  • 🔍 Efficient document processing and retrieval
  • 🔐 Environment-based configuration
  • 📦 Well-structured project layout
  • 🛠️ Easy to extend and customize

Quick Start

Installation

pip install create-agentic-rag

Create a New Project

create-agentic-rag my-project-name

This will create a new directory with your project name and set up the basic structure.

Setup Your Project

  1. Navigate to your project directory:
cd my-project-name
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure your environment:
cp .env.example .env

Edit the .env file with your configuration settings.

Running the Application

Start the FastAPI server:

uvicorn app.main:app --reload

The API will be available at http://localhost:8000

Project Structure

.
├── app/
│   ├── api/           # API routes and endpoints
│   ├── core/          # Core application logic
│   ├── models/        # Data models
│   ├── services/      # Business logic and services
│   └── main.py        # Application entry point
├── .env.example       # Example environment variables
├── requirements.txt   # Project dependencies
└── README.md         # This file

API Documentation

Once the server is running, you can access the interactive API documentation at:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Environment Variables

The following environment variables are required:

  • OPENAI_API_KEY: Your OpenAI API key
  • LANGCHAIN_API_KEY: Your LangChain API key
  • LANGCHAIN_PROJECT: Your LangChain project name
  • LANGCHAIN_TRACING_V2: Enable/disable LangChain tracing
  • LANGCHAIN_ENDPOINT: LangChain API endpoint

Contributing

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

License

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

Support

If you encounter any issues or have questions, please open an issue in the repository.

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

create_agentic_rag-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

create_agentic_rag-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file create_agentic_rag-0.1.1.tar.gz.

File metadata

  • Download URL: create_agentic_rag-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for create_agentic_rag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e149177f866733fbe0faacf1e4d3411d3955f7915aa53e96f924302b6d038afa
MD5 7d2a98b2447a58c6e638d29dabea2033
BLAKE2b-256 7ee268c040a51f60c033a1758ffb00a5ae84796768a7626f785e3b5c4819e33c

See more details on using hashes here.

File details

Details for the file create_agentic_rag-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for create_agentic_rag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2986f857f9768af1cd60e073acfaf3c6cd46144344984ee261a3a83a10c6218
MD5 9e97ed4acc1168493ba71c908372f92e
BLAKE2b-256 b411b0d8ea822c7d6d814e79acd5850878f11ce0f10891f50ea5a15987f7b363

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