Skip to content

shubham230523/RAGentrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAGentrix

Overview

RAGentrix is an intelligent conversational platform that combines the power of Retrieval-Augmented Generation (RAG) with multi-agent architecture. Built on a modern tech stack including LangGraph, FastAPI, Next.js, and ChromaDB, it provides a robust foundation for developing sophisticated AI-powered chat applications.

Chat Interface

Multi-Agent System

Architecture Highlights

  • Multi-Agent Framework: Leverages LangGraph for complex agent orchestration and workflow management
  • Knowledge Integration: ChromaDB-powered vector storage for efficient document retrieval and semantic search
  • Real-time Communication: Server-Sent Events (SSE) for seamless streaming responses
  • Scalable Backend: FastAPI with full asynchronous support for high-performance operations
  • Modern Frontend: Next.js-based interface with responsive design and intuitive UX

Core Capabilities

Intelligent Agents

  • Custom Agent Development: Create specialized agents with unique behavioral patterns
  • Tool Integration: Equip agents with external tools and APIs for extended functionality
  • Collaborative Workflows: Enable multiple agents to work together on complex tasks

Knowledge Management

  • Document Processing: Automatic ingestion and indexing of various document formats
  • Semantic Search: Advanced vector similarity matching for precise information retrieval
  • Context-Aware Responses: Generate answers based on retrieved knowledge and conversation history

User Experience

  • Streaming Chat: Real-time message delivery with typing indicators
  • Session Persistence: Browser-based chat history for continuity across sessions
  • Multi-Language Support: Built-in capabilities for English and Chinese interactions

Project Structure

RAGentrix/
backend/                 # Python backend services
  app/
    api/                # REST API endpoints
    ai/                 # AI agent implementations
    core/               # Core application logic
    db/                 # Database models and configurations
  resource/             # Static resources and data
frontend/               # Next.js frontend application
  app/
    chat/               # Chat interface components
    components/         # Reusable UI components

Getting Started

Prerequisites

  • Python 3.13+
  • Node.js 18+
  • Ollama (for local embedding models)

Backend Setup

  1. Environment Configuration

    cd backend
    cp .env.example .env
  2. Install Dependencies

    pip install uv
    uv sync --frozen
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Configure Environment Variables

    # Database
    DATABASE_URL=sqlite+aiosqlite:///resource/database.db
    
    # Application
    APP_NAME=RAGentrix
    DEBUG=True
    
    # AI Models
    OPENAI_API_KEY=your_openai_key
    DEFAULT_MODEL=gpt-4o-mini
    
    # Embeddings (requires Ollama)
    EMBEDDING_MODEL=bge-m3
    CHROMA_PATH=resource/chroma_db
  4. Start Server

    python app/run_server.py

Frontend Setup

  1. Install Dependencies

    cd frontend
    pnpm install
  2. Launch Application

    pnpm dev
  3. Access Interface Open http://localhost:3000 in your browser

RAG Configuration

For local document processing, deploy the BGE-M3 embedding model:

ollama pull bge-m3

Built-in Agents

OA Assistant

  • Purpose: Office automation and employee information management
  • Features: Employee database queries, handbook document retrieval
  • Implementation: backend/app/ai/agent/oa_assistant.py

Multi-Agent System

  • Math Agent: Specialized in mathematical computations and analysis
  • Code Agent: Handles code generation, debugging, and optimization
  • General Agent: Manages general-purpose conversations and tasks
  • Supervisor: Coordinates agent interactions and task distribution
  • Implementation: backend/app/ai/agent/multi_agent.py

Development Guide

Creating Custom Agents

  1. Define agent logic in backend/app/ai/agent/
  2. Implement LangGraph workflow for agent behavior
  3. Register agent in the frontend interface
  4. Test agent interactions through the chat interface

Extending Knowledge Base

  1. Add documents to backend/resource/ directory
  2. Update ChromaDB indexing scripts
  3. Configure document processing parameters
  4. Test retrieval accuracy through queries

Technology Stack

Backend:

  • FastAPI (web framework)
  • LangGraph (agent orchestration)
  • ChromaDB (vector database)
  • SQLModel (database ORM)
  • Pydantic (data validation)

Frontend:

  • Next.js (React framework)
  • Ant Design (UI components)
  • TypeScript (type safety)
  • Tailwind CSS (styling)

AI/ML:

  • OpenAI/DeepSeek/DashScope (LLM providers)
  • BGE-M3 (embeddings)
  • LangChain (AI framework)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Implement your changes
  4. Add tests and documentation
  5. Submit a pull request

License

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

About

RAGentrix is an intelligent conversational platform that combines the power of Retrieval-Augmented Generation (RAG) with multi-agent architecture. Built on a modern tech stack including LangGraph, FastAPI, Next.js, and ChromaDB, it provides a robust foundation for developing sophisticated AI-powered chat applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors