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.
- 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
- 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
- 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
- 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
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
- Python 3.13+
- Node.js 18+
- Ollama (for local embedding models)
-
Environment Configuration
cd backend cp .env.example .env -
Install Dependencies
pip install uv uv sync --frozen source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
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
-
Start Server
python app/run_server.py
-
Install Dependencies
cd frontend pnpm install -
Launch Application
pnpm dev
-
Access Interface Open http://localhost:3000 in your browser
For local document processing, deploy the BGE-M3 embedding model:
ollama pull bge-m3- Purpose: Office automation and employee information management
- Features: Employee database queries, handbook document retrieval
- Implementation:
backend/app/ai/agent/oa_assistant.py
- 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
- Define agent logic in
backend/app/ai/agent/ - Implement LangGraph workflow for agent behavior
- Register agent in the frontend interface
- Test agent interactions through the chat interface
- Add documents to
backend/resource/directory - Update ChromaDB indexing scripts
- Configure document processing parameters
- Test retrieval accuracy through queries
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)
- Fork the repository
- Create a feature branch
- Implement your changes
- Add tests and documentation
- Submit a pull request
This project is licensed under the MIT License. See LICENSE file for details.

