We show how to learn structures of generic, non-Markovian, quantum stochastic processes using a tensor network based machine learning algorithm. We do this by representing the process as a matrix product operator (MPO) and train it with a database of local input states at different times and the corresponding time-nonlocal output state. In particular, we analyze a qubit coupled to an environment and predict output state of the system at different time, as well as reconstruct the full system process. We show how the bond dimension of the MPO, a measure of non-Markovianity, depends on the properties of the system, of the environment and of their interaction. Hence, this study opens the way to a possible experimental investigation into the process tensor and its properties.