How naveenalampally8/partselect-agent works
Project Type & Purpose
• This is a full-stack conversational AI prototype (React + FastAPI) implementing a Retrieval-Augmented Generation (RAG) multi-agent architecture.
• Purpose: help customers search appliance parts, check compatibility, get installation guidance, and troubleshoot via a chat interface.
File Structure Analysis
• Top-level:
• backend/
– app.py (FastAPI entry point)
– agents/ (Orchestrator, Router, ProductSearch, Compatibility, Installation, Troubleshooting)
– database/ (SQLite models & seed scripts)
– vector_store/ (ChromaDB embeddings module)
– scripts/ (data scraping & JSON)
– backup/ (Chroma backups & sample data)
• frontend/
– public/ (static HTML + manifest)
– src/ (React components, API client)
– vite.config.js, package.json
• render.yaml (deployment config)
Key Architecture Insights (from README)
• Multi-agent system with a central orchestrator and specialized sub-agents.
• Hybrid search: semantic via ChromaDB + structured via SQLite.
• External LLM calls via DeepSeek API.
• Streaming chat responses over HTTP/SSE.
Main Components
A. Frontend Layer (React App)
• ChatWindow component, streaming UI
• API client (Axios)
B. API Layer (FastAPI Backend)
• HTTP/SSE endpoint (app.py)
• Orchestrator Agent
• Router Agent
• Specialized Agents (ProductSearch, Compatibility, Installation, Troubleshooting)
C. Data Layer
• SQLite relational database (parts, models, relationships)
• ChromaDB vector store (embeddings, semantic index)
D. External Services
• DeepSeek API (LLM)
E. Deployment/Infrastructure
Relationships & Data Flows
1. User → Frontend (HTTP/SSE) → Backend API
2. Orchestrator Agent routes to Router Agent (intent classification)
3. Router Agent invokes one or more specialized agents:
– ProductSearch: queries ChromaDB → filters with SQLite
– Compatibility: SQL model-part lookups
– Installation: static steps (from JSON or code)
– Troubleshooting: symptom lookup + recommendations
4. Specialized agent → (optionally) DeepSeek API for LLM completions or clarifications
5. Agent aggregates results → back to Orchestrator → streams response to Frontend
6. Backend reads/writes to Databases as needed
Architectural Patterns & Design Principles
• Modular “agent” pattern: each agent is a self-contained service component.
• RAG: Combining semantic search (ChromaDB) with LLM retrieval.
• Layered design: Presentation (React) → API (FastAPI) → Data.
• Single process multi-modules (not separate microservices—can evolve to microservices).
• CI/CD and Infrastructure as Code hint via render.yaml.
Technologies & Frameworks to Annotate
• Frontend: React 18, Vite, Tailwind CSS, Axios
• Backend: Python 3.11, FastAPI, SQLAlchemy
• Vector Store: ChromaDB, sentence-transformers
• Database: SQLite
• LLM: DeepSeek API