The operation of ring-based synchrotron light sources with short electron bunches increases the emission of coherent synchrotron radiation in the THz frequency range. However, the micro-bunching instability resulting from self-interaction of the bunch with its own radiation field limits stable operation with constant intensity of CSR emission to a particular threshold current. Above this threshold, the longitudinal charge distribution and thus the emitted radiation vary rapidly and continuously. Therefore, a fast and adaptive feedback system is the appropriate approach to stabilize the dynamics and to overcome the limitations given by the instability. In this contribution, we discuss first efforts towards a longitudinal feedback design that acts on the RF system of the KIT storage ring KARA (Karlsruhe Research Accelerator) and aims for stabilization of the emitted THz radiation. Our approach is based on methods of adaptive control that were developed in the field of reinforcement learning and have seen great success in other fields of research over the past decade. We motivate this particular approach and comment on different aspects of its implementation.