@@ -99,12 +99,12 @@ graph TB
9999 end
100100
101101 subgraph CHAT_SVC["Chat Enhancement Services - Production Ready"]
102- PARAM_VALIDATOR["Parameter Validation Service<br/>MCP Tool Parameter Validation<br/>Implemented"]
103- RESPONSE_FORMATTER["Response Formatting Engine<br/>Clean User-Friendly Responses<br/>Implemented"]
104- CONVERSATION_MEMORY["Conversation Memory Service<br/>Persistent Context Management<br/>Implemented"]
105- EVIDENCE_COLLECTOR["Evidence Collection Service<br/>Context Source Attribution<br/>Implemented"]
106- QUICK_ACTIONS["Smart Quick Actions Service<br/>Contextual Action Suggestions<br/>Implemented"]
107- RESPONSE_VALIDATOR["Response Validation Service<br/>Quality Assurance Enhancement<br/>Implemented"]
102+ PARAM_VALIDATOR["Parameter Validation Service<br/>MCPParameterValidator<br/> MCP Tool Parameter Validation<br/>Implemented"]
103+ RESPONSE_FORMATTER["Response Formatting Engine<br/>ResponseEnhancer<br/> Clean User-Friendly Responses<br/>Implemented"]
104+ CONVERSATION_MEMORY["Conversation Memory Service<br/>ConversationMemoryService<br/> Persistent Context Management<br/>Implemented"]
105+ EVIDENCE_COLLECTOR["Evidence Collection Service<br/>EvidenceCollector<br/> Context Source Attribution<br/>Implemented"]
106+ QUICK_ACTIONS["Smart Quick Actions Service<br/>SmartQuickActions<br/> Contextual Action Suggestions<br/>Implemented"]
107+ RESPONSE_VALIDATOR["Response Validation Service<br/>ResponseValidator<br/> Quality Assurance Enhancement<br/>Implemented"]
108108 MCP_TESTING["Enhanced MCP Testing Dashboard<br/>Advanced Testing Interface<br/>Implemented"]
109109 end
110110
@@ -439,18 +439,18 @@ sequenceDiagram
439439
440440| Component | Status | Technology | Port | Description |
441441| -----------| --------| ------------| ------| -------------|
442- | ** React Web App** | Complete | React 18 , Material-UI, CRACO | 3001 | Real-time chat, dashboard, authentication (binds to 0.0.0.0:3001) |
442+ | ** React Web App** | Complete | React 19.2.3 , Material-UI, CRACO | 3001 | Real-time chat, dashboard, authentication (binds to 0.0.0.0:3001) |
443443| ** FastAPI Gateway** | Complete | FastAPI, Pydantic v2 | 8001 | REST API with OpenAPI/Swagger |
444444| ** JWT Authentication** | Complete | PyJWT, bcrypt | - | 5 user roles, RBAC permissions |
445445| ** NeMo Guardrails** | Complete | NeMo Guardrails | - | Content safety, compliance checks |
446446| ** MCP Integration** | Complete | MCP Protocol | - | Tool discovery, execution, monitoring |
447447| ** MCP Server** | Complete | Python, async | - | Tool registration, discovery, execution |
448448| ** MCP Client** | Complete | Python, async | - | Multi-server communication |
449449| ** Planner Agent** | Complete | LangGraph + MCP | - | Intent classification, routing |
450- | ** Equipment & Asset Operations Agent** | Complete | Python, async + MCP | - | MCP-enabled equipment management |
451- | ** Operations Agent** | Complete | Python, async + MCP | - | MCP-enabled operations management |
452- | ** Safety Agent** | Complete | Python, async + MCP | - | MCP-enabled safety management |
453- | ** Forecasting Agent** | Complete | Python, async + MCP | - | Demand forecasting, reorder recommendations |
450+ | ** Equipment & Asset Operations Agent** | Complete | Python, async + MCP | - | MCP-enabled equipment management (MCP version is primary; non-MCP version also exists) |
451+ | ** Operations Agent** | Complete | Python, async + MCP | - | MCP-enabled operations management (MCP version is primary; non-MCP version also exists) |
452+ | ** Safety Agent** | Complete | Python, async + MCP | - | MCP-enabled safety management (MCP version is primary; non-MCP version also exists) |
453+ | ** Forecasting Agent** | Complete | Python, async + MCP | - | Demand forecasting, reorder recommendations (MCP version is primary) |
454454| ** Document Extraction Agent** | Complete | Python, async + NVIDIA NeMo | - | 6-stage document processing pipeline |
455455| ** Memory Manager** | Complete | PostgreSQL, Redis | - | Session context, conversation history |
456456| ** NVIDIA NIMs** | Complete | Llama 3.3 Nemotron Super 49B, llama-3_2-nv-embedqa-1b-v2 | - | AI-powered responses |
@@ -506,7 +506,7 @@ sequenceDiagram
506506
507507| Component | Status | Technology | Port | Purpose |
508508| -----------| --------| ------------| ------| ---------|
509- | ** PostgreSQL/TimescaleDB** | Running | Port 5435 | Structured data, time-series |
509+ | ** PostgreSQL/TimescaleDB** | Running | Port 5435 | Structured data, time-series (PostgreSQL 14-16 varies by deployment) |
510510| ** Milvus** | Running | Port 19530 | Vector database, semantic search |
511511| ** Redis** | Running | Port 6379 | Cache, sessions, pub/sub |
512512| ** Apache Kafka** | Running | Port 9092 | Event streaming, data pipeline |
@@ -653,6 +653,91 @@ The Document Extraction Agent implements a comprehensive **6-stage pipeline** us
653653- ** Purpose** : Quality-based routing and result optimization
654654- ** Capabilities** : Result routing, quality optimization, final output generation
655655
656+ ## Deployment-Specific Configurations
657+
658+ The system supports multiple deployment configurations with different component versions:
659+
660+ ### PostgreSQL/TimescaleDB Versions by Deployment
661+
662+ | Deployment File | PostgreSQL Version | TimescaleDB Version | Use Case |
663+ | ----------------| -------------------| ---------------------| ----------|
664+ | ` docker-compose.versioned.yaml ` | PostgreSQL 14 | Latest TimescaleDB | Versioned/production deployments |
665+ | ` docker-compose.ci.yaml ` | PostgreSQL 14 | Latest TimescaleDB | CI/CD pipeline testing |
666+ | ` docker-compose.gpu.yaml ` | PostgreSQL 15 | Latest TimescaleDB | GPU-accelerated deployments |
667+ | ` docker-compose.rapids.yml ` | PostgreSQL 15 | Latest TimescaleDB | RAPIDS forecasting deployments |
668+ | ` docker-compose.dev.yaml ` | PostgreSQL 16 | TimescaleDB 2.15.2 | Development environment |
669+
670+ ** Note** : All deployments use TimescaleDB for time-series data capabilities. The PostgreSQL version varies based on deployment requirements and compatibility needs.
671+
672+ ### Component Implementation References
673+
674+ Key implementation files for major components:
675+
676+ - ** MCP Services** : ` src/api/services/mcp/ `
677+ - Server: ` src/api/services/mcp/server.py `
678+ - Client: ` src/api/services/mcp/client.py `
679+ - Tool Discovery: ` src/api/services/mcp/tool_discovery.py `
680+ - Tool Binding: ` src/api/services/mcp/tool_binding.py `
681+ - Tool Routing: ` src/api/services/mcp/tool_routing.py `
682+ - Tool Validation: ` src/api/services/mcp/tool_validation.py `
683+ - Service Discovery: ` src/api/services/mcp/service_discovery.py `
684+ - Monitoring: ` src/api/services/mcp/monitoring.py `
685+ - Rollback: ` src/api/services/mcp/rollback.py `
686+
687+ - ** Agents** : ` src/api/agents/ `
688+ - Equipment: ` src/api/agents/inventory/equipment_agent.py ` (non-MCP), ` src/api/agents/inventory/mcp_equipment_agent.py ` (MCP)
689+ - Operations: ` src/api/agents/operations/operations_agent.py ` (non-MCP), ` src/api/agents/operations/mcp_operations_agent.py ` (MCP)
690+ - Safety: ` src/api/agents/safety/safety_agent.py `
691+ - Forecasting: ` src/api/agents/forecasting/forecasting_agent.py `
692+ - Document: ` src/api/agents/document/document_extraction_agent.py `
693+
694+ - ** Chat Enhancement Services** : ` src/api/services/ `
695+ - Parameter Validation: ` src/api/services/mcp/parameter_validator.py ` (` MCPParameterValidator ` )
696+ - Response Formatting: ` src/api/services/validation/response_enhancer.py ` (` ResponseEnhancer ` )
697+ - Conversation Memory: ` src/api/services/memory/conversation_memory.py ` (` ConversationMemoryService ` )
698+ - Evidence Collection: ` src/api/services/evidence/evidence_collector.py ` (` EvidenceCollector ` )
699+ - Quick Actions: ` src/api/services/quick_actions/smart_quick_actions.py ` (` SmartQuickActions ` )
700+ - Response Validation: ` src/api/services/validation/response_validator.py ` (` ResponseValidator ` )
701+
702+ - ** Planner Graphs** : ` src/api/graphs/ `
703+ - MCP Integrated Planner: ` src/api/graphs/mcp_integrated_planner_graph.py `
704+ - MCP Planner: ` src/api/graphs/mcp_planner_graph.py `
705+ - Standard Planner: ` src/api/graphs/planner_graph.py `
706+
707+ - ** API Routers** : ` src/api/routers/ `
708+ - All endpoints: ` src/api/routers/*.py `
709+ - Main app: ` src/api/app.py `
710+
711+ - ** Retrieval Services** : ` src/retrieval/ `
712+ - Hybrid Retriever: ` src/retrieval/hybrid_retriever.py `
713+ - GPU Hybrid Retriever: ` src/retrieval/gpu_hybrid_retriever.py `
714+ - Structured Retriever: ` src/retrieval/structured/ `
715+ - Vector Retriever: ` src/retrieval/vector/ `
716+
717+ - ** MCP Adapters** : ` src/api/services/mcp/adapters/ `
718+ - ERP: ` src/api/services/mcp/adapters/erp_adapter.py `
719+ - WMS: ` src/api/services/mcp/adapters/wms_adapter.py `
720+ - IoT: ` src/api/services/mcp/adapters/iot_adapter.py `
721+ - RFID/Barcode: ` src/api/services/mcp/adapters/rfid_barcode_adapter.py `
722+ - Time Attendance: ` src/api/services/mcp/adapters/time_attendance_adapter.py `
723+ - Forecasting: ` src/api/services/mcp/adapters/forecasting_adapter.py `
724+
725+ ## Version History
726+
727+ ### 2025-01-XX - Architecture Documentation Update
728+ - ** React** : Updated from 18.2+ to 19.2.3 (security patches and latest stable)
729+ - ** FastAPI** : Updated from 0.119+ to >=0.120.0 (latest stable with security fixes)
730+ - ** aiohttp** : Updated from 3.13.2 to >=3.13.3 (security: zip bomb DoS vulnerability fix)
731+ - ** PostgreSQL** : Clarified version range (14-16) varies by deployment configuration
732+ - ** LangGraph** : Updated to >=1.0.5 (security: CVE-2025 -8709 fix)
733+ - ** LangGraph Checkpoint** : Added >=3.0.0 (security: CVE-2025 -64439 RCE fix)
734+ - ** LangChain Core** : Added >=1.2.6 (security: CVE-2025 -68664 fix)
735+ - ** Documentation** : Added implementation file references and deployment-specific configuration notes
736+ - ** Documentation** : Added service class names to diagram labels for clarity
737+
738+ ### Previous Versions
739+ - Initial architecture documentation with React 18, FastAPI 0.119+, and PostgreSQL 15+
740+
656741## System Capabilities
657742
658743### Fully Operational Features
@@ -682,17 +767,21 @@ The Document Extraction Agent implements a comprehensive **6-stage pipeline** us
682767
683768| Layer | Technology | Version | Status | Purpose |
684769| -------| ------------| ---------| --------| ---------|
685- | ** Frontend** | React | 18.2+ | Complete | Web UI with Material-UI |
770+ | ** Frontend** | React | 19.2.3 | Complete | Web UI with Material-UI |
686771| ** Frontend** | Node.js | 20.0+ (18.17+ min) | Complete | Runtime environment (LTS recommended) |
687772| ** Frontend** | CRACO | 7.1+ | Complete | Webpack configuration override |
688773| ** Frontend** | React Native | - | Pending | Mobile app for field operations |
689- | ** API Gateway** | FastAPI | 0.119+ | Complete | REST API with OpenAPI/Swagger |
690- | ** API Gateway** | Pydantic | v2.7+ | Complete | Data validation & serialization |
691- | ** Orchestration** | LangGraph | Latest | Complete | Multi-agent coordination |
774+ | ** API Gateway** | FastAPI | >=0.120.0 | Complete | REST API with OpenAPI/Swagger |
775+ | ** API Gateway** | Pydantic | >=2.0.0 | Complete | Data validation & serialization |
776+ | ** Orchestration** | LangGraph | >=1.0.5 | Complete | Multi-agent coordination (in-memory state, no SQLite checkpoint) |
777+ | ** Orchestration** | LangGraph Checkpoint | >=3.0.0 | Complete | Checkpoint management (pinned for security, but using in-memory state) |
778+ | ** Orchestration** | LangChain | >=0.1.11 | Complete | LLM framework integration |
779+ | ** Orchestration** | LangChain Core | >=1.2.6 | Complete | Core LangChain functionality |
692780| ** AI/LLM** | NVIDIA NIM | Latest | Complete | Llama 3.3 Nemotron Super 49B + Embeddings |
693- | ** Database** | PostgreSQL | 15+ | Complete | Structured data storage |
694- | ** Database** | TimescaleDB | 2.11+ | Complete | Time-series data |
695- | ** Vector DB** | Milvus | 2.3+ | Complete | Semantic search & embeddings |
781+ | ** Database** | PostgreSQL | 14-16 (varies by deployment) | Complete | Structured data storage (pg14: versioned/ci, pg15: gpu/rapids, pg16: dev) |
782+ | ** Database** | TimescaleDB | 2.11+ (varies by deployment) | Complete | Time-series data |
783+ | ** Vector DB** | Milvus | >=2.3.0 (pymilvus) | Complete | Semantic search & embeddings |
784+ | ** Database Driver** | psycopg | >=3.1.0 | Complete | PostgreSQL async driver |
696785| ** Cache** | Redis | 7+ | Complete | Session management & caching |
697786| ** Streaming** | Apache Kafka | 3.5+ | Complete | Event streaming & messaging |
698787| ** Storage** | MinIO | Latest | Complete | Object storage for files |
@@ -703,7 +792,7 @@ The Document Extraction Agent implements a comprehensive **6-stage pipeline** us
703792| ** Security** | NeMo Guardrails | Latest | Complete | Content safety & compliance |
704793| ** Security** | JWT/PyJWT | 2.8+ | Complete | Authentication & authorization (key validation enforced) |
705794| ** Security** | bcrypt | Latest | Complete | Password hashing |
706- | ** Security** | aiohttp | 3.13.2 | Complete | HTTP client (client-only, C extensions enabled) |
795+ | ** Security** | aiohttp | >= 3.13.3 | Complete | HTTP client (client-only, C extensions enabled, security: zip bomb DoS fix ) |
707796| ** ML/AI** | XGBoost | 1.6+ | Complete | Gradient boosting for forecasting |
708797| ** ML/AI** | scikit-learn | 1.5+ | Complete | Machine learning models |
709798| ** ML/AI** | RAPIDS cuML | Latest | Complete | GPU-accelerated ML (optional) |
0 commit comments