# Islamic Scholar Agent A production-ready Islamic knowledge agent built with Agno framework, featuring RAG (Retrieval-Augmented Generation) capabilities for answering questions based on Islamic texts and knowledge. ## Project Structure ``` ├── src/ # Production source code │ ├── agents/ # Agent implementations │ ├── knowledge/ # Knowledge base & RAG pipeline │ ├── models/ # LLM integrations │ ├── api/ # FastAPI routes │ ├── core/ # Core configurations │ └── utils/ # Utility functions ├── data/ # Data files │ ├── raw/ # Original data files │ ├── processed/ # Processed/cleaned data │ └── embeddings/ # Pre-computed embeddings ├── scripts/ # Utility scripts ├── tests/ # Test files ├── config/ # Configuration files ├── docker/ # Docker files └── docs/ # Documentation ``` ## Features - **Islamic Knowledge Focus**: Specialized agent for Islamic knowledge queries - **RAG Pipeline**: Retrieval-augmented generation using vector databases - **Multiple Vector Stores**: Support for Qdrant and PostgreSQL with PgVector - **Modular Architecture**: Clean separation of concerns - **Production Ready**: Docker support, health checks, logging - **Comprehensive Testing**: Unit and integration tests ## Quick Start 1. **Setup Environment**: ```bash cp .env.example .env # Edit .env with your API keys ``` 2. **Install Dependencies**: ```bash pip install -r requirements.txt ``` 3. **Setup Vector Database**: ```bash python scripts/setup_vectordb.py ``` 4. **Ingest Knowledge Data**: ```bash python scripts/ingest_excel.py ``` 5. **Run Application**: ```bash python src/main.py ``` ## Development ### Running Tests ```bash pytest tests/ ``` ### Qdrant Connection Test Test Qdrant vector database connectivity: ```bash python test_qdrant_connection.py ``` For detailed documentation see: [Qdrant Connection Test Guide](docs/QDRANT_CONNECTION_TEST.md) ### Health Check ```bash python scripts/health_check.py ``` ### Docker Development ```bash cd docker docker-compose -f docker-compose.dev.yml up ``` ## API Usage ### Health Check ```bash curl http://localhost:8081/health ``` ### Chat Endpoint ```bash curl -X POST "http://localhost:8081/chat" \ -H "Content-Type: application/json" \ -d '{"message": "What is the importance of Islamic knowledge?"}' ``` ## Configuration - **Development**: `config/development.env` - **Production**: `config/production.env` - **Models**: `config/models.yaml` ## Documentation - [Production Readiness Report](PRODUCTION_READINESS_REPORT.md) - [API Documentation](docs/API.md) - [Deployment Guide](docs/DEPLOYMENT.md) ## License This project is licensed under the MIT License.