How glboysagar1-prog/sih_final works
The repository is an on-premise industrial inspection workbench: users submit inspection documents and a task, the backend runs an agent workflow with model routing and verification tools, then returns compliance results and office deliverables. The React workbench is the primary documented interface; Streamlit is an alternate entry point. Sampled source confirms the API, model gateway, standards retrieval, reporting, and optional Temporal integration. Some agent internals are unsampled, so uncertain tool-dispatch links are omitted; the README’s Data Formulator capability is external to the sampled runtime modules.
Main entry points: server.py Workbench API · graph.py Agent Graph · activities.py Workflow Activities · llm_client.py LLM Gateway
Components 22
User Interfaces
- React Workbench
frontend/src/App.jsx - Streamlit Dashboard
ui/app.py
Inspection Workflow
- Workbench API
src/server.py - Agent Graph
src/agent/graph.py - Task Router
src/agent/router.py - Workflow State
src/agent/state.py
Analysis Tools
- Document OCR
src/tools/ocr_tool.py - Standards Retrieval
src/tools/rag_tool.py - Sandbox Verification
src/tools/sandbox_tool.py - Office Deliverables
src/tools/report_tool.py
Models And Orchestration
- LLM Gateway
src/agent/llm_client.py - Local MLX Inference
server1.py - Temporal Workflow
src/orchestration/workflows.py - Workflow Activities
src/orchestration/activities.py - Temporal Worker
src/orchestration/worker.py
Local Records
- File Utilities
src/utils/file_manager.py - Standards Corpus
data/standards - Inspection Files
data/sample_inputs - Generated Outputs
data/outputs
Other components
- Inspector
- Cloud Model APIs
- Temporal Service
Connections 24
- Inspector → React Workbench: submits task
- Inspector → Streamlit Dashboard: submits task
- React Workbench → Workbench API: posts workflow
- Streamlit Dashboard → Agent Graph: runs workflow
- Workbench API → Agent Graph: executes directly
- Workbench API → Temporal Workflow: starts optionally
- Workbench API → Standards Retrieval: searches standards
- Workbench API → File Utilities: hashes deliverables
- Workbench API → Inspection Files: reads and stores uploads
- Agent Graph → Task Router: classifies task
- Task Router → LLM Gateway: classifies fallback
- LLM Gateway → Cloud Model APIs: requests inference
- LLM Gateway → Local MLX Inference: requests local inference
- Workbench API → Local MLX Inference: serves inference
- Standards Retrieval → Standards Corpus: indexes and searches
- Agent Graph → Workflow State: updates state
- Agent Graph → Generated Outputs: produces results
- Temporal Worker → Temporal Workflow: registers workflow
- Temporal Worker → Workflow Activities: registers activities
- Workbench API → Temporal Service: connects optionally
- Temporal Workflow → Workflow Activities: dispatches activities
- Workflow Activities → Agent Graph: runs pipeline
- Workflow Activities → Office Deliverables: compiles deliverables
- Office Deliverables → Generated Outputs: writes deliverables