Getting a variable from an AI Controller to a Task in my behaviour tree

Hello, I am currently writing an AI with reinforcement learning and am facing the following problem. A variable I am using for calculations is used in my AI Controller. The result of this calculation is needed in a task called “roamaround” in my behaviuour tree, where i need it for further calculation. So I need a way to constantly get the new result in the task of my behaviour tree. Anyone knows what to do?