Ports generate myriad of data making them an appealing infrastructure to automate. However, ports face significant operational challenges due to siloed operations and complex dynamics. To overcome this limitation, we develop an AI prediction method for ship traffic on ports’ waterways. Our approach is based on the combination of Graph Neural Networks (GNN) and the Transformer. We start by building the graph representation of the port, where we consider that the nodes are the waterways and the edges are the connections between them. Data processed with GNN at the nodes level are then fed to the Transformer for causal prediction of ship traffic. We demonstrate with extensive experiments that our approach outperforms competitive techniques, while providing explainable and reliable 12-hour prediction of ship traffic on waterways and optimized usage of harbours.