How rithik-31-c/doxa---business-intelligence-agents works
DOXA is a CSV-based business intelligence investigation app: users upload a dataset, ask a natural-language question, and receive deterministic evidence plus an AI-written explanation. The documented main path profiles and semantically interprets uploaded data, plans and validates an analysis, executes it, then explains the evidence. The dashboard presents dataset details and results. A separate shop-agent/tool capability is represented from source-index references; its entry point is not established by the excerpts. Some frontend-to-backend wiring is likewise not shown.
Main entry points: shopAgent.js Shop Agent · uploadController.js Upload Controller · shopAnalysisService.js Investigation Service · schemaUnderstanding.js Schema Understanding
Components 23
User Interface
- Landing Page
client/src/pages/DoxaLanding.jsx - Investigation Dashboard
client/src/pages/Dashboard.jsx - API Client
client/src/services/api.js
Dataset Understanding
- Upload Controller
server/controllers/uploadController.js - CSV Parser
server/utils/csvParser.js - Dataset Profiler
server/agents/datasetProfiler.js - Schema Understanding
server/agents/schemaUnderstanding.js - Embedding Client
server/ai/embeddingClient.js - Vector Utilities
server/utils/vectorUtils.js - Current Dataset
server/services/datasetService.js
Investigation Runtime
- Shop Routes
server/routes/shopRoutes.js - Analysis Controller
server/controllers/shopController.js - Investigation Service
server/services/shopAnalysisService.js - Query Planner
server/agents/queryPlanner.js - Analysis Engine
server/analysis/analysisEngine.js - Llama Client
server/ai/llamaClient.js
Shop Agent Tools
- Shop Agent
server/agents/shopAgent.js - Tool Selector
server/agents/toolSelector.js - Sales Tool
server/tools/salesTool.js - Inventory Tool
server/tools/inventoryTool.js - Trend Tool
server/tools/trendTool.js - Calculator Tool
server/tools/calculatorTool.js
Other components
- Business User
Connections 27
- Business User → Landing Page: starts investigation
- Business User → Investigation Dashboard: asks questions
- Investigation Dashboard → API Client: requests data
client/src/pages/Dashboard.jsx - Shop Routes → Upload Controller: routes uploads
server/routes/shopRoutes.js - Shop Routes → Analysis Controller: routes analysis
server/routes/shopRoutes.js - Upload Controller → CSV Parser: reads CSV
server/controllers/uploadController.js - Upload Controller → Dataset Profiler: profiles rows
server/controllers/uploadController.js - Upload Controller → Schema Understanding: interprets columns
server/controllers/uploadController.js - Schema Understanding → Embedding Client: creates embeddings
server/agents/schemaUnderstanding.js - Schema Understanding → Vector Utilities: uses similarity
server/agents/schemaUnderstanding.js - Upload Controller → Current Dataset: stores dataset
server/controllers/uploadController.js - Analysis Controller → Investigation Service: analyzes request
server/controllers/shopController.js - Investigation Service → Current Dataset: reads current data
server/services/shopAnalysisService.js - Investigation Service → Query Planner: plans question
server/services/shopAnalysisService.js - Query Planner → Llama Client: requests plan
server/agents/queryPlanner.js - Investigation Service → Analysis Engine: executes plan
server/services/shopAnalysisService.js - Investigation Service → Llama Client: requests explanation
server/services/shopAnalysisService.js - Shop Agent → CSV Parser: reads CSV
server/agents/shopAgent.js - Shop Agent → Tool Selector: selects tools
server/agents/shopAgent.js - Tool Selector → Embedding Client: creates embeddings
server/agents/toolSelector.js - Tool Selector → Vector Utilities: uses similarity
server/agents/toolSelector.js - Shop Agent → Sales Tool: uses tool
server/agents/shopAgent.js - Shop Agent → Inventory Tool: uses tool
server/agents/shopAgent.js - Shop Agent → Trend Tool: uses tool
server/agents/shopAgent.js - Shop Agent → Calculator Tool: uses tool
server/agents/shopAgent.js - Shop Agent → Llama Client: requests explanation
server/agents/shopAgent.js - Shop Agent → Current Dataset: reads dataset
server/agents/shopAgent.js