The need to increase mobility and to remove cables in industrial environments is pushing 5G as a valuable communication
system to connect traditional deterministic Ethernet-based devices. One alternative is the adoption of Time Sensitive Networking (TSN) standards over 5G Non-Public Networks (5G NPN) deployed in the company premises. This scenario presents several challenges, being the configuration of the 5G part the most relevant to provide latency, reliability and throughput balance
suitable to ensure that all the TSN traffic can be delivered in time.
Our research work addresses this problem from the perspective of the learning automata. Our aim is to learn from the live network to build a smart controller that can dynamically predict and apply a suitable configuration of the 5G NPN that can satisfy
the requirements of the current TSN traffic. The article presents the main ideas of this novel approach.